[mgmt] appcontainers release (#31463)
https://github.com/Azure/sdk-release-request/issues/5586
This commit is contained in:
Родитель
d0787e1797
Коммит
d74b28cf79
|
@ -1,5 +1,420 @@
|
|||
# Release History
|
||||
|
||||
## 2.2.0-beta.1 (2024-10-18)
|
||||
Compared with version 2.1.0
|
||||
|
||||
### Features Added
|
||||
|
||||
- Added operation group AppResiliencyOperations
|
||||
- Added operation group BuildAuthToken
|
||||
- Added operation group Builders
|
||||
- Added operation group Builds
|
||||
- Added operation group BuildsByBuilderResource
|
||||
- Added operation group ContainerAppsBuilds
|
||||
- Added operation group ContainerAppsBuildsByContainerApp
|
||||
- Added operation group ContainerAppsPatches
|
||||
- Added operation group ContainerAppsSessionPools
|
||||
- Added operation group DaprComponentResiliencyPolicies
|
||||
- Added operation group DaprSubscriptions
|
||||
- Added operation group DotNetComponents
|
||||
- Added operation group FunctionsExtension
|
||||
- Added operation group JavaComponents
|
||||
- Added operation group LogicApps
|
||||
- Added operation group ManagedEnvironmentPrivateEndpointConnections
|
||||
- Added operation group ManagedEnvironmentPrivateLinkResources
|
||||
- Added operation Jobs.beginResume
|
||||
- Added operation Jobs.beginResumeAndWait
|
||||
- Added operation Jobs.beginSuspend
|
||||
- Added operation Jobs.beginSuspendAndWait
|
||||
- Added Interface AppInsightsConfiguration
|
||||
- Added Interface AppResiliency
|
||||
- Added Interface AppResiliencyCollection
|
||||
- Added Interface AppResiliencyCreateOrUpdateOptionalParams
|
||||
- Added Interface AppResiliencyDeleteOptionalParams
|
||||
- Added Interface AppResiliencyGetOptionalParams
|
||||
- Added Interface AppResiliencyListNextOptionalParams
|
||||
- Added Interface AppResiliencyListOptionalParams
|
||||
- Added Interface AppResiliencyUpdateOptionalParams
|
||||
- Added Interface BuildAuthTokenListOptionalParams
|
||||
- Added Interface BuildCollection
|
||||
- Added Interface BuildConfiguration
|
||||
- Added Interface BuilderCollection
|
||||
- Added Interface BuilderResource
|
||||
- Added Interface BuilderResourceUpdate
|
||||
- Added Interface BuildersCreateOrUpdateHeaders
|
||||
- Added Interface BuildersCreateOrUpdateOptionalParams
|
||||
- Added Interface BuildersDeleteHeaders
|
||||
- Added Interface BuildersDeleteOptionalParams
|
||||
- Added Interface BuildersGetOptionalParams
|
||||
- Added Interface BuildersListByResourceGroupNextOptionalParams
|
||||
- Added Interface BuildersListByResourceGroupOptionalParams
|
||||
- Added Interface BuildersListBySubscriptionNextOptionalParams
|
||||
- Added Interface BuildersListBySubscriptionOptionalParams
|
||||
- Added Interface BuildersUpdateHeaders
|
||||
- Added Interface BuildersUpdateOptionalParams
|
||||
- Added Interface BuildResource
|
||||
- Added Interface BuildsByBuilderResourceListNextOptionalParams
|
||||
- Added Interface BuildsByBuilderResourceListOptionalParams
|
||||
- Added Interface BuildsCreateOrUpdateHeaders
|
||||
- Added Interface BuildsCreateOrUpdateOptionalParams
|
||||
- Added Interface BuildsDeleteHeaders
|
||||
- Added Interface BuildsDeleteOptionalParams
|
||||
- Added Interface BuildsGetOptionalParams
|
||||
- Added Interface BuildToken
|
||||
- Added Interface CertificateKeyVaultProperties
|
||||
- Added Interface CircuitBreakerPolicy
|
||||
- Added Interface ContainerAppPropertiesPatchingConfiguration
|
||||
- Added Interface ContainerAppsBuildCollection
|
||||
- Added Interface ContainerAppsBuildConfiguration
|
||||
- Added Interface ContainerAppsBuildResource
|
||||
- Added Interface ContainerAppsBuildsByContainerAppListNextOptionalParams
|
||||
- Added Interface ContainerAppsBuildsByContainerAppListOptionalParams
|
||||
- Added Interface ContainerAppsBuildsDeleteHeaders
|
||||
- Added Interface ContainerAppsBuildsDeleteOptionalParams
|
||||
- Added Interface ContainerAppsBuildsGetOptionalParams
|
||||
- Added Interface ContainerAppsPatchesApplyHeaders
|
||||
- Added Interface ContainerAppsPatchesApplyOptionalParams
|
||||
- Added Interface ContainerAppsPatchesDeleteHeaders
|
||||
- Added Interface ContainerAppsPatchesDeleteOptionalParams
|
||||
- Added Interface ContainerAppsPatchesGetOptionalParams
|
||||
- Added Interface ContainerAppsPatchesListByContainerAppNextOptionalParams
|
||||
- Added Interface ContainerAppsPatchesListByContainerAppOptionalParams
|
||||
- Added Interface ContainerAppsPatchesSkipConfigureHeaders
|
||||
- Added Interface ContainerAppsPatchesSkipConfigureOptionalParams
|
||||
- Added Interface ContainerAppsPatchResource
|
||||
- Added Interface ContainerAppsSessionPoolsCreateOrUpdateOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsDeleteHeaders
|
||||
- Added Interface ContainerAppsSessionPoolsDeleteOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsGetOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsListByResourceGroupNextOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsListByResourceGroupOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsListBySubscriptionNextOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsListBySubscriptionOptionalParams
|
||||
- Added Interface ContainerAppsSessionPoolsUpdateHeaders
|
||||
- Added Interface ContainerAppsSessionPoolsUpdateOptionalParams
|
||||
- Added Interface ContainerExecutionStatus
|
||||
- Added Interface ContainerRegistry
|
||||
- Added Interface ContainerRegistryWithCustomImage
|
||||
- Added Interface CustomContainerTemplate
|
||||
- Added Interface DaprComponentResiliencyPoliciesCollection
|
||||
- Added Interface DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams
|
||||
- Added Interface DaprComponentResiliencyPoliciesDeleteOptionalParams
|
||||
- Added Interface DaprComponentResiliencyPoliciesGetOptionalParams
|
||||
- Added Interface DaprComponentResiliencyPoliciesListNextOptionalParams
|
||||
- Added Interface DaprComponentResiliencyPoliciesListOptionalParams
|
||||
- Added Interface DaprComponentResiliencyPolicy
|
||||
- Added Interface DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration
|
||||
- Added Interface DaprComponentResiliencyPolicyConfiguration
|
||||
- Added Interface DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration
|
||||
- Added Interface DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration
|
||||
- Added Interface DaprComponentResiliencyPolicyTimeoutPolicyConfiguration
|
||||
- Added Interface DaprComponentServiceBinding
|
||||
- Added Interface DaprServiceBindMetadata
|
||||
- Added Interface DaprSubscription
|
||||
- Added Interface DaprSubscriptionBulkSubscribeOptions
|
||||
- Added Interface DaprSubscriptionRouteRule
|
||||
- Added Interface DaprSubscriptionRoutes
|
||||
- Added Interface DaprSubscriptionsCollection
|
||||
- Added Interface DaprSubscriptionsCreateOrUpdateOptionalParams
|
||||
- Added Interface DaprSubscriptionsDeleteOptionalParams
|
||||
- Added Interface DaprSubscriptionsGetOptionalParams
|
||||
- Added Interface DaprSubscriptionsListNextOptionalParams
|
||||
- Added Interface DaprSubscriptionsListOptionalParams
|
||||
- Added Interface DataDogConfiguration
|
||||
- Added Interface DestinationsConfiguration
|
||||
- Added Interface DotNetComponent
|
||||
- Added Interface DotNetComponentConfigurationProperty
|
||||
- Added Interface DotNetComponentsCollection
|
||||
- Added Interface DotNetComponentsCreateOrUpdateOptionalParams
|
||||
- Added Interface DotNetComponentsDeleteHeaders
|
||||
- Added Interface DotNetComponentsDeleteOptionalParams
|
||||
- Added Interface DotNetComponentServiceBind
|
||||
- Added Interface DotNetComponentsGetOptionalParams
|
||||
- Added Interface DotNetComponentsListNextOptionalParams
|
||||
- Added Interface DotNetComponentsListOptionalParams
|
||||
- Added Interface DotNetComponentsUpdateHeaders
|
||||
- Added Interface DotNetComponentsUpdateOptionalParams
|
||||
- Added Interface DynamicPoolConfiguration
|
||||
- Added Interface EnvironmentVariable
|
||||
- Added Interface ErrorEntity
|
||||
- Added Interface ExecutionStatus
|
||||
- Added Interface FunctionsExtensionInvokeFunctionsHostOptionalParams
|
||||
- Added Interface Header
|
||||
- Added Interface HeaderMatch
|
||||
- Added Interface HttpConnectionPool
|
||||
- Added Interface HttpGet
|
||||
- Added Interface HttpRetryPolicy
|
||||
- Added Interface IdentitySettings
|
||||
- Added Interface JavaComponent
|
||||
- Added Interface JavaComponentConfigurationProperty
|
||||
- Added Interface JavaComponentIngress
|
||||
- Added Interface JavaComponentProperties
|
||||
- Added Interface JavaComponentPropertiesScale
|
||||
- Added Interface JavaComponentsCollection
|
||||
- Added Interface JavaComponentsCreateOrUpdateOptionalParams
|
||||
- Added Interface JavaComponentsDeleteHeaders
|
||||
- Added Interface JavaComponentsDeleteOptionalParams
|
||||
- Added Interface JavaComponentServiceBind
|
||||
- Added Interface JavaComponentsGetOptionalParams
|
||||
- Added Interface JavaComponentsListNextOptionalParams
|
||||
- Added Interface JavaComponentsListOptionalParams
|
||||
- Added Interface JavaComponentsUpdateHeaders
|
||||
- Added Interface JavaComponentsUpdateOptionalParams
|
||||
- Added Interface JobsResumeHeaders
|
||||
- Added Interface JobsResumeOptionalParams
|
||||
- Added Interface JobsSuspendHeaders
|
||||
- Added Interface JobsSuspendOptionalParams
|
||||
- Added Interface LoggerSetting
|
||||
- Added Interface LogicApp
|
||||
- Added Interface LogicAppsCreateOrUpdateOptionalParams
|
||||
- Added Interface LogicAppsDeleteOptionalParams
|
||||
- Added Interface LogicAppsDeployWorkflowArtifactsOptionalParams
|
||||
- Added Interface LogicAppsGetOptionalParams
|
||||
- Added Interface LogicAppsGetWorkflowOptionalParams
|
||||
- Added Interface LogicAppsInvokeOptionalParams
|
||||
- Added Interface LogicAppsListWorkflowsConnectionsOptionalParams
|
||||
- Added Interface LogicAppsListWorkflowsNextOptionalParams
|
||||
- Added Interface LogicAppsListWorkflowsOptionalParams
|
||||
- Added Interface LogsConfiguration
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsListNextOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateLinkResourcesListNextOptionalParams
|
||||
- Added Interface ManagedEnvironmentPrivateLinkResourcesListOptionalParams
|
||||
- Added Interface MetricsConfiguration
|
||||
- Added Interface NacosComponent
|
||||
- Added Interface NfsAzureFileProperties
|
||||
- Added Interface OpenTelemetryConfiguration
|
||||
- Added Interface OtlpConfiguration
|
||||
- Added Interface PatchCollection
|
||||
- Added Interface PatchDetails
|
||||
- Added Interface PatchDetailsNewLayer
|
||||
- Added Interface PatchDetailsOldLayer
|
||||
- Added Interface PatchProperties
|
||||
- Added Interface PatchSkipConfig
|
||||
- Added Interface PreBuildStep
|
||||
- Added Interface PrivateEndpoint
|
||||
- Added Interface PrivateEndpointConnection
|
||||
- Added Interface PrivateEndpointConnectionListResult
|
||||
- Added Interface PrivateLinkResource
|
||||
- Added Interface PrivateLinkResourceListResult
|
||||
- Added Interface PrivateLinkServiceConnectionState
|
||||
- Added Interface ReplicaExecutionStatus
|
||||
- Added Interface Runtime
|
||||
- Added Interface RuntimeDotnet
|
||||
- Added Interface RuntimeJava
|
||||
- Added Interface RuntimeJavaAgent
|
||||
- Added Interface RuntimeJavaAgentLogging
|
||||
- Added Interface ScaleConfiguration
|
||||
- Added Interface ScgRoute
|
||||
- Added Interface SessionContainer
|
||||
- Added Interface SessionContainerResources
|
||||
- Added Interface SessionIngress
|
||||
- Added Interface SessionNetworkConfiguration
|
||||
- Added Interface SessionPool
|
||||
- Added Interface SessionPoolCollection
|
||||
- Added Interface SessionPoolSecret
|
||||
- Added Interface SessionPoolUpdatableProperties
|
||||
- Added Interface SessionRegistryCredentials
|
||||
- Added Interface SmbStorage
|
||||
- Added Interface SpringBootAdminComponent
|
||||
- Added Interface SpringCloudConfigComponent
|
||||
- Added Interface SpringCloudEurekaComponent
|
||||
- Added Interface SpringCloudGatewayComponent
|
||||
- Added Interface TcpConnectionPool
|
||||
- Added Interface TcpRetryPolicy
|
||||
- Added Interface TimeoutPolicy
|
||||
- Added Interface TracesConfiguration
|
||||
- Added Interface WorkflowArtifacts
|
||||
- Added Interface WorkflowEnvelope
|
||||
- Added Interface WorkflowEnvelopeCollection
|
||||
- Added Interface WorkflowEnvelopeProperties
|
||||
- Added Interface WorkflowHealth
|
||||
- Added Type Alias AppResiliencyCreateOrUpdateResponse
|
||||
- Added Type Alias AppResiliencyGetResponse
|
||||
- Added Type Alias AppResiliencyListNextResponse
|
||||
- Added Type Alias AppResiliencyListResponse
|
||||
- Added Type Alias AppResiliencyUpdateResponse
|
||||
- Added Type Alias BuildAuthTokenListResponse
|
||||
- Added Type Alias BuilderProvisioningState
|
||||
- Added Type Alias BuildersCreateOrUpdateResponse
|
||||
- Added Type Alias BuildersDeleteResponse
|
||||
- Added Type Alias BuildersGetResponse
|
||||
- Added Type Alias BuildersListByResourceGroupNextResponse
|
||||
- Added Type Alias BuildersListByResourceGroupResponse
|
||||
- Added Type Alias BuildersListBySubscriptionNextResponse
|
||||
- Added Type Alias BuildersListBySubscriptionResponse
|
||||
- Added Type Alias BuildersUpdateResponse
|
||||
- Added Type Alias BuildProvisioningState
|
||||
- Added Type Alias BuildsByBuilderResourceListNextResponse
|
||||
- Added Type Alias BuildsByBuilderResourceListResponse
|
||||
- Added Type Alias BuildsCreateOrUpdateResponse
|
||||
- Added Type Alias BuildsDeleteResponse
|
||||
- Added Type Alias BuildsGetResponse
|
||||
- Added Type Alias BuildStatus
|
||||
- Added Type Alias CertificateType
|
||||
- Added Type Alias ContainerAppsBuildsByContainerAppListNextResponse
|
||||
- Added Type Alias ContainerAppsBuildsByContainerAppListResponse
|
||||
- Added Type Alias ContainerAppsBuildsDeleteResponse
|
||||
- Added Type Alias ContainerAppsBuildsGetResponse
|
||||
- Added Type Alias ContainerAppsPatchesApplyResponse
|
||||
- Added Type Alias ContainerAppsPatchesDeleteResponse
|
||||
- Added Type Alias ContainerAppsPatchesGetResponse
|
||||
- Added Type Alias ContainerAppsPatchesListByContainerAppNextResponse
|
||||
- Added Type Alias ContainerAppsPatchesListByContainerAppResponse
|
||||
- Added Type Alias ContainerAppsPatchesSkipConfigureResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsCreateOrUpdateResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsDeleteResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsGetResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsListByResourceGroupNextResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsListByResourceGroupResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsListBySubscriptionNextResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsListBySubscriptionResponse
|
||||
- Added Type Alias ContainerAppsSessionPoolsUpdateResponse
|
||||
- Added Type Alias ContainerType
|
||||
- Added Type Alias DaprComponentResiliencyPoliciesCreateOrUpdateResponse
|
||||
- Added Type Alias DaprComponentResiliencyPoliciesGetResponse
|
||||
- Added Type Alias DaprComponentResiliencyPoliciesListNextResponse
|
||||
- Added Type Alias DaprComponentResiliencyPoliciesListResponse
|
||||
- Added Type Alias DaprSubscriptionsCreateOrUpdateResponse
|
||||
- Added Type Alias DaprSubscriptionsGetResponse
|
||||
- Added Type Alias DaprSubscriptionsListNextResponse
|
||||
- Added Type Alias DaprSubscriptionsListResponse
|
||||
- Added Type Alias DetectionStatus
|
||||
- Added Type Alias DotNetComponentProvisioningState
|
||||
- Added Type Alias DotNetComponentsCreateOrUpdateResponse
|
||||
- Added Type Alias DotNetComponentsDeleteResponse
|
||||
- Added Type Alias DotNetComponentsGetResponse
|
||||
- Added Type Alias DotNetComponentsListNextResponse
|
||||
- Added Type Alias DotNetComponentsListResponse
|
||||
- Added Type Alias DotNetComponentsUpdateResponse
|
||||
- Added Type Alias DotNetComponentType
|
||||
- Added Type Alias ExecutionType
|
||||
- Added Type Alias FunctionsExtensionInvokeFunctionsHostResponse
|
||||
- Added Type Alias IdentitySettingsLifeCycle
|
||||
- Added Type Alias ImageType
|
||||
- Added Type Alias IngressTargetPortHttpScheme
|
||||
- Added Type Alias JavaComponentPropertiesUnion
|
||||
- Added Type Alias JavaComponentProvisioningState
|
||||
- Added Type Alias JavaComponentsCreateOrUpdateResponse
|
||||
- Added Type Alias JavaComponentsDeleteResponse
|
||||
- Added Type Alias JavaComponentsGetResponse
|
||||
- Added Type Alias JavaComponentsListNextResponse
|
||||
- Added Type Alias JavaComponentsListResponse
|
||||
- Added Type Alias JavaComponentsUpdateResponse
|
||||
- Added Type Alias JavaComponentType
|
||||
- Added Type Alias JobRunningState
|
||||
- Added Type Alias JobsResumeResponse
|
||||
- Added Type Alias JobsSuspendResponse
|
||||
- Added Type Alias Kind
|
||||
- Added Type Alias Level
|
||||
- Added Type Alias LogicAppsCreateOrUpdateResponse
|
||||
- Added Type Alias LogicAppsGetResponse
|
||||
- Added Type Alias LogicAppsGetWorkflowResponse
|
||||
- Added Type Alias LogicAppsInvokeResponse
|
||||
- Added Type Alias LogicAppsListWorkflowsConnectionsResponse
|
||||
- Added Type Alias LogicAppsListWorkflowsNextResponse
|
||||
- Added Type Alias LogicAppsListWorkflowsResponse
|
||||
- Added Type Alias LogicAppsProxyMethod
|
||||
- Added Type Alias ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateEndpointConnectionsGetResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateEndpointConnectionsListNextResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateEndpointConnectionsListResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateLinkResourcesListNextResponse
|
||||
- Added Type Alias ManagedEnvironmentPrivateLinkResourcesListResponse
|
||||
- Added Type Alias PatchApplyStatus
|
||||
- Added Type Alias PatchingMode
|
||||
- Added Type Alias PatchType
|
||||
- Added Type Alias PoolManagementType
|
||||
- Added Type Alias PrivateEndpointConnectionProvisioningState
|
||||
- Added Type Alias PrivateEndpointServiceConnectionStatus
|
||||
- Added Type Alias PublicNetworkAccess
|
||||
- Added Type Alias SessionNetworkStatus
|
||||
- Added Type Alias SessionPoolProvisioningState
|
||||
- Added Type Alias WorkflowHealthState
|
||||
- Added Type Alias WorkflowState
|
||||
- Interface BaseContainer has a new optional parameter imageType
|
||||
- Interface BillingMeter has a new optional parameter id
|
||||
- Interface BillingMeter has a new optional parameter name
|
||||
- Interface BillingMeter has a new optional parameter systemData
|
||||
- Interface BillingMeter has a new optional parameter type
|
||||
- Interface CertificateProperties has a new optional parameter certificateKeyVaultProperties
|
||||
- Interface CertificateProperties has a new optional parameter certificateType
|
||||
- Interface Configuration has a new optional parameter identitySettings
|
||||
- Interface Configuration has a new optional parameter runtime
|
||||
- Interface ConnectedEnvironmentStorageProperties has a new optional parameter smb
|
||||
- Interface ContainerApp has a new optional parameter deploymentErrors
|
||||
- Interface ContainerApp has a new optional parameter kind
|
||||
- Interface ContainerApp has a new optional parameter patchingConfiguration
|
||||
- Interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams has a new optional parameter xMsGithubAuxiliary
|
||||
- Interface ContainerAppsSourceControlsDeleteOptionalParams has a new optional parameter deleteWorkflow
|
||||
- Interface ContainerAppsSourceControlsDeleteOptionalParams has a new optional parameter ignoreWorkflowDeletionFailure
|
||||
- Interface ContainerAppsSourceControlsDeleteOptionalParams has a new optional parameter xMsGithubAuxiliary
|
||||
- Interface CustomDomainConfiguration has a new optional parameter certificateKeyVaultProperties
|
||||
- Interface CustomScaleRule has a new optional parameter identity
|
||||
- Interface DaprComponent has a new optional parameter serviceComponentBind
|
||||
- Interface GithubActionConfiguration has a new optional parameter buildEnvironmentVariables
|
||||
- Interface GithubActionConfiguration has a new optional parameter dockerfilePath
|
||||
- Interface HttpScaleRule has a new optional parameter identity
|
||||
- Interface Ingress has a new optional parameter targetPortHttpScheme
|
||||
- Interface Job has a new optional parameter extendedLocation
|
||||
- Interface Job has a new optional parameter runningState
|
||||
- Interface JobConfiguration has a new optional parameter identitySettings
|
||||
- Interface JobExecution has a new optional parameter detailedStatus
|
||||
- Interface JobPatchProperties has a new optional parameter extendedLocation
|
||||
- Interface JobScaleRule has a new optional parameter identity
|
||||
- Interface LogAnalyticsConfiguration has a new optional parameter dynamicJsonColumns
|
||||
- Interface ManagedEnvironment has a new optional parameter appInsightsConfiguration
|
||||
- Interface ManagedEnvironment has a new optional parameter identity
|
||||
- Interface ManagedEnvironment has a new optional parameter openTelemetryConfiguration
|
||||
- Interface ManagedEnvironment has a new optional parameter privateEndpointConnections
|
||||
- Interface ManagedEnvironment has a new optional parameter publicNetworkAccess
|
||||
- Interface ManagedEnvironmentStorageProperties has a new optional parameter nfsAzureFile
|
||||
- Interface QueueScaleRule has a new optional parameter accountName
|
||||
- Interface QueueScaleRule has a new optional parameter identity
|
||||
- Interface ReplicaContainer has a new optional parameter debugEndpoint
|
||||
- Interface Scale has a new optional parameter cooldownPeriod
|
||||
- Interface Scale has a new optional parameter pollingInterval
|
||||
- Interface ServiceBind has a new optional parameter clientType
|
||||
- Interface ServiceBind has a new optional parameter customizedKeys
|
||||
- Interface TcpScaleRule has a new optional parameter identity
|
||||
- Interface WorkloadProfile has a new optional parameter enableFips
|
||||
- Added Enum KnownBuilderProvisioningState
|
||||
- Added Enum KnownBuildProvisioningState
|
||||
- Added Enum KnownBuildStatus
|
||||
- Added Enum KnownCertificateType
|
||||
- Added Enum KnownContainerType
|
||||
- Added Enum KnownDetectionStatus
|
||||
- Added Enum KnownDotNetComponentProvisioningState
|
||||
- Added Enum KnownDotNetComponentType
|
||||
- Added Enum KnownExecutionType
|
||||
- Added Enum KnownIdentitySettingsLifeCycle
|
||||
- Added Enum KnownImageType
|
||||
- Added Enum KnownIngressTargetPortHttpScheme
|
||||
- Added Enum KnownJavaComponentProvisioningState
|
||||
- Added Enum KnownJavaComponentType
|
||||
- Added Enum KnownJobRunningState
|
||||
- Added Enum KnownKind
|
||||
- Added Enum KnownLevel
|
||||
- Added Enum KnownLogicAppsProxyMethod
|
||||
- Added Enum KnownPatchApplyStatus
|
||||
- Added Enum KnownPatchingMode
|
||||
- Added Enum KnownPatchType
|
||||
- Added Enum KnownPoolManagementType
|
||||
- Added Enum KnownPrivateEndpointConnectionProvisioningState
|
||||
- Added Enum KnownPrivateEndpointServiceConnectionStatus
|
||||
- Added Enum KnownPublicNetworkAccess
|
||||
- Added Enum KnownSessionNetworkStatus
|
||||
- Added Enum KnownSessionPoolProvisioningState
|
||||
- Added Enum KnownWorkflowState
|
||||
- Enum KnownStorageType has a new value NfsAzureFile
|
||||
- Enum KnownStorageType has a new value Smb
|
||||
|
||||
|
||||
## 2.1.0 (2024-07-15)
|
||||
|
||||
### Features Added
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure ContainerApps API client.
|
||||
|
||||
|
||||
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://docs.microsoft.com/javascript/api/@azure/arm-appcontainers) |
|
||||
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview) |
|
||||
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
|
||||
|
||||
## Getting started
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"commit": "1aa912658531534e4e57ea613591075f7b97897c",
|
||||
"commit": "abe3209e7c6924a58ab560ebab2349bc8fde6aa7",
|
||||
"readme": "specification/app/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true",
|
||||
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\app\\resource-manager\\readme.md --use=@autorest/typescript@6.0.27 --generate-sample=true",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.11",
|
||||
"use": "@autorest/typescript@6.0.23"
|
||||
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.15",
|
||||
"use": "@autorest/typescript@6.0.27"
|
||||
}
|
|
@ -2,5 +2,5 @@
|
|||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "js",
|
||||
"TagPrefix": "js/appcontainers/arm-appcontainers",
|
||||
"Tag": "js/appcontainers/arm-appcontainers_9d19b5e29d"
|
||||
"Tag": "js/appcontainers/arm-appcontainers_6f9d1c8504"
|
||||
}
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for ContainerAppsAPIClient.",
|
||||
"version": "2.1.0",
|
||||
"version": "2.2.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-lro": "^2.5.4",
|
||||
"@azure/abort-controller": "^2.1.2",
|
||||
"@azure/core-paging": "^1.2.0",
|
||||
"@azure/core-client": "^1.7.0",
|
||||
"@azure/core-auth": "^1.6.0",
|
||||
"@azure/core-rest-pipeline": "^1.14.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
|
@ -28,21 +28,21 @@
|
|||
"module": "./dist-esm/src/index.js",
|
||||
"types": "./types/arm-appcontainers.d.ts",
|
||||
"devDependencies": {
|
||||
"@azure-tools/test-credential": "^1.1.0",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"typescript": "~5.6.2",
|
||||
"uglify-js": "^3.4.9",
|
||||
"dotenv": "^16.0.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/identity": "^4.0.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"@azure/identity": "^4.2.1",
|
||||
"@azure-tools/test-recorder": "^3.0.0",
|
||||
"@azure-tools/test-credential": "^1.1.0",
|
||||
"mocha": "^10.0.0",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
"@types/chai": "^4.2.8",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"dotenv": "^16.0.0",
|
||||
"mocha": "^10.0.0",
|
||||
"ts-node": "^10.0.0",
|
||||
"tsx": "^4.7.1",
|
||||
"typescript": "~5.6.2",
|
||||
"uglify-js": "^3.4.9"
|
||||
"@types/node": "^18.0.0",
|
||||
"ts-node": "^10.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -70,29 +70,28 @@
|
|||
],
|
||||
"scripts": {
|
||||
"build": "npm run clean && tsc && dev-tool run bundle && npm run minify && dev-tool run vendored mkdirp ./review && npm run extract-api",
|
||||
"build:browser": "echo skipped",
|
||||
"build:node": "echo skipped",
|
||||
"build:samples": "echo skipped.",
|
||||
"build:test": "echo skipped",
|
||||
"check-format": "echo skipped",
|
||||
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"execute:samples": "echo skipped",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"format": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"integration-test:browser": "echo skipped",
|
||||
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
||||
"lint": "echo skipped",
|
||||
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js",
|
||||
"pack": "npm pack 2>&1",
|
||||
"prepack": "npm run build",
|
||||
"pack": "npm pack 2>&1",
|
||||
"extract-api": "dev-tool run extract-api",
|
||||
"lint": "echo skipped",
|
||||
"clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
|
||||
"build:node": "echo skipped",
|
||||
"build:browser": "echo skipped",
|
||||
"build:test": "echo skipped",
|
||||
"build:samples": "echo skipped.",
|
||||
"check-format": "echo skipped",
|
||||
"execute:samples": "echo skipped",
|
||||
"format": "echo skipped",
|
||||
"test": "npm run integration-test",
|
||||
"test:browser": "echo skipped",
|
||||
"test:node": "echo skipped",
|
||||
"test:browser": "echo skipped",
|
||||
"unit-test": "npm run unit-test:node && npm run unit-test:browser",
|
||||
"unit-test:browser": "echo skipped",
|
||||
"unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
|
||||
"update-snippets": "echo skipped"
|
||||
"unit-test:browser": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
|
||||
"integration-test:browser": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"//metadata": {
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
AppResiliency,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update container app resiliency policy.
|
||||
*
|
||||
* @summary Create or update container app resiliency policy.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateAppResiliency() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const appName = "testcontainerApp0";
|
||||
const name = "resiliency-policy-1";
|
||||
const resiliencyEnvelope: AppResiliency = {
|
||||
circuitBreakerPolicy: {
|
||||
consecutiveErrors: 5,
|
||||
intervalInSeconds: 10,
|
||||
maxEjectionPercent: 50,
|
||||
},
|
||||
httpConnectionPool: {
|
||||
http1MaxPendingRequests: 1024,
|
||||
http2MaxRequests: 1024,
|
||||
},
|
||||
httpRetryPolicy: {
|
||||
errors: [
|
||||
"5xx",
|
||||
"connect-failure",
|
||||
"reset",
|
||||
"retriable-headers",
|
||||
"retriable-status-codes",
|
||||
],
|
||||
headers: [{ header: "X-Content-Type", prefixMatch: "GOATS" }],
|
||||
httpStatusCodes: [502, 503],
|
||||
initialDelayInMilliseconds: 1000,
|
||||
maxIntervalInMilliseconds: 10000,
|
||||
maxRetries: 5,
|
||||
},
|
||||
tcpConnectionPool: { maxConnections: 100 },
|
||||
tcpRetryPolicy: { maxConnectAttempts: 3 },
|
||||
timeoutPolicy: {
|
||||
connectionTimeoutInSeconds: 5,
|
||||
responseTimeoutInSeconds: 15,
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.appResiliencyOperations.createOrUpdate(
|
||||
resourceGroupName,
|
||||
appName,
|
||||
name,
|
||||
resiliencyEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateAppResiliency();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete container app resiliency policy.
|
||||
*
|
||||
* @summary Delete container app resiliency policy.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Delete.json
|
||||
*/
|
||||
async function deleteAppResiliency() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const appName = "testcontainerApp0";
|
||||
const name = "resiliency-policy-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.appResiliencyOperations.delete(
|
||||
resourceGroupName,
|
||||
appName,
|
||||
name,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteAppResiliency();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get container app resiliency policy.
|
||||
*
|
||||
* @summary Get container app resiliency policy.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Get.json
|
||||
*/
|
||||
async function getAppResiliency() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const appName = "testcontainerApp0";
|
||||
const name = "resiliency-policy-1";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.appResiliencyOperations.get(
|
||||
resourceGroupName,
|
||||
appName,
|
||||
name,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getAppResiliency();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List container app resiliency policies.
|
||||
*
|
||||
* @summary List container app resiliency policies.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_List.json
|
||||
*/
|
||||
async function listAppResiliency() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const appName = "testcontainerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.appResiliencyOperations.list(
|
||||
resourceGroupName,
|
||||
appName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listAppResiliency();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -9,8 +9,7 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
Certificate,
|
||||
CertificatesCreateOrUpdateOptionalParams,
|
||||
AppResiliency,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
@ -19,42 +18,37 @@ import * as dotenv from "dotenv";
|
|||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or Update a Certificate.
|
||||
* This sample demonstrates how to Update container app resiliency policy.
|
||||
*
|
||||
* @summary Create or Update a Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_CreateOrUpdate.json
|
||||
* @summary Update container app resiliency policy.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AppResiliency_Patch.json
|
||||
*/
|
||||
async function createOrUpdateCertificate() {
|
||||
async function updateAppResiliency() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "testcontainerenv";
|
||||
const certificateName = "certificate-firendly-name";
|
||||
const certificateEnvelope: Certificate = {
|
||||
location: "East US",
|
||||
properties: {
|
||||
password: "private key password",
|
||||
value: Buffer.from("Y2VydA=="),
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const appName = "testcontainerApp0";
|
||||
const name = "resiliency-policy-1";
|
||||
const resiliencyEnvelope: AppResiliency = {
|
||||
timeoutPolicy: {
|
||||
connectionTimeoutInSeconds: 40,
|
||||
responseTimeoutInSeconds: 30,
|
||||
},
|
||||
};
|
||||
const options: CertificatesCreateOrUpdateOptionalParams = {
|
||||
certificateEnvelope,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.certificates.createOrUpdate(
|
||||
const result = await client.appResiliencyOperations.update(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
certificateName,
|
||||
options,
|
||||
appName,
|
||||
name,
|
||||
resiliencyEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateCertificate();
|
||||
updateAppResiliency();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get all available workload profiles for a location.
|
||||
*
|
||||
* @summary Get all available workload profiles for a location.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AvailableWorkloadProfiles_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AvailableWorkloadProfiles_Get.json
|
||||
*/
|
||||
async function billingMetersGet() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get all billingMeters for a location.
|
||||
*
|
||||
* @summary Get all billingMeters for a location.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/BillingMeters_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/BillingMeters_Get.json
|
||||
*/
|
||||
async function billingMetersGet() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Gets the token used to connect to the endpoint where source code can be uploaded for a build.
|
||||
*
|
||||
* @summary Gets the token used to connect to the endpoint where source code can be uploaded for a build.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListAuthToken.json
|
||||
*/
|
||||
async function getBuildAuthToken() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const buildName = "testBuild";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.buildAuthToken.list(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
buildName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getBuildAuthToken();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
BuilderResource,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a BuilderResource
|
||||
*
|
||||
* @summary Create or update a BuilderResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_CreateOrUpdate.json
|
||||
*/
|
||||
async function buildersCreateOrUpdate0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const builderEnvelope: BuilderResource = {
|
||||
containerRegistries: [
|
||||
{
|
||||
containerRegistryServer: "test.azurecr.io",
|
||||
identityResourceId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1",
|
||||
},
|
||||
{
|
||||
containerRegistryServer: "test2.azurecr.io",
|
||||
identityResourceId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1",
|
||||
},
|
||||
],
|
||||
environmentId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv",
|
||||
identity: {
|
||||
type: "SystemAssigned,UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/00000000000000000000000000000000/resourceGroups/rg1/providers/MicrosoftManagedIdentity/userAssignedIdentities/identity1":
|
||||
{},
|
||||
},
|
||||
},
|
||||
location: "eastus",
|
||||
tags: { company: "Microsoft" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builders.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
builderEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersCreateOrUpdate0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a BuilderResource
|
||||
*
|
||||
* @summary Delete a BuilderResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Delete.json
|
||||
*/
|
||||
async function buildersDelete0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builders.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersDelete0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a BuilderResource
|
||||
*
|
||||
* @summary Get a BuilderResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Get.json
|
||||
*/
|
||||
async function buildersGet0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builders.get(resourceGroupName, builderName);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersGet0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List BuilderResource resources by resource group
|
||||
*
|
||||
* @summary List BuilderResource resources by resource group
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListByResourceGroup.json
|
||||
*/
|
||||
async function buildersListByResourceGroup0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.builders.listByResourceGroup(
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersListByResourceGroup0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List BuilderResource resources by subscription ID
|
||||
*
|
||||
* @summary List BuilderResource resources by subscription ID
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_ListBySubscription.json
|
||||
*/
|
||||
async function buildersListBySubscription0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.builders.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersListBySubscription0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
BuilderResourceUpdate,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Update a BuilderResource
|
||||
*
|
||||
* @summary Update a BuilderResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builders_Update.json
|
||||
*/
|
||||
async function buildersUpdate0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const builderEnvelope: BuilderResourceUpdate = {
|
||||
tags: { mytag1: "myvalue1" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builders.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
builderEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildersUpdate0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List BuildResource resources by BuilderResource
|
||||
*
|
||||
* @summary List BuildResource resources by BuilderResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_ListByBuilderResource.json
|
||||
*/
|
||||
async function buildsListByBuilderResource0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.buildsByBuilderResource.list(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildsListByBuilderResource0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,109 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
BuildResource,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a BuildResource
|
||||
*
|
||||
* @summary Create a BuildResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json
|
||||
*/
|
||||
async function buildsCreateOrUpdateNoConfig() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const buildName = "testBuild";
|
||||
const buildEnvelope: BuildResource = {};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builds.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
buildName,
|
||||
buildEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create a BuildResource
|
||||
*
|
||||
* @summary Create a BuildResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_CreateOrUpdate.json
|
||||
*/
|
||||
async function buildsCreateOrUpdateWithConfig() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const buildName = "testBuild-123456789az";
|
||||
const buildEnvelope: BuildResource = {
|
||||
configuration: {
|
||||
baseOs: "DebianBullseye",
|
||||
environmentVariables: [
|
||||
{ name: "foo1", value: "bar1" },
|
||||
{ name: "foo2", value: "bar2" },
|
||||
],
|
||||
platform: "dotnetcore",
|
||||
platformVersion: "7.0",
|
||||
preBuildSteps: [
|
||||
{
|
||||
description: "First pre build step.",
|
||||
httpGet: {
|
||||
fileName: "output.txt",
|
||||
headers: ["foo", "bar"],
|
||||
url: "https://microsoft.com",
|
||||
},
|
||||
scripts: ["echo 'hello'", "echo 'world'"],
|
||||
},
|
||||
{
|
||||
description: "Second pre build step.",
|
||||
httpGet: {
|
||||
fileName: "output.txt",
|
||||
headers: ["foo"],
|
||||
url: "https://microsoft.com",
|
||||
},
|
||||
scripts: ["echo 'hello'", "echo 'again'"],
|
||||
},
|
||||
],
|
||||
},
|
||||
destinationContainerRegistry: {
|
||||
image: "test.azurecr.io/repo:tag",
|
||||
server: "test.azurecr.io",
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builds.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
buildName,
|
||||
buildEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildsCreateOrUpdateNoConfig();
|
||||
buildsCreateOrUpdateWithConfig();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a BuildResource
|
||||
*
|
||||
* @summary Delete a BuildResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Delete.json
|
||||
*/
|
||||
async function buildsDelete0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const buildName = "testBuild";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builds.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
buildName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildsDelete0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a BuildResource
|
||||
*
|
||||
* @summary Get a BuildResource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Builds_Get.json
|
||||
*/
|
||||
async function buildsGet0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const builderName = "testBuilder";
|
||||
const buildName = "testBuild";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.builds.get(
|
||||
resourceGroupName,
|
||||
builderName,
|
||||
buildName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
buildsGet0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -22,7 +22,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or Update a Certificate.
|
||||
*
|
||||
* @summary Create or Update a Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateCertificate() {
|
||||
const subscriptionId =
|
||||
|
@ -35,6 +35,7 @@ async function createOrUpdateCertificate() {
|
|||
const certificateEnvelope: Certificate = {
|
||||
location: "East US",
|
||||
properties: {
|
||||
certificateType: "ImagePullTrustedCA",
|
||||
password: "private key password",
|
||||
value: Buffer.from("Y2VydA=="),
|
||||
},
|
||||
|
@ -53,8 +54,48 @@ async function createOrUpdateCertificate() {
|
|||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or Update a Certificate.
|
||||
*
|
||||
* @summary Create or Update a Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.json
|
||||
*/
|
||||
async function createOrUpdateCertificateUsingManagedIdentity() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "testcontainerenv";
|
||||
const certificateName = "certificate-firendly-name";
|
||||
const certificateEnvelope: Certificate = {
|
||||
location: "East US",
|
||||
properties: {
|
||||
certificateKeyVaultProperties: {
|
||||
identity:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi",
|
||||
keyVaultUrl: "https://xxxxxxxx.vault.azure.net/certificates/certName",
|
||||
},
|
||||
certificateType: "ServerSSLCertificate",
|
||||
},
|
||||
};
|
||||
const options: CertificatesCreateOrUpdateOptionalParams = {
|
||||
certificateEnvelope,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.certificates.createOrUpdate(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
certificateName,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateCertificate();
|
||||
createOrUpdateCertificateUsingManagedIdentity();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes the specified Certificate.
|
||||
*
|
||||
* @summary Deletes the specified Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Delete.json
|
||||
*/
|
||||
async function deleteCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the specified Certificate.
|
||||
*
|
||||
* @summary Get the specified Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificate_Get.json
|
||||
*/
|
||||
async function getCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Certificates in a given managed environment.
|
||||
*
|
||||
* @summary Get the Certificates in a given managed environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_ListByManagedEnvironment.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificates_ListByManagedEnvironment.json
|
||||
*/
|
||||
async function listCertificatesByManagedEnvironment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported
|
||||
*
|
||||
* @summary Patches a certificate. Currently only patching of tags is supported
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_Patch.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Certificates_Patch.json
|
||||
*/
|
||||
async function patchCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -22,7 +22,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or Update a Certificate.
|
||||
*
|
||||
* @summary Create or Update a Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deletes the specified Certificate.
|
||||
*
|
||||
* @summary Deletes the specified Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificate_Delete.json
|
||||
*/
|
||||
async function deleteCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the specified Certificate.
|
||||
*
|
||||
* @summary Get the specified Certificate.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json
|
||||
*/
|
||||
async function getCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Certificates in a given connected environment.
|
||||
*
|
||||
* @summary Get the Certificates in a given connected environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json
|
||||
*/
|
||||
async function listCertificatesByConnectedEnvironment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Patches a certificate. Currently only patching of tags is supported
|
||||
*
|
||||
* @summary Patches a certificate. Currently only patching of tags is supported
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificates_Patch.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificates_Patch.json
|
||||
*/
|
||||
async function patchCertificate() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Checks if resource connectedEnvironmentName is available.
|
||||
*
|
||||
* @summary Checks if resource connectedEnvironmentName is available.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json
|
||||
*/
|
||||
async function certificatesCheckNameAvailability() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates an connectedEnvironment.
|
||||
*
|
||||
* @summary Creates or updates an connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_CreateOrUpdate.json
|
||||
*/
|
||||
async function createKubeEnvironments() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a Dapr Component in a connected environment.
|
||||
*
|
||||
* @summary Creates or updates a Dapr Component in a connected environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponent() {
|
||||
const subscriptionId =
|
||||
|
@ -43,6 +43,14 @@ async function createOrUpdateDaprComponent() {
|
|||
],
|
||||
scopes: ["container-app-1", "container-app-2"],
|
||||
secrets: [{ name: "masterkey", value: "keyvalue" }],
|
||||
serviceComponentBind: [
|
||||
{
|
||||
name: "statestore",
|
||||
metadata: { name: "daprcomponentBind", value: "redis-bind" },
|
||||
serviceId:
|
||||
"/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
|
||||
},
|
||||
],
|
||||
version: "v1",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Dapr Component from a connected environment.
|
||||
*
|
||||
* @summary Delete a Dapr Component from a connected environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json
|
||||
*/
|
||||
async function deleteDaprComponent() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a dapr component.
|
||||
*
|
||||
* @summary Get a dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json
|
||||
*/
|
||||
async function getDaprComponent() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Dapr Components for a connected environment.
|
||||
*
|
||||
* @summary Get the Dapr Components for a connected environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsDaprComponents_List.json
|
||||
*/
|
||||
async function listDaprComponents() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List secrets for a dapr component
|
||||
*
|
||||
* @summary List secrets for a dapr component
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json
|
||||
*/
|
||||
async function listContainerAppsSecrets() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete an connectedEnvironment.
|
||||
*
|
||||
* @summary Delete an connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Delete.json
|
||||
*/
|
||||
async function deleteConnectedEnvironmentByConnectedEnvironmentName() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the properties of an connectedEnvironment.
|
||||
*
|
||||
* @summary Get the properties of an connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Get.json
|
||||
*/
|
||||
async function getConnectedEnvironmentByConnectedEnvironmentName() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get all connectedEnvironments in a resource group.
|
||||
*
|
||||
* @summary Get all connectedEnvironments in a resource group.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_ListByResourceGroup.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_ListByResourceGroup.json
|
||||
*/
|
||||
async function listEnvironmentsByResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get all connectedEnvironments for a subscription.
|
||||
*
|
||||
* @summary Get all connectedEnvironments for a subscription.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_ListBySubscription.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_ListBySubscription.json
|
||||
*/
|
||||
async function listConnectedEnvironmentsBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update storage for a connectedEnvironment.
|
||||
*
|
||||
* @summary Create or update storage for a connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateEnvironmentsStorage() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete storage for a connectedEnvironment.
|
||||
*
|
||||
* @summary Delete storage for a connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsStorages_Delete.json
|
||||
*/
|
||||
async function listEnvironmentsStoragesBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get storage for a connectedEnvironment.
|
||||
*
|
||||
* @summary Get storage for a connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsStorages_Get.json
|
||||
*/
|
||||
async function getAEnvironmentsStoragePropertiesBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get all storages for a connectedEnvironment.
|
||||
*
|
||||
* @summary Get all storages for a connectedEnvironment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironmentsStorages_List.json
|
||||
*/
|
||||
async function listEnvironmentsStoragesBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Patches a Managed Environment. Only patching of tags is supported currently
|
||||
*
|
||||
* @summary Patches a Managed Environment. Only patching of tags is supported currently
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Patch.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ConnectedEnvironments_Patch.json
|
||||
*/
|
||||
async function patchManagedEnvironment() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update the AuthConfig for a Container App.
|
||||
*
|
||||
* @summary Create or update the AuthConfig for a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateContainerAppAuthConfig() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Container App AuthConfig.
|
||||
*
|
||||
* @summary Delete a Container App AuthConfig.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Delete.json
|
||||
*/
|
||||
async function deleteContainerAppAuthConfig() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a AuthConfig of a Container App.
|
||||
*
|
||||
* @summary Get a AuthConfig of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_Get.json
|
||||
*/
|
||||
async function getContainerAppAuthConfig() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Container App AuthConfigs in a given resource group.
|
||||
*
|
||||
* @summary Get the Container App AuthConfigs in a given resource group.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_ListByContainer.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/AuthConfigs_ListByContainer.json
|
||||
*/
|
||||
async function listAuthConfigsByContainerApps() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Container Apps Build resources by Container App
|
||||
*
|
||||
* @summary List Container Apps Build resources by Container App
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_ListByContainerApp.json
|
||||
*/
|
||||
async function containerAppsBuildsListByContainerApp0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testCapp";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.containerAppsBuildsByContainerApp.list(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsBuildsListByContainerApp0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a Container Apps Build resource
|
||||
*
|
||||
* @summary Delete a Container Apps Build resource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Delete.json
|
||||
*/
|
||||
async function containerAppsBuildsDelete0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testCapp";
|
||||
const buildName = "testBuild";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsBuilds.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
buildName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsBuildsDelete0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Container Apps Build resource
|
||||
*
|
||||
* @summary Get a Container Apps Build resource
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsBuilds_Get.json
|
||||
*/
|
||||
async function containerAppsBuildsGet0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testCapp";
|
||||
const buildName = "testBuild";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsBuilds.get(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
buildName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsBuildsGet0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,14 +18,501 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Kind_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateAppKind() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerAppKind";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
activeRevisionsMode: "Single",
|
||||
ingress: { allowInsecure: true, external: true, targetPort: 80 },
|
||||
},
|
||||
kind: "workflowapp",
|
||||
location: "East Us",
|
||||
managedBy:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind",
|
||||
managedEnvironmentId:
|
||||
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3",
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "logicapps-container",
|
||||
image: "default/logicapps-base:latest",
|
||||
resources: { cpu: 1, memory: "2.0Gi" },
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 30,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
containerAppEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.json
|
||||
*/
|
||||
async function createOrUpdateAppOnAConnectedEnvironment() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
dapr: {
|
||||
appPort: 3000,
|
||||
appProtocol: "http",
|
||||
enableApiLogging: true,
|
||||
enabled: true,
|
||||
httpMaxRequestSize: 10,
|
||||
httpReadBufferSize: 30,
|
||||
logLevel: "debug",
|
||||
},
|
||||
ingress: {
|
||||
additionalPortMappings: [
|
||||
{ external: true, targetPort: 1234 },
|
||||
{ exposedPort: 3456, external: false, targetPort: 2345 },
|
||||
],
|
||||
clientCertificateMode: "accept",
|
||||
corsPolicy: {
|
||||
allowCredentials: true,
|
||||
allowedHeaders: ["HEADER1", "HEADER2"],
|
||||
allowedMethods: ["GET", "POST"],
|
||||
allowedOrigins: ["https://a.test.com", "https://b.test.com"],
|
||||
exposeHeaders: ["HEADER3", "HEADER4"],
|
||||
maxAge: 1234,
|
||||
},
|
||||
customDomains: [
|
||||
{
|
||||
name: "www.my-name.com",
|
||||
bindingType: "SniEnabled",
|
||||
certificateId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com",
|
||||
},
|
||||
{
|
||||
name: "www.my-other-name.com",
|
||||
bindingType: "SniEnabled",
|
||||
certificateId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com",
|
||||
},
|
||||
],
|
||||
external: true,
|
||||
ipSecurityRestrictions: [
|
||||
{
|
||||
name: "Allow work IP A subnet",
|
||||
description:
|
||||
"Allowing all IP's within the subnet below to access containerapp",
|
||||
action: "Allow",
|
||||
ipAddressRange: "192.168.1.1/32",
|
||||
},
|
||||
{
|
||||
name: "Allow work IP B subnet",
|
||||
description:
|
||||
"Allowing all IP's within the subnet below to access containerapp",
|
||||
action: "Allow",
|
||||
ipAddressRange: "192.168.1.1/8",
|
||||
},
|
||||
],
|
||||
stickySessions: { affinity: "sticky" },
|
||||
targetPort: 3000,
|
||||
traffic: [
|
||||
{
|
||||
label: "production",
|
||||
revisionName: "testcontainerApp0-ab1234",
|
||||
weight: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
maxInactiveRevisions: 10,
|
||||
runtime: {
|
||||
dotnet: { autoConfigureDataProtection: true },
|
||||
java: {
|
||||
enableMetrics: true,
|
||||
javaAgent: {
|
||||
enabled: true,
|
||||
logging: {
|
||||
loggerSettings: [
|
||||
{ level: "debug", logger: "org.springframework.boot" },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube",
|
||||
extendedLocation: {
|
||||
name: "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation",
|
||||
type: "CustomLocation",
|
||||
},
|
||||
location: "East US",
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerApp0",
|
||||
image: "repo/testcontainerApp0:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
httpGet: {
|
||||
path: "/health",
|
||||
httpHeaders: [{ name: "Custom-Header", value: "Awesome" }],
|
||||
port: 8080,
|
||||
},
|
||||
initialDelaySeconds: 3,
|
||||
periodSeconds: 3,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
initContainers: [
|
||||
{
|
||||
name: "testinitcontainerApp0",
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"],
|
||||
command: ["/bin/sh"],
|
||||
image: "repo/testcontainerApp0:v4",
|
||||
resources: { cpu: 0.2, memory: "100Mi" },
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "httpscalingrule",
|
||||
custom: { type: "http", metadata: { concurrentRequests: "50" } },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
containerAppEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
dapr: {
|
||||
appPort: 3000,
|
||||
appProtocol: "http",
|
||||
enableApiLogging: true,
|
||||
enabled: true,
|
||||
httpMaxRequestSize: 10,
|
||||
httpReadBufferSize: 30,
|
||||
logLevel: "debug",
|
||||
},
|
||||
identitySettings: [
|
||||
{
|
||||
identity:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
|
||||
lifecycle: "All",
|
||||
},
|
||||
{ identity: "system", lifecycle: "Init" },
|
||||
],
|
||||
ingress: {
|
||||
additionalPortMappings: [
|
||||
{ external: true, targetPort: 1234 },
|
||||
{ exposedPort: 3456, external: false, targetPort: 2345 },
|
||||
],
|
||||
clientCertificateMode: "accept",
|
||||
corsPolicy: {
|
||||
allowCredentials: true,
|
||||
allowedHeaders: ["HEADER1", "HEADER2"],
|
||||
allowedMethods: ["GET", "POST"],
|
||||
allowedOrigins: ["https://a.test.com", "https://b.test.com"],
|
||||
exposeHeaders: ["HEADER3", "HEADER4"],
|
||||
maxAge: 1234,
|
||||
},
|
||||
customDomains: [
|
||||
{
|
||||
name: "www.my-name.com",
|
||||
bindingType: "SniEnabled",
|
||||
certificateId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com",
|
||||
},
|
||||
{
|
||||
name: "www.my-other-name.com",
|
||||
bindingType: "SniEnabled",
|
||||
certificateId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com",
|
||||
},
|
||||
],
|
||||
external: true,
|
||||
ipSecurityRestrictions: [
|
||||
{
|
||||
name: "Allow work IP A subnet",
|
||||
description:
|
||||
"Allowing all IP's within the subnet below to access containerapp",
|
||||
action: "Allow",
|
||||
ipAddressRange: "192.168.1.1/32",
|
||||
},
|
||||
{
|
||||
name: "Allow work IP B subnet",
|
||||
description:
|
||||
"Allowing all IP's within the subnet below to access containerapp",
|
||||
action: "Allow",
|
||||
ipAddressRange: "192.168.1.1/8",
|
||||
},
|
||||
],
|
||||
stickySessions: { affinity: "sticky" },
|
||||
targetPort: 3000,
|
||||
traffic: [
|
||||
{
|
||||
label: "production",
|
||||
revisionName: "testcontainerApp0-ab1234",
|
||||
weight: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
maxInactiveRevisions: 10,
|
||||
runtime: {
|
||||
dotnet: { autoConfigureDataProtection: true },
|
||||
java: {
|
||||
enableMetrics: true,
|
||||
javaAgent: {
|
||||
enabled: true,
|
||||
logging: {
|
||||
loggerSettings: [
|
||||
{ level: "debug", logger: "org.springframework.boot" },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
service: { type: "redis" },
|
||||
},
|
||||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
|
||||
identity: {
|
||||
type: "SystemAssigned,UserAssigned",
|
||||
userAssignedIdentities: {
|
||||
"/subscriptions/34adfa4fCedf4dc0Ba29B6d1a69ab345/resourcegroups/rg/providers/MicrosoftManagedIdentity/userAssignedIdentities/myidentity":
|
||||
{},
|
||||
},
|
||||
},
|
||||
location: "East US",
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerApp0",
|
||||
image: "repo/testcontainerApp0:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
httpGet: {
|
||||
path: "/health",
|
||||
httpHeaders: [{ name: "Custom-Header", value: "Awesome" }],
|
||||
port: 8080,
|
||||
},
|
||||
initialDelaySeconds: 3,
|
||||
periodSeconds: 3,
|
||||
},
|
||||
],
|
||||
volumeMounts: [
|
||||
{
|
||||
mountPath: "/mnt/path1",
|
||||
subPath: "subPath1",
|
||||
volumeName: "azurefile",
|
||||
},
|
||||
{
|
||||
mountPath: "/mnt/path2",
|
||||
subPath: "subPath2",
|
||||
volumeName: "nfsazurefile",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
initContainers: [
|
||||
{
|
||||
name: "testinitcontainerApp0",
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"],
|
||||
command: ["/bin/sh"],
|
||||
image: "repo/testcontainerApp0:v4",
|
||||
resources: { cpu: 0.2, memory: "100Mi" },
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "httpscalingrule",
|
||||
custom: { type: "http", metadata: { concurrentRequests: "50" } },
|
||||
},
|
||||
{
|
||||
name: "servicebus",
|
||||
custom: {
|
||||
type: "azure-servicebus",
|
||||
identity:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
|
||||
metadata: {
|
||||
messageCount: "5",
|
||||
namespace: "mynamespace",
|
||||
queueName: "myqueue",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "azure-queue",
|
||||
azureQueue: {
|
||||
accountName: "account1",
|
||||
identity: "system",
|
||||
queueLength: 1,
|
||||
queueName: "queue1",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
serviceBinds: [
|
||||
{
|
||||
name: "redisService",
|
||||
clientType: "dotnet",
|
||||
customizedKeys: { desiredKey: "defaultKey" },
|
||||
serviceId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService",
|
||||
},
|
||||
],
|
||||
volumes: [
|
||||
{ name: "azurefile", storageName: "storage", storageType: "AzureFile" },
|
||||
{
|
||||
name: "nfsazurefile",
|
||||
storageName: "nfsStorage",
|
||||
storageType: "NfsAzureFile",
|
||||
},
|
||||
],
|
||||
},
|
||||
workloadProfileName: "My-GP-01",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
containerAppEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateManagedByApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerAppManagedBy";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
ingress: {
|
||||
exposedPort: 4000,
|
||||
external: true,
|
||||
targetPort: 3000,
|
||||
traffic: [
|
||||
{ revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 },
|
||||
],
|
||||
transport: "tcp",
|
||||
},
|
||||
},
|
||||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
|
||||
location: "East US",
|
||||
managedBy:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp",
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerAppManagedBy",
|
||||
image: "repo/testcontainerAppManagedBy:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
initialDelaySeconds: 3,
|
||||
periodSeconds: 3,
|
||||
tcpSocket: { port: 8080 },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "tcpscalingrule",
|
||||
tcp: { metadata: { concurrentConnections: "50" } },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
containerAppEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_SourceToCloudApp_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateSourceToCloudApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
dapr: {
|
||||
|
@ -87,7 +574,7 @@ async function createOrUpdateContainerApp() {
|
|||
traffic: [
|
||||
{
|
||||
label: "production",
|
||||
revisionName: "testcontainerapp0-ab1234",
|
||||
revisionName: "testcontainerApp0-ab1234",
|
||||
weight: 100,
|
||||
},
|
||||
],
|
||||
|
@ -98,11 +585,13 @@ async function createOrUpdateContainerApp() {
|
|||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
|
||||
location: "East US",
|
||||
patchingConfiguration: { patchingMode: "Automatic" },
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerapp0",
|
||||
image: "repo/testcontainerapp0:v1",
|
||||
name: "testcontainerApp0",
|
||||
image: "",
|
||||
imageType: "CloudBuild",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
|
@ -115,6 +604,18 @@ async function createOrUpdateContainerApp() {
|
|||
periodSeconds: 3,
|
||||
},
|
||||
],
|
||||
volumeMounts: [
|
||||
{
|
||||
mountPath: "/mnt/path1",
|
||||
subPath: "subPath1",
|
||||
volumeName: "azurefile",
|
||||
},
|
||||
{
|
||||
mountPath: "/mnt/path2",
|
||||
subPath: "subPath2",
|
||||
volumeName: "nfsazurefile",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
initContainers: [
|
||||
|
@ -122,13 +623,15 @@ async function createOrUpdateContainerApp() {
|
|||
name: "testinitcontainerApp0",
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"],
|
||||
command: ["/bin/sh"],
|
||||
image: "repo/testcontainerapp0:v4",
|
||||
resources: { cpu: 0.5, memory: "1Gi" },
|
||||
image: "repo/testcontainerApp0:v4",
|
||||
resources: { cpu: 0.2, memory: "100Mi" },
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "httpscalingrule",
|
||||
|
@ -139,10 +642,20 @@ async function createOrUpdateContainerApp() {
|
|||
serviceBinds: [
|
||||
{
|
||||
name: "redisService",
|
||||
clientType: "dotnet",
|
||||
customizedKeys: { desiredKey: "defaultKey" },
|
||||
serviceId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService",
|
||||
},
|
||||
],
|
||||
volumes: [
|
||||
{ name: "azurefile", storageName: "storage", storageType: "AzureFile" },
|
||||
{
|
||||
name: "nfsazurefile",
|
||||
storageName: "nfsStorage",
|
||||
storageType: "NfsAzureFile",
|
||||
},
|
||||
],
|
||||
},
|
||||
workloadProfileName: "My-GP-01",
|
||||
};
|
||||
|
@ -160,87 +673,21 @@ async function createOrUpdateContainerApp() {
|
|||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateManagedByApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerappmanagedby";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
ingress: {
|
||||
exposedPort: 4000,
|
||||
external: true,
|
||||
targetPort: 3000,
|
||||
traffic: [
|
||||
{ revisionName: "testcontainerappmanagedby-ab1234", weight: 100 },
|
||||
],
|
||||
transport: "tcp",
|
||||
},
|
||||
},
|
||||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
|
||||
location: "East US",
|
||||
managedBy:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp",
|
||||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerappmanagedby",
|
||||
image: "repo/testcontainerappmanagedby:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
initialDelaySeconds: 3,
|
||||
periodSeconds: 3,
|
||||
tcpSocket: { port: 8080 },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
rules: [
|
||||
{
|
||||
name: "tcpscalingrule",
|
||||
tcp: { metadata: { concurrentConnections: "50" } },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
containerAppEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a Container App.
|
||||
*
|
||||
* @summary Create or update a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateTcpApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapptcp";
|
||||
const containerAppName = "testcontainerAppTcp";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
ingress: {
|
||||
exposedPort: 4000,
|
||||
external: true,
|
||||
targetPort: 3000,
|
||||
traffic: [{ revisionName: "testcontainerapptcp-ab1234", weight: 100 }],
|
||||
traffic: [{ revisionName: "testcontainerAppTcp-ab1234", weight: 100 }],
|
||||
transport: "tcp",
|
||||
},
|
||||
},
|
||||
|
@ -250,8 +697,8 @@ async function createOrUpdateTcpApp() {
|
|||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerapptcp",
|
||||
image: "repo/testcontainerapptcp:v1",
|
||||
name: "testcontainerAppTcp",
|
||||
image: "repo/testcontainerAppTcp:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
|
@ -263,8 +710,10 @@ async function createOrUpdateTcpApp() {
|
|||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "tcpscalingrule",
|
||||
|
@ -285,8 +734,11 @@ async function createOrUpdateTcpApp() {
|
|||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateAppKind();
|
||||
createOrUpdateAppOnAConnectedEnvironment();
|
||||
createOrUpdateContainerApp();
|
||||
createOrUpdateManagedByApp();
|
||||
createOrUpdateSourceToCloudApp();
|
||||
createOrUpdateTcpApp();
|
||||
}
|
||||
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Container App.
|
||||
*
|
||||
* @summary Delete a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Delete.json
|
||||
*/
|
||||
async function deleteContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testworkerapp0";
|
||||
const containerAppName = "testWorkerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginDeleteAndWait(
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a diagnostics result of a Container App.
|
||||
*
|
||||
* @summary Get a diagnostics result of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerAppsDiagnostics_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_Get.json
|
||||
*/
|
||||
async function getContainerAppDiagnosticsInfo() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a revision of a Container App.
|
||||
*
|
||||
* @summary Get a revision of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json
|
||||
*/
|
||||
async function getContainerAppRevision() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the properties of a Container App.
|
||||
*
|
||||
* @summary Get the properties of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json
|
||||
*/
|
||||
async function getContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsDiagnostics.getRoot(
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the list of diagnostics for a given Container App.
|
||||
*
|
||||
* @summary Get the list of diagnostics for a given Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerAppsDiagnostics_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsDiagnostics_List.json
|
||||
*/
|
||||
async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Revisions for a given Container App.
|
||||
*
|
||||
* @summary Get the Revisions for a given Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json
|
||||
*/
|
||||
async function listContainerAppRevisions() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get auth token for a container app
|
||||
*
|
||||
* @summary Get auth token for a container app
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_GetAuthToken.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_GetAuthToken.json
|
||||
*/
|
||||
async function getContainerAppAuthToken() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"651f8027-33e8-4ec4-97b4-f6e9f3dc8744";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.getAuthToken(
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the properties of a Container App.
|
||||
*
|
||||
* @summary Get the properties of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Get.json
|
||||
*/
|
||||
async function getContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.get(
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Container Apps in a given resource group.
|
||||
*
|
||||
* @summary Get the Container Apps in a given resource group.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListByResourceGroup.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListByResourceGroup.json
|
||||
*/
|
||||
async function listContainerAppsByResourceGroup() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Container Apps in a given subscription.
|
||||
*
|
||||
* @summary Get the Container Apps in a given subscription.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListBySubscription.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListBySubscription.json
|
||||
*/
|
||||
async function listContainerAppsBySubscription() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -21,14 +21,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Analyzes a custom hostname for a Container App
|
||||
*
|
||||
* @summary Analyzes a custom hostname for a Container App
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json
|
||||
*/
|
||||
async function analyzeCustomHostname() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const customHostname = "my.name.corp";
|
||||
const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = {
|
||||
customHostname,
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to List secrets for a container app
|
||||
*
|
||||
* @summary List secrets for a container app
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListSecrets.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_ListSecrets.json
|
||||
*/
|
||||
async function listContainerAppsSecrets() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.listSecrets(
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Apply a Container Apps Patch resource with patch name.
|
||||
*
|
||||
* @summary Apply a Container Apps Patch resource with patch name.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Apply.json
|
||||
*/
|
||||
async function containerAppsPatchesApply0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "test-app";
|
||||
const patchName = "testPatch-25fe4b";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsPatches.beginApplyAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
patchName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsPatchesApply0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete specific Container Apps Patch by patch name.
|
||||
*
|
||||
* @summary Delete specific Container Apps Patch by patch name.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Delete.json
|
||||
*/
|
||||
async function containerAppsPatchesDelete0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "test-app";
|
||||
const patchName = "testPatch-25fe4b";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsPatches.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
patchName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsPatchesDelete0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get details for specific Container Apps Patch by patch name.
|
||||
*
|
||||
* @summary Get details for specific Container Apps Patch by patch name.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Get.json
|
||||
*/
|
||||
async function containerAppsPatchesGet0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "test-app";
|
||||
const patchName = "testPatch-25fe4b";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsPatches.get(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
patchName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsPatchesGet0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to List Container Apps Patch resources by ContainerApp.
|
||||
*
|
||||
* @summary List Container Apps Patch resources by ContainerApp.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_ListByContainerApp.json
|
||||
*/
|
||||
async function containerAppsPatchesListByContainerApp0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "test-app";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.containerAppsPatches.listByContainerApp(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsPatchesListByContainerApp0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
PatchSkipConfig,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Configure the Container Apps Patch skip option by patch name.
|
||||
*
|
||||
* @summary Configure the Container Apps Patch skip option by patch name.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerAppsPatches_Skip_Configure.json
|
||||
*/
|
||||
async function containerAppsPatchesSkipConfigure0() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"00000000-0000-0000-0000-000000000000";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "test-app";
|
||||
const patchName = "testPatch-25fe4b";
|
||||
const patchSkipConfig: PatchSkipConfig = { skip: true };
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsPatches.beginSkipConfigureAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
patchName,
|
||||
patchSkipConfig,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
containerAppsPatchesSkipConfigure0();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a replica for a Container App Revision.
|
||||
*
|
||||
* @summary Get a replica for a Container App Revision.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Replicas_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_Get.json
|
||||
*/
|
||||
async function getContainerAppRevisionReplica() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to List replicas for a Container App Revision.
|
||||
*
|
||||
* @summary List replicas for a Container App Revision.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Replicas_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Replicas_List.json
|
||||
*/
|
||||
async function listContainerAppReplicas() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Activates a revision for a Container App
|
||||
*
|
||||
* @summary Activates a revision for a Container App
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_Activate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Activate.json
|
||||
*/
|
||||
async function activateContainerAppRevision() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Deactivates a revision for a Container App
|
||||
*
|
||||
* @summary Deactivates a revision for a Container App
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_Deactivate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Deactivate.json
|
||||
*/
|
||||
async function deactivateContainerAppRevision() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a revision of a Container App.
|
||||
*
|
||||
* @summary Get a revision of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Get.json
|
||||
*/
|
||||
async function getContainerAppRevision() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Revisions for a given Container App.
|
||||
*
|
||||
* @summary Get the Revisions for a given Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_List.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_List.json
|
||||
*/
|
||||
async function listContainerAppRevisions() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Restarts a revision for a Container App
|
||||
*
|
||||
* @summary Restarts a revision for a Container App
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Revisions_Restart.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Revisions_Restart.json
|
||||
*/
|
||||
async function restartContainerAppRevision() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { SessionPool, ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Create or update a session pool with the given properties.
|
||||
*
|
||||
* @summary Create or update a session pool with the given properties.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateSessionPool() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const sessionPoolName = "testsessionpool";
|
||||
const sessionPoolEnvelope: SessionPool = {
|
||||
containerType: "CustomContainer",
|
||||
customContainerTemplate: {
|
||||
containers: [
|
||||
{
|
||||
name: "testinitcontainer",
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"],
|
||||
command: ["/bin/sh"],
|
||||
image: "repo/testcontainer:v4",
|
||||
resources: { cpu: 0.25, memory: "0.5Gi" },
|
||||
},
|
||||
],
|
||||
ingress: { targetPort: 80 },
|
||||
},
|
||||
dynamicPoolConfiguration: {
|
||||
cooldownPeriodInSeconds: 600,
|
||||
executionType: "Timed",
|
||||
},
|
||||
environmentId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
|
||||
location: "East US",
|
||||
poolManagementType: "Dynamic",
|
||||
scaleConfiguration: {
|
||||
maxConcurrentSessions: 500,
|
||||
readySessionInstances: 100,
|
||||
},
|
||||
sessionNetworkConfiguration: { status: "EgressEnabled" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result =
|
||||
await client.containerAppsSessionPools.beginCreateOrUpdateAndWait(
|
||||
resourceGroupName,
|
||||
sessionPoolName,
|
||||
sessionPoolEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateSessionPool();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete the session pool with the given name.
|
||||
*
|
||||
* @summary Delete the session pool with the given name.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Delete.json
|
||||
*/
|
||||
async function deleteSessionPool() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const sessionPoolName = "testsessionpool";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsSessionPools.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
sessionPoolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteSessionPool();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the properties of a session pool.
|
||||
*
|
||||
* @summary Get the properties of a session pool.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Get.json
|
||||
*/
|
||||
async function getSessionPool() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const sessionPoolName = "testsessionpool";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsSessionPools.get(
|
||||
resourceGroupName,
|
||||
sessionPoolName,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getSessionPool();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the session pools in a given resource group of a subscription.
|
||||
*
|
||||
* @summary Get the session pools in a given resource group of a subscription.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_ListByResourceGroup.json
|
||||
*/
|
||||
async function listSessionPoolsByResourceGroup() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.containerAppsSessionPools.listByResourceGroup(
|
||||
resourceGroupName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listSessionPoolsByResourceGroup();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the session pools in a given subscription.
|
||||
*
|
||||
* @summary Get the session pools in a given subscription.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_ListBySubscription.json
|
||||
*/
|
||||
async function listSessionPoolsBySubscription() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.containerAppsSessionPools.listBySubscription()) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listSessionPoolsBySubscription();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
SessionPoolUpdatableProperties,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Patches a session pool using JSON merge patch
|
||||
*
|
||||
* @summary Patches a session pool using JSON merge patch
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SessionPools_Patch.json
|
||||
*/
|
||||
async function updateSessionPool() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const sessionPoolName = "testsessionpool";
|
||||
const sessionPoolEnvelope: SessionPoolUpdatableProperties = {
|
||||
customContainerTemplate: {
|
||||
containers: [
|
||||
{
|
||||
name: "testinitcontainer",
|
||||
args: ["-c", "while true; do echo hello; sleep 10;done"],
|
||||
command: ["/bin/sh"],
|
||||
image: "repo/testcontainer:v4",
|
||||
resources: { cpu: 0.25, memory: "0.5Gi" },
|
||||
},
|
||||
],
|
||||
ingress: { targetPort: 80 },
|
||||
},
|
||||
dynamicPoolConfiguration: {
|
||||
cooldownPeriodInSeconds: 600,
|
||||
executionType: "Timed",
|
||||
},
|
||||
scaleConfiguration: {
|
||||
maxConcurrentSessions: 500,
|
||||
readySessionInstances: 100,
|
||||
},
|
||||
sessionNetworkConfiguration: { status: "EgressEnabled" },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsSessionPools.beginUpdateAndWait(
|
||||
resourceGroupName,
|
||||
sessionPoolName,
|
||||
sessionPoolEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
updateSessionPool();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -10,6 +10,7 @@
|
|||
// Licensed under the MIT License.
|
||||
import {
|
||||
SourceControl,
|
||||
ContainerAppsSourceControlsCreateOrUpdateOptionalParams,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
|
@ -21,7 +22,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Create or update the SourceControl for a Container App.
|
||||
*
|
||||
* @summary Create or update the SourceControl for a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_CreateOrUpdate.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_CreateOrUpdate.json
|
||||
*/
|
||||
async function createOrUpdateContainerAppSourceControl() {
|
||||
const subscriptionId =
|
||||
|
@ -31,6 +32,7 @@ async function createOrUpdateContainerAppSourceControl() {
|
|||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj";
|
||||
const containerAppName = "testcanadacentral";
|
||||
const sourceControlName = "current";
|
||||
const xMsGithubAuxiliary = "githubaccesstoken";
|
||||
const sourceControlEnvelope: SourceControl = {
|
||||
branch: "master",
|
||||
githubActionConfiguration: {
|
||||
|
@ -40,7 +42,12 @@ async function createOrUpdateContainerAppSourceControl() {
|
|||
kind: "feaderated",
|
||||
tenantId: "<tenantid>",
|
||||
},
|
||||
buildEnvironmentVariables: [
|
||||
{ name: "foo1", value: "bar1" },
|
||||
{ name: "foo2", value: "bar2" },
|
||||
],
|
||||
contextPath: "./",
|
||||
dockerfilePath: "./Dockerfile",
|
||||
githubPersonalAccessToken: "test",
|
||||
image: "image/tag",
|
||||
registryInfo: {
|
||||
|
@ -51,6 +58,9 @@ async function createOrUpdateContainerAppSourceControl() {
|
|||
},
|
||||
repoUrl: "https://github.com/xwang971/ghatest",
|
||||
};
|
||||
const options: ContainerAppsSourceControlsCreateOrUpdateOptionalParams = {
|
||||
xMsGithubAuxiliary,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result =
|
||||
|
@ -59,6 +69,7 @@ async function createOrUpdateContainerAppSourceControl() {
|
|||
containerAppName,
|
||||
sourceControlName,
|
||||
sourceControlEnvelope,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import {
|
||||
ContainerAppsSourceControlsDeleteOptionalParams,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
|
@ -18,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Delete a Container App SourceControl.
|
||||
*
|
||||
* @summary Delete a Container App SourceControl.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_Delete.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Delete.json
|
||||
*/
|
||||
async function deleteContainerAppSourceControl() {
|
||||
const subscriptionId =
|
||||
|
@ -28,12 +31,21 @@ async function deleteContainerAppSourceControl() {
|
|||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj";
|
||||
const containerAppName = "testcanadacentral";
|
||||
const sourceControlName = "current";
|
||||
const xMsGithubAuxiliary = "githubaccesstoken";
|
||||
const ignoreWorkflowDeletionFailure = false;
|
||||
const deleteWorkflow = false;
|
||||
const options: ContainerAppsSourceControlsDeleteOptionalParams = {
|
||||
xMsGithubAuxiliary,
|
||||
ignoreWorkflowDeletionFailure,
|
||||
deleteWorkflow,
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerAppsSourceControls.beginDeleteAndWait(
|
||||
resourceGroupName,
|
||||
containerAppName,
|
||||
sourceControlName,
|
||||
options,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get a SourceControl of a Container App.
|
||||
*
|
||||
* @summary Get a SourceControl of a Container App.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_Get.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_Get.json
|
||||
*/
|
||||
async function getContainerAppSourceControl() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,7 +18,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Get the Container App SourceControls in a given resource group.
|
||||
*
|
||||
* @summary Get the Container App SourceControls in a given resource group.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_ListByContainer.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/SourceControls_ListByContainer.json
|
||||
*/
|
||||
async function listAppSourceControls() {
|
||||
const subscriptionId =
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Start a container app
|
||||
*
|
||||
* @summary Start a container app
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Start.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Start.json
|
||||
*/
|
||||
async function startContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testworkerapp0";
|
||||
const containerAppName = "testWorkerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginStartAndWait(
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Stop a container app
|
||||
*
|
||||
* @summary Stop a container app
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Stop.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Stop.json
|
||||
*/
|
||||
async function stopContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testworkerApp0";
|
||||
const containerAppName = "testWorkerApp0";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.containerApps.beginStopAndWait(
|
||||
|
|
|
@ -18,14 +18,14 @@ dotenv.config();
|
|||
* This sample demonstrates how to Patches a Container App using JSON Merge Patch
|
||||
*
|
||||
* @summary Patches a Container App using JSON Merge Patch
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Patch.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/ContainerApps_Patch.json
|
||||
*/
|
||||
async function patchContainerApp() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
|
||||
const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg";
|
||||
const containerAppName = "testcontainerapp0";
|
||||
const containerAppName = "testcontainerApp0";
|
||||
const containerAppEnvelope: ContainerApp = {
|
||||
configuration: {
|
||||
dapr: {
|
||||
|
@ -74,12 +74,26 @@ async function patchContainerApp() {
|
|||
traffic: [
|
||||
{
|
||||
label: "production",
|
||||
revisionName: "testcontainerapp0-ab1234",
|
||||
revisionName: "testcontainerApp0-ab1234",
|
||||
weight: 100,
|
||||
},
|
||||
],
|
||||
},
|
||||
maxInactiveRevisions: 10,
|
||||
runtime: {
|
||||
dotnet: { autoConfigureDataProtection: true },
|
||||
java: {
|
||||
enableMetrics: true,
|
||||
javaAgent: {
|
||||
enabled: true,
|
||||
logging: {
|
||||
loggerSettings: [
|
||||
{ level: "debug", logger: "org.springframework.boot" },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
service: { type: "redis" },
|
||||
},
|
||||
location: "East US",
|
||||
|
@ -87,8 +101,8 @@ async function patchContainerApp() {
|
|||
template: {
|
||||
containers: [
|
||||
{
|
||||
name: "testcontainerapp0",
|
||||
image: "repo/testcontainerapp0:v1",
|
||||
name: "testcontainerApp0",
|
||||
image: "repo/testcontainerApp0:v1",
|
||||
probes: [
|
||||
{
|
||||
type: "Liveness",
|
||||
|
@ -106,13 +120,15 @@ async function patchContainerApp() {
|
|||
initContainers: [
|
||||
{
|
||||
name: "testinitcontainerApp0",
|
||||
image: "repo/testcontainerapp0:v4",
|
||||
resources: { cpu: 0.5, memory: "1Gi" },
|
||||
image: "repo/testcontainerApp0:v4",
|
||||
resources: { cpu: 0.2, memory: "100Mi" },
|
||||
},
|
||||
],
|
||||
scale: {
|
||||
cooldownPeriod: 350,
|
||||
maxReplicas: 5,
|
||||
minReplicas: 1,
|
||||
pollingInterval: 35,
|
||||
rules: [
|
||||
{
|
||||
name: "httpscalingrule",
|
||||
|
@ -123,6 +139,8 @@ async function patchContainerApp() {
|
|||
serviceBinds: [
|
||||
{
|
||||
name: "service",
|
||||
clientType: "dotnet",
|
||||
customizedKeys: { desiredKey: "defaultKey" },
|
||||
serviceId:
|
||||
"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service",
|
||||
},
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import {
|
||||
DaprComponentResiliencyPolicy,
|
||||
ContainerAppsAPIClient,
|
||||
} from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a resiliency policy for a Dapr component.
|
||||
*
|
||||
* @summary Creates or updates a resiliency policy for a Dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponentResiliencyPolicyWithAllOptions() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const name = "myresiliencypolicy";
|
||||
const daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy = {
|
||||
inboundPolicy: {
|
||||
circuitBreakerPolicy: {
|
||||
consecutiveErrors: 5,
|
||||
intervalInSeconds: 4,
|
||||
timeoutInSeconds: 10,
|
||||
},
|
||||
httpRetryPolicy: {
|
||||
maxRetries: 15,
|
||||
retryBackOff: {
|
||||
initialDelayInMilliseconds: 2000,
|
||||
maxIntervalInMilliseconds: 5500,
|
||||
},
|
||||
},
|
||||
timeoutPolicy: { responseTimeoutInSeconds: 30 },
|
||||
},
|
||||
outboundPolicy: {
|
||||
circuitBreakerPolicy: {
|
||||
consecutiveErrors: 3,
|
||||
intervalInSeconds: 60,
|
||||
timeoutInSeconds: 20,
|
||||
},
|
||||
httpRetryPolicy: {
|
||||
maxRetries: 5,
|
||||
retryBackOff: {
|
||||
initialDelayInMilliseconds: 100,
|
||||
maxIntervalInMilliseconds: 30000,
|
||||
},
|
||||
},
|
||||
timeoutPolicy: { responseTimeoutInSeconds: 12 },
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.daprComponentResiliencyPolicies.createOrUpdate(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
name,
|
||||
daprComponentResiliencyPolicyEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a resiliency policy for a Dapr component.
|
||||
*
|
||||
* @summary Creates or updates a resiliency policy for a Dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const name = "myresiliencypolicy";
|
||||
const daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy = {
|
||||
outboundPolicy: {
|
||||
circuitBreakerPolicy: {
|
||||
consecutiveErrors: 3,
|
||||
intervalInSeconds: 60,
|
||||
timeoutInSeconds: 20,
|
||||
},
|
||||
httpRetryPolicy: {
|
||||
maxRetries: 5,
|
||||
retryBackOff: {
|
||||
initialDelayInMilliseconds: 100,
|
||||
maxIntervalInMilliseconds: 30000,
|
||||
},
|
||||
},
|
||||
timeoutPolicy: { responseTimeoutInSeconds: 12 },
|
||||
},
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.daprComponentResiliencyPolicies.createOrUpdate(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
name,
|
||||
daprComponentResiliencyPolicyEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Creates or updates a resiliency policy for a Dapr component.
|
||||
*
|
||||
* @summary Creates or updates a resiliency policy for a Dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const name = "myresiliencypolicy";
|
||||
const daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy = {
|
||||
inboundPolicy: {
|
||||
circuitBreakerPolicy: { consecutiveErrors: 3, timeoutInSeconds: 20 },
|
||||
httpRetryPolicy: {
|
||||
maxRetries: 5,
|
||||
retryBackOff: {
|
||||
initialDelayInMilliseconds: 2000,
|
||||
maxIntervalInMilliseconds: 5500,
|
||||
},
|
||||
},
|
||||
},
|
||||
outboundPolicy: { timeoutPolicy: { responseTimeoutInSeconds: 12 } },
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.daprComponentResiliencyPolicies.createOrUpdate(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
name,
|
||||
daprComponentResiliencyPolicyEnvelope,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
createOrUpdateDaprComponentResiliencyPolicyWithAllOptions();
|
||||
createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly();
|
||||
createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Delete a resiliency policy for a Dapr component.
|
||||
*
|
||||
* @summary Delete a resiliency policy for a Dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json
|
||||
*/
|
||||
async function deleteDaprComponentResiliencyPolicy() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const name = "myresiliencypolicy";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.daprComponentResiliencyPolicies.delete(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
name,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
deleteDaprComponentResiliencyPolicy();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get a Dapr component resiliency policy.
|
||||
*
|
||||
* @summary Get a Dapr component resiliency policy.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicies_Get.json
|
||||
*/
|
||||
async function getDaprComponentResiliencyPolicy() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const name = "myresiliencypolicy";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const result = await client.daprComponentResiliencyPolicies.get(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
name,
|
||||
);
|
||||
console.log(result);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
getDaprComponentResiliencyPolicy();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation.
|
||||
* Licensed under the MIT License.
|
||||
*
|
||||
* Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
*/
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
import { ContainerAppsAPIClient } from "@azure/arm-appcontainers";
|
||||
import { DefaultAzureCredential } from "@azure/identity";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* This sample demonstrates how to Get the resiliency policies for a Dapr component.
|
||||
*
|
||||
* @summary Get the resiliency policies for a Dapr component.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponentResiliencyPolicies_List.json
|
||||
*/
|
||||
async function listDaprComponentResiliencyPolicies() {
|
||||
const subscriptionId =
|
||||
process.env["APPCONTAINERS_SUBSCRIPTION_ID"] ||
|
||||
"8efdecc5-919e-44eb-b179-915dca89ebf9";
|
||||
const resourceGroupName =
|
||||
process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg";
|
||||
const environmentName = "myenvironment";
|
||||
const componentName = "mydaprcomponent";
|
||||
const credential = new DefaultAzureCredential();
|
||||
const client = new ContainerAppsAPIClient(credential, subscriptionId);
|
||||
const resArray = new Array();
|
||||
for await (let item of client.daprComponentResiliencyPolicies.list(
|
||||
resourceGroupName,
|
||||
environmentName,
|
||||
componentName,
|
||||
)) {
|
||||
resArray.push(item);
|
||||
}
|
||||
console.log(resArray);
|
||||
}
|
||||
|
||||
async function main() {
|
||||
listDaprComponentResiliencyPolicies();
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
|
@ -21,7 +21,7 @@ dotenv.config();
|
|||
* This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment.
|
||||
*
|
||||
* @summary Creates or updates a Dapr Component in a Managed Environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponentWithSecretStoreComponent() {
|
||||
const subscriptionId =
|
||||
|
@ -43,6 +43,14 @@ async function createOrUpdateDaprComponentWithSecretStoreComponent() {
|
|||
],
|
||||
scopes: ["container-app-1", "container-app-2"],
|
||||
secretStoreComponent: "my-secret-store",
|
||||
serviceComponentBind: [
|
||||
{
|
||||
name: "statestore",
|
||||
metadata: { name: "daprcomponentBind", value: "redis-bind" },
|
||||
serviceId:
|
||||
"/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
|
||||
},
|
||||
],
|
||||
version: "v1",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
@ -60,7 +68,7 @@ async function createOrUpdateDaprComponentWithSecretStoreComponent() {
|
|||
* This sample demonstrates how to Creates or updates a Dapr Component in a Managed Environment.
|
||||
*
|
||||
* @summary Creates or updates a Dapr Component in a Managed Environment.
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_CreateOrUpdate_Secrets.json
|
||||
* x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json
|
||||
*/
|
||||
async function createOrUpdateDaprComponentWithSecrets() {
|
||||
const subscriptionId =
|
||||
|
@ -82,6 +90,14 @@ async function createOrUpdateDaprComponentWithSecrets() {
|
|||
],
|
||||
scopes: ["container-app-1", "container-app-2"],
|
||||
secrets: [{ name: "masterkey", value: "keyvalue" }],
|
||||
serviceComponentBind: [
|
||||
{
|
||||
name: "statestore",
|
||||
metadata: { name: "daprcomponentBind", value: "redis-bind" },
|
||||
serviceId:
|
||||
"/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis",
|
||||
},
|
||||
],
|
||||
version: "v1",
|
||||
};
|
||||
const credential = new DefaultAzureCredential();
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче