Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
# PRLabel: %Mgmt
/sdk/apimanagement/arm-apimanagement/ @qiaozha @MaryGao @JialinHuang803

# PRLabel: %Mgmt
# PRLabel: %Mgmt %mgmt-review-needed
/sdk/appcontainers/arm-appcontainers/ @qiaozha @MaryGao @JialinHuang803

# PRLabel: %Mgmt
Expand Down
25 changes: 14 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

359 changes: 359 additions & 0 deletions sdk/appcontainers/arm-appcontainers/CHANGELOG.md

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions sdk/appcontainers/arm-appcontainers/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Azure ContainerApps API client library for JavaScript
# Azure ContainerAppsAPI client library for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerApps API client.
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerAppsAPI client.

Logic app is an extension resource on container app and the extension resource enables logic specific operations on the container app through the APIs listed.
Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcontainers) |
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-appcontainers) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
Key links:

- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers)
- [Package (NPM)](https://www.npmjs.com/package/@azure/arm-appcontainers)
- [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview)
- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/samples)

## Getting started

Expand All @@ -24,26 +26,26 @@ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUP

### Install the `@azure/arm-appcontainers` package

Install the Azure ContainerApps API client library for JavaScript with `npm`:
Install the Azure ContainerAppsAPI client library for JavaScript with `npm`:

```bash
npm install @azure/arm-appcontainers
```

### Create and authenticate a `ContainerAppsAPIClient`

To create a client object to access the Azure ContainerApps API API, you will need the `endpoint` of your Azure ContainerApps API resource and a `credential`. The Azure ContainerApps API client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ContainerApps API resource in the [Azure Portal][azure_portal].
To create a client object to access the Azure ContainerAppsAPI API, you will need the `endpoint` of your Azure ContainerAppsAPI resource and a `credential`. The Azure ContainerAppsAPI client can use Azure Active Directory credentials to authenticate.
You can find the endpoint for your Azure ContainerAppsAPI resource in the [Azure Portal][azure_portal].

You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).

To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:

```bash
npm install @azure/identity
```

You will also need to **register a new AAD application and grant access to Azure ContainerApps API** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
You will also need to **register a new AAD application and grant access to Azure ContainerAppsAPI** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).

For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).

Expand All @@ -63,22 +65,23 @@ For browser environments, use the `InteractiveBrowserCredential` from the `@azur
import { InteractiveBrowserCredential } from "@azure/identity";
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";

const subscriptionId = "00000000-0000-0000-0000-000000000000";
const credential = new InteractiveBrowserCredential({
tenantId: "<YOUR_TENANT_ID>",
clientId: "<YOUR_CLIENT_ID>",
});
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new ContainerAppsAPIClient(credential, subscriptionId);
```


### JavaScript Bundle
To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).

## Key concepts

### ContainerAppsAPIClient

`ContainerAppsAPIClient` is the primary interface for developers using the Azure ContainerApps API client library. Explore the methods on this client object to understand the different features of the Azure ContainerApps API service that you can access.
`ContainerAppsAPIClient` is the primary interface for developers using the Azure ContainerAppsAPI client library. Explore the methods on this client object to understand the different features of the Azure ContainerAppsAPI service that you can access.

## Troubleshooting

Expand All @@ -96,7 +99,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur

## Next steps

Please take a look at the [samples](https://github.com/Azure-Samples/azure-samples-js-management) directory for detailed examples on how to use this library.
Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/samples) directory for detailed examples on how to use this library.

## Contributing

Expand All @@ -106,9 +109,6 @@ If you'd like to contribute to this library, please read the [contributing guide

- [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)


[azure_cli]: https://learn.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
[azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
Expand Down
8 changes: 0 additions & 8 deletions sdk/appcontainers/arm-appcontainers/_meta.json

This file was deleted.

4 changes: 1 addition & 3 deletions sdk/appcontainers/arm-appcontainers/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
{
"extends": "../../../api-extractor-base.json"
}
{ "extends": "../../../api-extractor-base.json" }
2 changes: 1 addition & 1 deletion sdk/appcontainers/arm-appcontainers/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/appcontainers/arm-appcontainers",
"Tag": "js/appcontainers/arm-appcontainers_aa6bb1e6dd"
"Tag": "js/appcontainers/arm-appcontainers_2b2d8ca5c6"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"extends": "../../../../eng/tsconfigs/samples.json",
"compilerOptions": {
"paths": {
"@azure/arm-appcontainers": [
"../dist/esm"
]
"@azure/arm-appcontainers": ["../dist/esm"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.browser.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.cjs.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": "../../../../eng/tsconfigs/src.esm.json",
"include": [
"../src/index.ts"
]
"include": ["../src/index.ts"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../../../eng/tsconfigs/test.browser.json",
"compilerOptions": {
"paths": {
"@azure/arm-appcontainers": ["../src/index.ts"],
"@azure/arm-appcontainers/*": ["../src/*"],
"$internal/*": ["../src/*"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"extends": "../../../../eng/tsconfigs/test.node.json"
"extends": "../../../../eng/tsconfigs/test.node.json",
"compilerOptions": {
"paths": {
"@azure/arm-appcontainers": ["../src/index.ts"],
"@azure/arm-appcontainers/*": ["../src/*"],
"$internal/*": ["../src/*"]
}
}
}
Loading