diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index c1aa47916a97..b10c5a44ce22 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10843,7 +10843,7 @@ packages: resolve-import: 1.4.6 rimraf: 5.0.10 sync-content: 1.0.2 - typescript: 5.5.4 + typescript: 5.6.3 walk-up-path: 3.0.1 dev: false @@ -12893,7 +12893,7 @@ packages: dev: false file:projects/arm-appcontainers.tgz: - resolution: {integrity: sha512-kjruBKXtbcRnhv5rZ5yMv5drqqlVMaNPSoprSVqXiQnlDSScQ7/Ioj9rsfDTgOzBnT26JM8ZjZY6tVwqLrXZeQ==, tarball: file:projects/arm-appcontainers.tgz} + resolution: {integrity: sha512-lAB34jni0E5NxSCTVSAgCFPMJBNqFk6sxe0VRDA1j0VNVZyFgjh6I8gTCg2ziDmwWCX6yp2RVUEzepT2G0T0bw==, tarball: file:projects/arm-appcontainers.tgz} name: '@rush-temp/arm-appcontainers' version: 0.0.0 dependencies: @@ -12911,10 +12911,10 @@ packages: mkdirp: 3.0.1 mocha: 10.7.3 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.57)(typescript@5.6.3) + ts-node: 10.9.2(@types/node@18.19.57)(typescript@5.5.4) tslib: 2.8.0 tsx: 4.19.1 - typescript: 5.6.3 + typescript: 5.5.4 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index 098dc6c3417b..672f2225c2c4 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,5 +1,536 @@ # Release History +## 3.0.0-beta.1 (2024-10-22) +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 ContainerAppsLabelHistory + - 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 HttpRouteConfigOperations + - Added operation group JavaComponents + - Added operation group LogicApps + - Added operation group MaintenanceConfigurations + - Added operation group ManagedEnvironmentPrivateEndpointConnections + - Added operation group ManagedEnvironmentPrivateLinkResources + - Added operation ConnectedEnvironmentsCertificates.beginCreateOrUpdate + - Added operation ConnectedEnvironmentsCertificates.beginCreateOrUpdateAndWait + - Added operation ConnectedEnvironmentsCertificates.beginDelete + - Added operation ConnectedEnvironmentsCertificates.beginDeleteAndWait + - Added operation ConnectedEnvironmentsCertificates.beginUpdate + - Added operation ConnectedEnvironmentsCertificates.beginUpdateAndWait + - Added operation ConnectedEnvironmentsDaprComponents.beginCreateOrUpdate + - Added operation ConnectedEnvironmentsDaprComponents.beginCreateOrUpdateAndWait + - Added operation ConnectedEnvironmentsDaprComponents.beginDelete + - Added operation ConnectedEnvironmentsDaprComponents.beginDeleteAndWait + - Added operation ConnectedEnvironmentsStorages.beginCreateOrUpdate + - Added operation ConnectedEnvironmentsStorages.beginCreateOrUpdateAndWait + - Added operation ConnectedEnvironmentsStorages.beginDelete + - Added operation ConnectedEnvironmentsStorages.beginDeleteAndWait + - 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 ConnectedEnvironmentDaprComponent + - Added Interface ConnectedEnvironmentDaprComponentProperties + - Added Interface ConnectedEnvironmentDaprComponentsCollection + - Added Interface ConnectedEnvironmentsCertificatesDeleteHeaders + - Added Interface ConnectedEnvironmentsCertificatesUpdateHeaders + - Added Interface ConnectedEnvironmentsDaprComponentsDeleteHeaders + - Added Interface ConnectedEnvironmentsStoragesDeleteHeaders + - 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 ContainerAppsLabelHistoryGetLabelHistoryOptionalParams + - Added Interface ContainerAppsLabelHistoryListLabelHistoryNextOptionalParams + - Added Interface ContainerAppsLabelHistoryListLabelHistoryOptionalParams + - 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 DaprComponentProperties + - 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 HttpRoute + - Added Interface HttpRouteAction + - Added Interface HttpRouteConfig + - Added Interface HttpRouteConfigCollection + - Added Interface HttpRouteConfigCreateOrUpdateOptionalParams + - Added Interface HttpRouteConfigDeleteOptionalParams + - Added Interface HttpRouteConfigGetOptionalParams + - Added Interface HttpRouteConfigListNextOptionalParams + - Added Interface HttpRouteConfigListOptionalParams + - Added Interface HttpRouteConfigProperties + - Added Interface HttpRouteConfigUpdateOptionalParams + - Added Interface HttpRouteMatch + - Added Interface HttpRouteProvisioningErrors + - Added Interface HttpRouteRule + - Added Interface HttpRouteTarget + - 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 LabelHistory + - Added Interface LabelHistoryCollection + - Added Interface LabelHistoryProperties + - Added Interface LabelHistoryRecordItem + - 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 MaintenanceConfigurationCollection + - Added Interface MaintenanceConfigurationResource + - Added Interface MaintenanceConfigurationsCreateOrUpdateOptionalParams + - Added Interface MaintenanceConfigurationsDeleteOptionalParams + - Added Interface MaintenanceConfigurationsGetOptionalParams + - Added Interface MaintenanceConfigurationsListNextOptionalParams + - Added Interface MaintenanceConfigurationsListOptionalParams + - 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 ManagedIdentitySetting + - Added Interface ManagedServiceIdentityAutoGenerated + - 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 ScheduledEntry + - 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 ConnectedEnvironmentDaprComponentProvisioningState + - Added Type Alias ConnectedEnvironmentsCertificatesDeleteResponse + - Added Type Alias ConnectedEnvironmentsDaprComponentsDeleteResponse + - Added Type Alias ConnectedEnvironmentsStoragesDeleteResponse + - Added Type Alias ConnectedEnvironmentStorageProvisioningState + - Added Type Alias ContainerAppsBuildsByContainerAppListNextResponse + - Added Type Alias ContainerAppsBuildsByContainerAppListResponse + - Added Type Alias ContainerAppsBuildsDeleteResponse + - Added Type Alias ContainerAppsBuildsGetResponse + - Added Type Alias ContainerAppsLabelHistoryGetLabelHistoryResponse + - Added Type Alias ContainerAppsLabelHistoryListLabelHistoryNextResponse + - Added Type Alias ContainerAppsLabelHistoryListLabelHistoryResponse + - 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 HttpRouteConfigCreateOrUpdateResponse + - Added Type Alias HttpRouteConfigGetResponse + - Added Type Alias HttpRouteConfigListNextResponse + - Added Type Alias HttpRouteConfigListResponse + - Added Type Alias HttpRouteConfigUpdateResponse + - Added Type Alias HttpRouteProvisioningState + - 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 MaintenanceConfigurationsCreateOrUpdateResponse + - Added Type Alias MaintenanceConfigurationsGetResponse + - Added Type Alias MaintenanceConfigurationsListNextResponse + - Added Type Alias MaintenanceConfigurationsListResponse + - 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 WeekDay + - 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 BlobStorageTokenStore has a new optional parameter blobContainerUri + - Interface BlobStorageTokenStore has a new optional parameter clientId + - Interface BlobStorageTokenStore has a new optional parameter managedIdentityResourceId + - Interface CertificateProperties has a new optional parameter certificateKeyVaultProperties + - Interface CertificateProperties has a new optional parameter certificateType + - Interface CertificateProperties has a new optional parameter deploymentErrors + - Interface Configuration has a new optional parameter identitySettings + - Interface Configuration has a new optional parameter revisionTransitionThreshold + - Interface Configuration has a new optional parameter runtime + - Interface Configuration has a new optional parameter targetLabel + - Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsCertificatesDeleteOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsCertificatesDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsCertificatesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsCertificatesUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentsStoragesDeleteOptionalParams has a new optional parameter resumeFrom + - Interface ConnectedEnvironmentsStoragesDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface ConnectedEnvironmentStorageProperties has a new optional parameter deploymentErrors + - Interface ConnectedEnvironmentStorageProperties has a new optional parameter provisioningState + - 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 ContainerResources has a new optional parameter gpu + - 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 availabilityZones + - 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 Revision has a new optional parameter labels + - 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 KnownConnectedEnvironmentDaprComponentProvisioningState + - Added Enum KnownConnectedEnvironmentStorageProvisioningState + - Added Enum KnownContainerType + - Added Enum KnownDetectionStatus + - Added Enum KnownDotNetComponentProvisioningState + - Added Enum KnownDotNetComponentType + - Added Enum KnownExecutionType + - Added Enum KnownHttpRouteProvisioningState + - 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 KnownActiveRevisionsMode has a new value Labels + - Enum KnownBindingType has a new value Auto + - Enum KnownStorageType has a new value NfsAzureFile + - Enum KnownStorageType has a new value Smb + +### Breaking Changes + + - Removed operation ConnectedEnvironmentsCertificates.createOrUpdate + - Removed operation ConnectedEnvironmentsCertificates.delete + - Removed operation ConnectedEnvironmentsCertificates.update + - Removed operation ConnectedEnvironmentsDaprComponents.createOrUpdate + - Removed operation ConnectedEnvironmentsDaprComponents.delete + - Removed operation ConnectedEnvironmentsStorages.createOrUpdate + - Removed operation ConnectedEnvironmentsStorages.delete + + ## 2.1.0 (2024-07-15) ### Features Added diff --git a/sdk/appcontainers/arm-appcontainers/README.md b/sdk/appcontainers/arm-appcontainers/README.md index 1272651c6c63..4de09634ca6c 100644 --- a/sdk/appcontainers/arm-appcontainers/README.md +++ b/sdk/appcontainers/arm-appcontainers/README.md @@ -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 diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 9da556060dbf..00c98d9f7948 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1aa912658531534e4e57ea613591075f7b97897c", + "commit": "12fba7b3f3412d8ff030464d0e8684b35da45354", "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=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/app/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "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.14", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/assets.json b/sdk/appcontainers/arm-appcontainers/assets.json deleted file mode 100644 index 79c4f578c247..000000000000 --- a/sdk/appcontainers/arm-appcontainers/assets.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "AssetsRepo": "Azure/azure-sdk-assets", - "AssetsRepoPrefixPath": "js", - "TagPrefix": "js/appcontainers/arm-appcontainers", - "Tag": "js/appcontainers/arm-appcontainers_9d19b5e29d" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index 7fa2326b3a02..1450bb64472e 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -3,16 +3,16 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerAppsAPIClient.", - "version": "2.1.0", + "version": "3.0.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,24 +28,24 @@ "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", - "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", "@microsoft/api-extractor": "^7.31.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", - "@types/node": "^18.0.0", - "chai": "^4.2.0", - "cross-env": "^7.0.2", - "dotenv": "^16.0.0", "mkdirp": "^3.0.1", - "mocha": "^10.0.0", + "typescript": "~5.5.3", + "uglify-js": "^3.4.9", "rimraf": "^5.0.0", - "ts-node": "^10.0.0", + "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", + "@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", "tsx": "^4.7.1", - "typescript": "~5.6.2", - "uglify-js": "^3.4.9" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@types/node": "^18.0.0", + "ts-node": "^10.0.0" }, "repository": { "type": "git", @@ -73,29 +73,28 @@ ], "scripts": { "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && mkdirp ./review && npm run extract-api", - "build:browser": "echo skipped", + "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", + "prepack": "npm run build", + "pack": "npm pack 2>&1", + "extract-api": "dev-tool run extract-api", + "lint": "echo skipped", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", - "build:samples": "echo skipped.", + "build:browser": "echo skipped", "build:test": "echo skipped", + "build:samples": "echo skipped.", "check-format": "echo skipped", - "clean": "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", "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": { @@ -107,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview" - } + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers" } \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md index f93ab151b93c..48e6ddd8e165 100644 --- a/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md +++ b/sdk/appcontainers/arm-appcontainers/review/arm-appcontainers.api.md @@ -33,6 +33,11 @@ export interface AllowedPrincipals { identities?: string[]; } +// @public +export interface AppInsightsConfiguration { + connectionString?: string; +} + // @public export interface Apple { enabled?: boolean; @@ -64,6 +69,70 @@ export interface AppRegistration { appSecretSettingName?: string; } +// @public +export interface AppResiliency extends ProxyResource { + circuitBreakerPolicy?: CircuitBreakerPolicy; + httpConnectionPool?: HttpConnectionPool; + httpRetryPolicy?: HttpRetryPolicy; + tcpConnectionPool?: TcpConnectionPool; + tcpRetryPolicy?: TcpRetryPolicy; + timeoutPolicy?: TimeoutPolicy; +} + +// @public +export interface AppResiliencyCollection { + readonly nextLink?: string; + value: AppResiliency[]; +} + +// @public +export interface AppResiliencyCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppResiliencyCreateOrUpdateResponse = AppResiliency; + +// @public +export interface AppResiliencyDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface AppResiliencyGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppResiliencyGetResponse = AppResiliency; + +// @public +export interface AppResiliencyListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppResiliencyListNextResponse = AppResiliencyCollection; + +// @public +export interface AppResiliencyListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppResiliencyListResponse = AppResiliencyCollection; + +// @public +export interface AppResiliencyOperations { + createOrUpdate(resourceGroupName: string, appName: string, name: string, resiliencyEnvelope: AppResiliency, options?: AppResiliencyCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, appName: string, name: string, options?: AppResiliencyDeleteOptionalParams): Promise; + get(resourceGroupName: string, appName: string, name: string, options?: AppResiliencyGetOptionalParams): Promise; + list(resourceGroupName: string, appName: string, options?: AppResiliencyListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, appName: string, name: string, resiliencyEnvelope: AppResiliency, options?: AppResiliencyUpdateOptionalParams): Promise; +} + +// @public +export interface AppResiliencyUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type AppResiliencyUpdateResponse = AppResiliency; + // @public export interface AuthConfig extends ProxyResource { encryptionSettings?: EncryptionSettings; @@ -199,15 +268,20 @@ export interface BaseContainer { command?: string[]; env?: EnvironmentVar[]; image?: string; + imageType?: ImageType; name?: string; resources?: ContainerResources; volumeMounts?: VolumeMount[]; } // @public -export interface BillingMeter extends ProxyResource { +export interface BillingMeter { + readonly id?: string; location?: string; + readonly name?: string; properties?: BillingMeterProperties; + readonly systemData?: SystemData; + readonly type?: string; } // @public @@ -239,7 +313,244 @@ export type BindingType = string; // @public export interface BlobStorageTokenStore { - sasUrlSettingName: string; + blobContainerUri?: string; + clientId?: string; + managedIdentityResourceId?: string; + sasUrlSettingName?: string; +} + +// @public +export interface BuildAuthToken { + list(resourceGroupName: string, builderName: string, buildName: string, options?: BuildAuthTokenListOptionalParams): Promise; +} + +// @public +export interface BuildAuthTokenListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildAuthTokenListResponse = BuildToken; + +// @public +export interface BuildCollection { + nextLink?: string; + value: BuildResource[]; +} + +// @public +export interface BuildConfiguration { + baseOs?: string; + environmentVariables?: EnvironmentVariable[]; + platform?: string; + platformVersion?: string; + preBuildSteps?: PreBuildStep[]; +} + +// @public +export interface BuilderCollection { + nextLink?: string; + value: BuilderResource[]; +} + +// @public +export type BuilderProvisioningState = string; + +// @public +export interface BuilderResource extends TrackedResource { + containerRegistries?: ContainerRegistry[]; + environmentId?: string; + identity?: ManagedServiceIdentity; + readonly provisioningState?: BuilderProvisioningState; +} + +// @public +export interface BuilderResourceUpdate { + environmentId?: string; + identity?: ManagedServiceIdentity; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export interface Builders { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise, BuildersCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResource, options?: BuildersCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise, BuildersDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, options?: BuildersDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise, BuildersUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, builderName: string, builderEnvelope: BuilderResourceUpdate, options?: BuildersUpdateOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, options?: BuildersGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: BuildersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: BuildersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildersCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersCreateOrUpdateResponse = BuilderResource; + +// @public +export interface BuildersDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersDeleteResponse = BuildersDeleteHeaders; + +// @public +export interface BuildersGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersGetResponse = BuilderResource; + +// @public +export interface BuildersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +// @public +export interface BuildersListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListByResourceGroupResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +// @public +export interface BuildersListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildersListBySubscriptionResponse = BuilderCollection; + +// @public +export interface BuildersUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildersUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildersUpdateResponse = BuilderResource; + +// @public +export type BuildProvisioningState = string; + +// @public +export interface BuildResource extends ProxyResource { + readonly buildStatus?: BuildStatus; + configuration?: BuildConfiguration; + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + readonly logStreamEndpoint?: string; + readonly provisioningState?: BuildProvisioningState; + readonly tokenEndpoint?: string; + readonly uploadEndpoint?: string; +} + +// @public +export interface Builds { + beginCreateOrUpdate(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise, BuildsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, builderName: string, buildName: string, buildEnvelope: BuildResource, options?: BuildsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise, BuildsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsGetOptionalParams): Promise; +} + +// @public +export interface BuildsByBuilderResource { + list(resourceGroupName: string, builderName: string, options?: BuildsByBuilderResourceListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface BuildsByBuilderResourceListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsByBuilderResourceListNextResponse = BuildCollection; + +// @public +export interface BuildsByBuilderResourceListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsByBuilderResourceListResponse = BuildCollection; + +// @public +export interface BuildsCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface BuildsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildsCreateOrUpdateResponse = BuildResource; + +// @public +export interface BuildsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface BuildsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type BuildsDeleteResponse = BuildsDeleteHeaders; + +// @public +export interface BuildsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsGetResponse = BuildResource; + +// @public +export type BuildStatus = string; + +// @public +export interface BuildToken { + readonly expires?: Date; + readonly token?: string; } // @public @@ -253,6 +564,12 @@ export interface CertificateCollection { value: Certificate[]; } +// @public +export interface CertificateKeyVaultProperties { + identity?: string; + keyVaultUrl?: string; +} + // @public export interface CertificatePatch { tags?: { @@ -262,6 +579,9 @@ export interface CertificatePatch { // @public export interface CertificateProperties { + certificateKeyVaultProperties?: CertificateKeyVaultProperties; + certificateType?: CertificateType; + readonly deploymentErrors?: string; readonly expirationDate?: Date; readonly issueDate?: Date; readonly issuer?: string; @@ -327,6 +647,9 @@ export interface CertificatesUpdateOptionalParams extends coreClient.OperationOp // @public export type CertificatesUpdateResponse = Certificate; +// @public +export type CertificateType = string; + // @public export type CheckNameAvailabilityReason = string; @@ -343,6 +666,13 @@ export interface CheckNameAvailabilityResponse { reason?: CheckNameAvailabilityReason; } +// @public +export interface CircuitBreakerPolicy { + consecutiveErrors?: number; + intervalInSeconds?: number; + maxEjectionPercent?: number; +} + // @public export interface ClientRegistration { clientId?: string; @@ -353,11 +683,15 @@ export interface ClientRegistration { export interface Configuration { activeRevisionsMode?: ActiveRevisionsMode; dapr?: Dapr; + identitySettings?: IdentitySettings[]; ingress?: Ingress; maxInactiveRevisions?: number; registries?: RegistryCredentials[]; + revisionTransitionThreshold?: number; + runtime?: Runtime; secrets?: Secret[]; service?: Service; + targetLabel?: string; } // @public @@ -377,6 +711,26 @@ export interface ConnectedEnvironmentCollection { value?: ConnectedEnvironment[]; } +// @public +export interface ConnectedEnvironmentDaprComponent extends ProxyResource { + properties?: ConnectedEnvironmentDaprComponentProperties; +} + +// @public +export interface ConnectedEnvironmentDaprComponentProperties extends DaprComponentProperties { + readonly deploymentErrors?: string; + readonly provisioningState?: ConnectedEnvironmentDaprComponentProvisioningState; +} + +// @public +export type ConnectedEnvironmentDaprComponentProvisioningState = string; + +// @public +export interface ConnectedEnvironmentDaprComponentsCollection { + readonly nextLink?: string; + value: ConnectedEnvironmentDaprComponent[]; +} + // @public export type ConnectedEnvironmentProvisioningState = string; @@ -395,25 +749,41 @@ export interface ConnectedEnvironments { // @public export interface ConnectedEnvironmentsCertificates { - createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsCertificatesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams): Promise, ConnectedEnvironmentsCertificatesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams): Promise, ConnectedEnvironmentsCertificatesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams): Promise; get(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesGetOptionalParams): Promise; list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsCertificatesListOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams): Promise; } // @public export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { certificateEnvelope?: Certificate; + resumeFrom?: string; + updateIntervalInMs?: number; } // @public export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = Certificate; +// @public +export interface ConnectedEnvironmentsCertificatesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export type ConnectedEnvironmentsCertificatesDeleteResponse = ConnectedEnvironmentsCertificatesDeleteHeaders; + // @public export interface ConnectedEnvironmentsCertificatesGetOptionalParams extends coreClient.OperationOptions { } @@ -435,8 +805,16 @@ export interface ConnectedEnvironmentsCertificatesListOptionalParams extends cor // @public export type ConnectedEnvironmentsCertificatesListResponse = CertificateCollection; +// @public +export interface ConnectedEnvironmentsCertificatesUpdateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -460,44 +838,59 @@ export type ConnectedEnvironmentsCreateOrUpdateResponse = ConnectedEnvironment; // @public export interface ConnectedEnvironmentsDaprComponents { - createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, daprComponentEnvelope: DaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, daprComponentEnvelope: ConnectedEnvironmentDaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, daprComponentEnvelope: ConnectedEnvironmentDaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams): Promise, ConnectedEnvironmentsDaprComponentsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams): Promise; get(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsGetOptionalParams): Promise; - list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams): PagedAsyncIterableIterator; + list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams): PagedAsyncIterableIterator; listSecrets(resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams): Promise; } // @public export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = DaprComponent; +export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = ConnectedEnvironmentDaprComponent; + +// @public +export interface ConnectedEnvironmentsDaprComponentsDeleteHeaders { + // (undocumented) + location?: string; +} // @public export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export type ConnectedEnvironmentsDaprComponentsDeleteResponse = ConnectedEnvironmentsDaprComponentsDeleteHeaders; + // @public export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams extends coreClient.OperationOptions { } // @public -export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; +export type ConnectedEnvironmentsDaprComponentsGetResponse = ConnectedEnvironmentDaprComponent; // @public export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ConnectedEnvironmentsDaprComponentsListNextResponse = DaprComponentsCollection; +export type ConnectedEnvironmentsDaprComponentsListNextResponse = ConnectedEnvironmentDaprComponentsCollection; // @public export interface ConnectedEnvironmentsDaprComponentsListOptionalParams extends coreClient.OperationOptions { } // @public -export type ConnectedEnvironmentsDaprComponentsListResponse = DaprComponentsCollection; +export type ConnectedEnvironmentsDaprComponentsListResponse = ConnectedEnvironmentDaprComponentsCollection; // @public export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams extends coreClient.OperationOptions { @@ -555,23 +948,38 @@ export type ConnectedEnvironmentsListBySubscriptionResponse = ConnectedEnvironme // @public export interface ConnectedEnvironmentsStorages { - createOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, storageEnvelope: ConnectedEnvironmentStorage, options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, storageEnvelope: ConnectedEnvironmentStorage, options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams): Promise, ConnectedEnvironmentsStoragesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, storageEnvelope: ConnectedEnvironmentStorage, options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams): Promise, ConnectedEnvironmentsStoragesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams): Promise; get(resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesGetOptionalParams): Promise; list(resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsStoragesListOptionalParams): Promise; } // @public export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = ConnectedEnvironmentStorage; // @public -export interface ConnectedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions { +export interface ConnectedEnvironmentsStoragesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ConnectedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } +// @public +export type ConnectedEnvironmentsStoragesDeleteResponse = ConnectedEnvironmentsStoragesDeleteHeaders; + // @public export interface ConnectedEnvironmentsStoragesGetOptionalParams extends coreClient.OperationOptions { } @@ -594,8 +1002,14 @@ export interface ConnectedEnvironmentStorage extends ProxyResource { // @public export interface ConnectedEnvironmentStorageProperties { azureFile?: AzureFileProperties; + readonly deploymentErrors?: string; + readonly provisioningState?: ConnectedEnvironmentStorageProvisioningState; + smb?: SmbStorage; } +// @public +export type ConnectedEnvironmentStorageProvisioningState = string; + // @public export interface ConnectedEnvironmentStoragesCollection { value: ConnectedEnvironmentStorage[]; @@ -617,16 +1031,19 @@ export interface Container extends BaseContainer { export interface ContainerApp extends TrackedResource { configuration?: Configuration; readonly customDomainVerificationId?: string; + readonly deploymentErrors?: string; environmentId?: string; readonly eventStreamEndpoint?: string; extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; + kind?: Kind; readonly latestReadyRevisionName?: string; readonly latestRevisionFqdn?: string; readonly latestRevisionName?: string; managedBy?: string; managedEnvironmentId?: string; readonly outboundIpAddresses?: string[]; + patchingConfiguration?: ContainerAppPropertiesPatchingConfiguration; readonly provisioningState?: ContainerAppProvisioningState; template?: Template; workloadProfileName?: string; @@ -687,6 +1104,11 @@ export interface ContainerAppProbeTcpSocket { port: number; } +// @public +export interface ContainerAppPropertiesPatchingConfiguration { + patchingMode?: PatchingMode; +} + // @public export type ContainerAppProvisioningState = string; @@ -721,10 +1143,20 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) apiVersion: string; // (undocumented) + appResiliencyOperations: AppResiliencyOperations; + // (undocumented) availableWorkloadProfiles: AvailableWorkloadProfiles; // (undocumented) billingMeters: BillingMeters; // (undocumented) + buildAuthToken: BuildAuthToken; + // (undocumented) + builders: Builders; + // (undocumented) + builds: Builds; + // (undocumented) + buildsByBuilderResource: BuildsByBuilderResource; + // (undocumented) certificates: Certificates; // (undocumented) connectedEnvironments: ConnectedEnvironments; @@ -739,26 +1171,56 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) containerAppsAuthConfigs: ContainerAppsAuthConfigs; // (undocumented) + containerAppsBuilds: ContainerAppsBuilds; + // (undocumented) + containerAppsBuildsByContainerApp: ContainerAppsBuildsByContainerApp; + // (undocumented) containerAppsDiagnostics: ContainerAppsDiagnostics; // (undocumented) + containerAppsLabelHistory: ContainerAppsLabelHistory; + // (undocumented) + containerAppsPatches: ContainerAppsPatches; + // (undocumented) containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; // (undocumented) containerAppsRevisions: ContainerAppsRevisions; // (undocumented) + containerAppsSessionPools: ContainerAppsSessionPools; + // (undocumented) containerAppsSourceControls: ContainerAppsSourceControls; // (undocumented) + daprComponentResiliencyPolicies: DaprComponentResiliencyPolicies; + // (undocumented) daprComponents: DaprComponents; + // (undocumented) + daprSubscriptions: DaprSubscriptions; + // (undocumented) + dotNetComponents: DotNetComponents; + // (undocumented) + functionsExtension: FunctionsExtension; getCustomDomainVerificationId(options?: GetCustomDomainVerificationIdOptionalParams): Promise; + // (undocumented) + httpRouteConfigOperations: HttpRouteConfigOperations; + // (undocumented) + javaComponents: JavaComponents; jobExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobExecutionOptionalParams): Promise; // (undocumented) jobs: Jobs; // (undocumented) jobsExecutions: JobsExecutions; // (undocumented) + logicApps: LogicApps; + // (undocumented) + maintenanceConfigurations: MaintenanceConfigurations; + // (undocumented) managedCertificates: ManagedCertificates; // (undocumented) managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; // (undocumented) + managedEnvironmentPrivateEndpointConnections: ManagedEnvironmentPrivateEndpointConnections; + // (undocumented) + managedEnvironmentPrivateLinkResources: ManagedEnvironmentPrivateLinkResources; + // (undocumented) managedEnvironments: ManagedEnvironments; // (undocumented) managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; @@ -823,6 +1285,78 @@ export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams extend // @public export type ContainerAppsAuthConfigsListByContainerAppResponse = AuthConfigCollection; +// @public +export interface ContainerAppsBuildCollection { + nextLink?: string; + value: ContainerAppsBuildResource[]; +} + +// @public +export interface ContainerAppsBuildConfiguration { + readonly baseOs?: string; + readonly environmentVariables?: EnvironmentVariable[]; + readonly platform?: string; + readonly platformVersion?: string; + readonly preBuildSteps?: PreBuildStep[]; +} + +// @public +export interface ContainerAppsBuildResource extends ProxyResource { + readonly buildStatus?: BuildStatus; + readonly configuration?: ContainerAppsBuildConfiguration; + readonly destinationContainerRegistry?: ContainerRegistryWithCustomImage; + readonly logStreamEndpoint?: string; + readonly provisioningState?: BuildProvisioningState; +} + +// @public +export interface ContainerAppsBuilds { + beginDelete(resourceGroupName: string, containerAppName: string, buildName: string, options?: ContainerAppsBuildsDeleteOptionalParams): Promise, ContainerAppsBuildsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, containerAppName: string, buildName: string, options?: ContainerAppsBuildsDeleteOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, buildName: string, options?: ContainerAppsBuildsGetOptionalParams): Promise; +} + +// @public +export interface ContainerAppsBuildsByContainerApp { + list(resourceGroupName: string, containerAppName: string, options?: ContainerAppsBuildsByContainerAppListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsBuildsByContainerAppListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsBuildsByContainerAppListNextResponse = ContainerAppsBuildCollection; + +// @public +export interface ContainerAppsBuildsByContainerAppListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsBuildsByContainerAppListResponse = ContainerAppsBuildCollection; + +// @public +export interface ContainerAppsBuildsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsBuildsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsBuildsDeleteResponse = ContainerAppsBuildsDeleteHeaders; + +// @public +export interface ContainerAppsBuildsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsBuildsGetResponse = ContainerAppsBuildResource; + // @public export interface ContainerAppsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -925,6 +1459,34 @@ export interface ContainerAppsGetOptionalParams extends coreClient.OperationOpti // @public export type ContainerAppsGetResponse = ContainerApp; +// @public +export interface ContainerAppsLabelHistory { + getLabelHistory(resourceGroupName: string, containerAppName: string, labelName: string, options?: ContainerAppsLabelHistoryGetLabelHistoryOptionalParams): Promise; + listLabelHistory(resourceGroupName: string, containerAppName: string, options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsLabelHistoryGetLabelHistoryOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsLabelHistoryGetLabelHistoryResponse = LabelHistory; + +// @public +export interface ContainerAppsLabelHistoryListLabelHistoryNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsLabelHistoryListLabelHistoryNextResponse = LabelHistoryCollection; + +// @public +export interface ContainerAppsLabelHistoryListLabelHistoryOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsLabelHistoryListLabelHistoryResponse = LabelHistoryCollection; + // @public export interface ContainerAppsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { } @@ -968,6 +1530,92 @@ export interface ContainerAppsListSecretsOptionalParams extends coreClient.Opera // @public export type ContainerAppsListSecretsResponse = SecretsCollection; +// @public +export interface ContainerAppsPatches { + beginApply(resourceGroupName: string, containerAppName: string, patchName: string, options?: ContainerAppsPatchesApplyOptionalParams): Promise, ContainerAppsPatchesApplyResponse>>; + beginApplyAndWait(resourceGroupName: string, containerAppName: string, patchName: string, options?: ContainerAppsPatchesApplyOptionalParams): Promise; + beginDelete(resourceGroupName: string, containerAppName: string, patchName: string, options?: ContainerAppsPatchesDeleteOptionalParams): Promise, ContainerAppsPatchesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, containerAppName: string, patchName: string, options?: ContainerAppsPatchesDeleteOptionalParams): Promise; + beginSkipConfigure(resourceGroupName: string, containerAppName: string, patchName: string, patchSkipConfig: PatchSkipConfig, options?: ContainerAppsPatchesSkipConfigureOptionalParams): Promise, ContainerAppsPatchesSkipConfigureResponse>>; + beginSkipConfigureAndWait(resourceGroupName: string, containerAppName: string, patchName: string, patchSkipConfig: PatchSkipConfig, options?: ContainerAppsPatchesSkipConfigureOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, patchName: string, options?: ContainerAppsPatchesGetOptionalParams): Promise; + listByContainerApp(resourceGroupName: string, containerAppName: string, options?: ContainerAppsPatchesListByContainerAppOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsPatchesApplyHeaders { + // (undocumented) + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsPatchesApplyOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsPatchesApplyResponse = ContainerAppsPatchResource; + +// @public +export interface ContainerAppsPatchesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsPatchesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsPatchesDeleteResponse = ContainerAppsPatchesDeleteHeaders; + +// @public +export interface ContainerAppsPatchesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsPatchesGetResponse = ContainerAppsPatchResource; + +// @public +export interface ContainerAppsPatchesListByContainerAppNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsPatchesListByContainerAppNextResponse = PatchCollection; + +// @public +export interface ContainerAppsPatchesListByContainerAppOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ContainerAppsPatchesListByContainerAppResponse = PatchCollection; + +// @public +export interface ContainerAppsPatchesSkipConfigureHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsPatchesSkipConfigureOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsPatchesSkipConfigureResponse = ContainerAppsPatchesSkipConfigureHeaders; + +// @public +export interface ContainerAppsPatchResource extends ProxyResource { + readonly properties?: PatchProperties; +} + // @public export interface ContainerAppsRevisionReplicas { getReplica(resourceGroupName: string, containerAppName: string, revisionName: string, replicaName: string, options?: ContainerAppsRevisionReplicasGetReplicaOptionalParams): Promise; @@ -1031,6 +1679,93 @@ export type ContainerAppsRevisionsListRevisionsResponse = RevisionCollection; export interface ContainerAppsRevisionsRestartRevisionOptionalParams extends coreClient.OperationOptions { } +// @public +export interface ContainerAppsSessionPools { + beginCreateOrUpdate(resourceGroupName: string, sessionPoolName: string, sessionPoolEnvelope: SessionPool, options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams): Promise, ContainerAppsSessionPoolsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, sessionPoolName: string, sessionPoolEnvelope: SessionPool, options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, sessionPoolName: string, options?: ContainerAppsSessionPoolsDeleteOptionalParams): Promise, ContainerAppsSessionPoolsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, sessionPoolName: string, options?: ContainerAppsSessionPoolsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, sessionPoolName: string, sessionPoolEnvelope: SessionPoolUpdatableProperties, options?: ContainerAppsSessionPoolsUpdateOptionalParams): Promise, ContainerAppsSessionPoolsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, sessionPoolName: string, sessionPoolEnvelope: SessionPoolUpdatableProperties, options?: ContainerAppsSessionPoolsUpdateOptionalParams): Promise; + get(resourceGroupName: string, sessionPoolName: string, options?: ContainerAppsSessionPoolsGetOptionalParams): Promise; + listByResourceGroup(resourceGroupName: string, options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listBySubscription(options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ContainerAppsSessionPoolsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsSessionPoolsCreateOrUpdateResponse = SessionPool; + +// @public +export interface ContainerAppsSessionPoolsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsSessionPoolsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsSessionPoolsDeleteResponse = ContainerAppsSessionPoolsDeleteHeaders; + +// @public +export interface ContainerAppsSessionPoolsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSessionPoolsGetResponse = SessionPool; + +// @public +export interface ContainerAppsSessionPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSessionPoolsListByResourceGroupNextResponse = SessionPoolCollection; + +// @public +export interface ContainerAppsSessionPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSessionPoolsListByResourceGroupResponse = SessionPoolCollection; + +// @public +export interface ContainerAppsSessionPoolsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSessionPoolsListBySubscriptionNextResponse = SessionPoolCollection; + +// @public +export interface ContainerAppsSessionPoolsListBySubscriptionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ContainerAppsSessionPoolsListBySubscriptionResponse = SessionPoolCollection; + +// @public +export interface ContainerAppsSessionPoolsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsSessionPoolsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsSessionPoolsUpdateResponse = SessionPool; + // @public export interface ContainerAppsSourceControls { beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, sourceControlName: string, sourceControlEnvelope: SourceControl, options?: ContainerAppsSourceControlsCreateOrUpdateOptionalParams): Promise, ContainerAppsSourceControlsCreateOrUpdateResponse>>; @@ -1045,6 +1780,7 @@ export interface ContainerAppsSourceControls { export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; + xMsGithubAuxiliary?: string; } // @public @@ -1052,8 +1788,11 @@ export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; // @public export interface ContainerAppsSourceControlsDeleteOptionalParams extends coreClient.OperationOptions { + deleteWorkflow?: boolean; + ignoreWorkflowDeletionFailure?: boolean; resumeFrom?: string; updateIntervalInMs?: number; + xMsGithubAuxiliary?: string; } // @public @@ -1122,13 +1861,37 @@ export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationO // @public export type ContainerAppsUpdateResponse = ContainerApp; +// @public +export interface ContainerExecutionStatus { + additionalInformation?: string; + code?: number; + name?: string; + status?: string; +} + +// @public +export interface ContainerRegistry { + containerRegistryServer: string; + identityResourceId: string; +} + +// @public +export interface ContainerRegistryWithCustomImage { + image?: string; + server: string; +} + // @public export interface ContainerResources { cpu?: number; readonly ephemeralStorage?: string; + gpu?: number; memory?: string; } +// @public +export type ContainerType = string; + // @public export interface CookieExpiration { convention?: CookieExpirationConvention; @@ -1151,6 +1914,13 @@ export interface CorsPolicy { // @public export type CreatedByType = string; +// @public +export interface CustomContainerTemplate { + containers?: SessionContainer[]; + ingress?: SessionIngress; + registryCredentials?: SessionRegistryCredentials; +} + // @public export interface CustomDomain { bindingType?: BindingType; @@ -1160,6 +1930,7 @@ export interface CustomDomain { // @public export interface CustomDomainConfiguration { + certificateKeyVaultProperties?: CertificateKeyVaultProperties; certificatePassword?: string; certificateValue?: Uint8Array; readonly customDomainVerificationId?: string; @@ -1210,6 +1981,7 @@ export interface CustomOpenIdConnectProvider { // @public export interface CustomScaleRule { auth?: ScaleRuleAuth[]; + identity?: string; metadata?: { [propertyName: string]: string; }; @@ -1237,35 +2009,139 @@ export interface DaprComponent extends ProxyResource { scopes?: string[]; secrets?: Secret[]; secretStoreComponent?: string; + serviceComponentBind?: DaprComponentServiceBinding[]; version?: string; } // @public -export interface DaprComponents { - createOrUpdate(resourceGroupName: string, environmentName: string, componentName: string, daprComponentEnvelope: DaprComponent, options?: DaprComponentsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsDeleteOptionalParams): Promise; - get(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsGetOptionalParams): Promise; - list(resourceGroupName: string, environmentName: string, options?: DaprComponentsListOptionalParams): PagedAsyncIterableIterator; - listSecrets(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsListSecretsOptionalParams): Promise; +export interface DaprComponentProperties { + componentType?: string; + ignoreErrors?: boolean; + initTimeout?: string; + metadata?: DaprMetadata[]; + scopes?: string[]; + secrets?: Secret[]; + secretStoreComponent?: string; + serviceComponentBind?: DaprComponentServiceBinding[]; + version?: string; } // @public -export interface DaprComponentsCollection { +export interface DaprComponentResiliencyPolicies { + createOrUpdate(resourceGroupName: string, environmentName: string, componentName: string, name: string, daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy, options?: DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, componentName: string, name: string, options?: DaprComponentResiliencyPoliciesDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, componentName: string, name: string, options?: DaprComponentResiliencyPoliciesGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentResiliencyPoliciesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DaprComponentResiliencyPoliciesCollection { readonly nextLink?: string; - value: DaprComponent[]; + value: DaprComponentResiliencyPolicy[]; } // @public -export interface DaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { } // @public -export type DaprComponentsCreateOrUpdateResponse = DaprComponent; +export type DaprComponentResiliencyPoliciesCreateOrUpdateResponse = DaprComponentResiliencyPolicy; + +// @public +export interface DaprComponentResiliencyPoliciesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DaprComponentResiliencyPoliciesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentResiliencyPoliciesGetResponse = DaprComponentResiliencyPolicy; + +// @public +export interface DaprComponentResiliencyPoliciesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentResiliencyPoliciesListNextResponse = DaprComponentResiliencyPoliciesCollection; + +// @public +export interface DaprComponentResiliencyPoliciesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentResiliencyPoliciesListResponse = DaprComponentResiliencyPoliciesCollection; + +// @public +export interface DaprComponentResiliencyPolicy extends ProxyResource { + inboundPolicy?: DaprComponentResiliencyPolicyConfiguration; + outboundPolicy?: DaprComponentResiliencyPolicyConfiguration; +} + +// @public +export interface DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration { + consecutiveErrors?: number; + intervalInSeconds?: number; + timeoutInSeconds?: number; +} + +// @public +export interface DaprComponentResiliencyPolicyConfiguration { + circuitBreakerPolicy?: DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; + httpRetryPolicy?: DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; + timeoutPolicy?: DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; +} + +// @public +export interface DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration { + initialDelayInMilliseconds?: number; + maxIntervalInMilliseconds?: number; +} + +// @public +export interface DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration { + maxRetries?: number; + retryBackOff?: DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; +} + +// @public +export interface DaprComponentResiliencyPolicyTimeoutPolicyConfiguration { + responseTimeoutInSeconds?: number; +} + +// @public +export interface DaprComponents { + createOrUpdate(resourceGroupName: string, environmentName: string, componentName: string, daprComponentEnvelope: DaprComponent, options?: DaprComponentsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: DaprComponentsListOptionalParams): PagedAsyncIterableIterator; + listSecrets(resourceGroupName: string, environmentName: string, componentName: string, options?: DaprComponentsListSecretsOptionalParams): Promise; +} + +// @public +export interface DaprComponentsCollection { + readonly nextLink?: string; + value: DaprComponent[]; +} + +// @public +export interface DaprComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprComponentsCreateOrUpdateResponse = DaprComponent; // @public export interface DaprComponentsDeleteOptionalParams extends coreClient.OperationOptions { } +// @public +export interface DaprComponentServiceBinding { + metadata?: DaprServiceBindMetadata; + name?: string; + serviceId?: string; +} + // @public export interface DaprComponentsGetOptionalParams extends coreClient.OperationOptions { } @@ -1317,6 +2193,96 @@ export interface DaprSecretsCollection { value: DaprSecret[]; } +// @public +export interface DaprServiceBindMetadata { + name?: string; + value?: string; +} + +// @public +export interface DaprSubscription extends ProxyResource { + bulkSubscribe?: DaprSubscriptionBulkSubscribeOptions; + deadLetterTopic?: string; + metadata?: { + [propertyName: string]: string; + }; + pubsubName?: string; + routes?: DaprSubscriptionRoutes; + scopes?: string[]; + topic?: string; +} + +// @public +export interface DaprSubscriptionBulkSubscribeOptions { + enabled?: boolean; + maxAwaitDurationMs?: number; + maxMessagesCount?: number; +} + +// @public +export interface DaprSubscriptionRouteRule { + match?: string; + path?: string; +} + +// @public +export interface DaprSubscriptionRoutes { + default?: string; + rules?: DaprSubscriptionRouteRule[]; +} + +// @public +export interface DaprSubscriptions { + createOrUpdate(resourceGroupName: string, environmentName: string, name: string, daprSubscriptionEnvelope: DaprSubscription, options?: DaprSubscriptionsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, name: string, options?: DaprSubscriptionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, name: string, options?: DaprSubscriptionsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: DaprSubscriptionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DaprSubscriptionsCollection { + readonly nextLink?: string; + value: DaprSubscription[]; +} + +// @public +export interface DaprSubscriptionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprSubscriptionsCreateOrUpdateResponse = DaprSubscription; + +// @public +export interface DaprSubscriptionsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DaprSubscriptionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprSubscriptionsGetResponse = DaprSubscription; + +// @public +export interface DaprSubscriptionsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprSubscriptionsListNextResponse = DaprSubscriptionsCollection; + +// @public +export interface DaprSubscriptionsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DaprSubscriptionsListResponse = DaprSubscriptionsCollection; + +// @public +export interface DataDogConfiguration { + key?: string; + site?: string; +} + // @public export interface DefaultAuthorizationPolicy { allowedApplications?: string[]; @@ -1344,6 +2310,15 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } +// @public +export interface DestinationsConfiguration { + dataDogConfiguration?: DataDogConfiguration; + otlpConfigurations?: OtlpConfiguration[]; +} + +// @public +export type DetectionStatus = string; + // @public export interface DiagnosticDataProviderMetadata { propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; @@ -1431,6 +2406,116 @@ export interface DiagnosticSupportTopic { // @public export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; +// @public +export interface DotNetComponent extends ProxyResource { + componentType?: DotNetComponentType; + configurations?: DotNetComponentConfigurationProperty[]; + readonly provisioningState?: DotNetComponentProvisioningState; + serviceBinds?: DotNetComponentServiceBind[]; +} + +// @public +export interface DotNetComponentConfigurationProperty { + propertyName?: string; + value?: string; +} + +// @public +export type DotNetComponentProvisioningState = string; + +// @public +export interface DotNetComponents { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, name: string, dotNetComponentEnvelope: DotNetComponent, options?: DotNetComponentsCreateOrUpdateOptionalParams): Promise, DotNetComponentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, name: string, dotNetComponentEnvelope: DotNetComponent, options?: DotNetComponentsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, environmentName: string, name: string, options?: DotNetComponentsDeleteOptionalParams): Promise, DotNetComponentsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, environmentName: string, name: string, options?: DotNetComponentsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, environmentName: string, name: string, dotNetComponentEnvelope: DotNetComponent, options?: DotNetComponentsUpdateOptionalParams): Promise, DotNetComponentsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, environmentName: string, name: string, dotNetComponentEnvelope: DotNetComponent, options?: DotNetComponentsUpdateOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, name: string, options?: DotNetComponentsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: DotNetComponentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DotNetComponentsCollection { + readonly nextLink?: string; + value: DotNetComponent[]; +} + +// @public +export interface DotNetComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DotNetComponentsCreateOrUpdateResponse = DotNetComponent; + +// @public +export interface DotNetComponentsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface DotNetComponentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DotNetComponentsDeleteResponse = DotNetComponentsDeleteHeaders; + +// @public +export interface DotNetComponentServiceBind { + name?: string; + serviceId?: string; +} + +// @public +export interface DotNetComponentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DotNetComponentsGetResponse = DotNetComponent; + +// @public +export interface DotNetComponentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DotNetComponentsListNextResponse = DotNetComponentsCollection; + +// @public +export interface DotNetComponentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DotNetComponentsListResponse = DotNetComponentsCollection; + +// @public +export interface DotNetComponentsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface DotNetComponentsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DotNetComponentsUpdateResponse = DotNetComponent; + +// @public +export type DotNetComponentType = string; + +// @public +export interface DynamicPoolConfiguration { + cooldownPeriodInSeconds?: number; + executionType?: ExecutionType; +} + // @public export interface EncryptionSettings { containerAppAuthEncryptionSecretName?: string; @@ -1453,6 +2538,12 @@ export interface EnvironmentVar { value?: string; } +// @public +export interface EnvironmentVariable { + name: string; + value: string; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1468,11 +2559,31 @@ export interface ErrorDetail { readonly target?: string; } +// @public +export interface ErrorEntity { + code?: string; + details?: ErrorEntity[]; + extendedCode?: string; + innerErrors?: ErrorEntity[]; + message?: string; + messageTemplate?: string; + parameters?: string[]; + target?: string; +} + // @public export interface ErrorResponse { error?: ErrorDetail; } +// @public +export interface ExecutionStatus { + replicas?: ReplicaExecutionStatus[]; +} + +// @public +export type ExecutionType = string; + // @public export interface ExtendedLocation { name?: string; @@ -1500,6 +2611,20 @@ export interface ForwardProxy { // @public export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; +// @public +export interface FunctionsExtension { + invokeFunctionsHost(resourceGroupName: string, containerAppName: string, revisionName: string, functionAppName: string, options?: FunctionsExtensionInvokeFunctionsHostOptionalParams): Promise; +} + +// @public +export interface FunctionsExtensionInvokeFunctionsHostOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type FunctionsExtensionInvokeFunctionsHostResponse = { + body: string; +}; + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -1522,7 +2647,9 @@ export interface GitHub { // @public export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; + buildEnvironmentVariables?: EnvironmentVariable[]; contextPath?: string; + dockerfilePath?: string; githubPersonalAccessToken?: string; image?: string; os?: string; @@ -1548,53 +2675,217 @@ export interface Google { } // @public -export interface HttpScaleRule { - auth?: ScaleRuleAuth[]; - metadata?: { - [propertyName: string]: string; - }; +export interface Header { + key?: string; + value?: string; } // @public -export interface HttpSettings { - forwardProxy?: ForwardProxy; - requireHttps?: boolean; - routes?: HttpSettingsRoutes; +export interface HeaderMatch { + exactMatch?: string; + header?: string; + prefixMatch?: string; + regexMatch?: string; + suffixMatch?: string; } // @public -export interface HttpSettingsRoutes { - apiPrefix?: string; +export interface HttpConnectionPool { + http1MaxPendingRequests?: number; + http2MaxRequests?: number; } // @public -export interface IdentityProviders { - apple?: Apple; - azureActiveDirectory?: AzureActiveDirectory; - azureStaticWebApps?: AzureStaticWebApps; - customOpenIdConnectProviders?: { - [propertyName: string]: CustomOpenIdConnectProvider; - }; - facebook?: Facebook; - gitHub?: GitHub; - google?: Google; - twitter?: Twitter; +export interface HttpGet { + fileName?: string; + headers?: string[]; + url: string; } // @public -export interface Ingress { - additionalPortMappings?: IngressPortMapping[]; - allowInsecure?: boolean; - clientCertificateMode?: IngressClientCertificateMode; - corsPolicy?: CorsPolicy; - customDomains?: CustomDomain[]; - exposedPort?: number; - external?: boolean; - readonly fqdn?: string; - ipSecurityRestrictions?: IpSecurityRestrictionRule[]; - stickySessions?: IngressStickySessions; - targetPort?: number; - traffic?: TrafficWeight[]; +export interface HttpRetryPolicy { + errors?: string[]; + headers?: HeaderMatch[]; + httpStatusCodes?: number[]; + initialDelayInMilliseconds?: number; + maxIntervalInMilliseconds?: number; + maxRetries?: number; +} + +// @public +export interface HttpRoute { + action?: HttpRouteAction; + match?: HttpRouteMatch; +} + +// @public +export interface HttpRouteAction { + prefixRewrite?: string; +} + +// @public +export interface HttpRouteConfig extends ProxyResource { + properties?: HttpRouteConfigProperties; +} + +// @public +export interface HttpRouteConfigCollection { + readonly nextLink?: string; + value: HttpRouteConfig[]; +} + +// @public +export interface HttpRouteConfigCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + httpRouteConfigEnvelope?: HttpRouteConfig; +} + +// @public +export type HttpRouteConfigCreateOrUpdateResponse = HttpRouteConfig; + +// @public +export interface HttpRouteConfigDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface HttpRouteConfigGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HttpRouteConfigGetResponse = HttpRouteConfig; + +// @public +export interface HttpRouteConfigListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HttpRouteConfigListNextResponse = HttpRouteConfigCollection; + +// @public +export interface HttpRouteConfigListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HttpRouteConfigListResponse = HttpRouteConfigCollection; + +// @public +export interface HttpRouteConfigOperations { + createOrUpdate(resourceGroupName: string, environmentName: string, httpRouteName: string, options?: HttpRouteConfigCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, httpRouteName: string, options?: HttpRouteConfigDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, httpRouteName: string, options?: HttpRouteConfigGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: HttpRouteConfigListOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, environmentName: string, httpRouteName: string, httpRouteConfigEnvelope: HttpRouteConfig, options?: HttpRouteConfigUpdateOptionalParams): Promise; +} + +// @public +export interface HttpRouteConfigProperties { + customDomains?: CustomDomain[]; + readonly fqdn?: string; + readonly provisioningErrors?: HttpRouteProvisioningErrors[]; + readonly provisioningState?: HttpRouteProvisioningState; + rules?: HttpRouteRule[]; +} + +// @public +export interface HttpRouteConfigUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type HttpRouteConfigUpdateResponse = HttpRouteConfig; + +// @public +export interface HttpRouteMatch { + caseSensitive?: boolean; + path?: string; + pathSeparatedPrefix?: string; + prefix?: string; +} + +// @public +export interface HttpRouteProvisioningErrors { + readonly message?: string; + readonly timestamp?: Date; +} + +// @public +export type HttpRouteProvisioningState = string; + +// @public +export interface HttpRouteRule { + description?: string; + routes?: HttpRoute[]; + targets?: HttpRouteTarget[]; +} + +// @public +export interface HttpRouteTarget { + containerApp: string; + label?: string; + revision?: string; + weight?: number; +} + +// @public +export interface HttpScaleRule { + auth?: ScaleRuleAuth[]; + identity?: string; + metadata?: { + [propertyName: string]: string; + }; +} + +// @public +export interface HttpSettings { + forwardProxy?: ForwardProxy; + requireHttps?: boolean; + routes?: HttpSettingsRoutes; +} + +// @public +export interface HttpSettingsRoutes { + apiPrefix?: string; +} + +// @public +export interface IdentityProviders { + apple?: Apple; + azureActiveDirectory?: AzureActiveDirectory; + azureStaticWebApps?: AzureStaticWebApps; + customOpenIdConnectProviders?: { + [propertyName: string]: CustomOpenIdConnectProvider; + }; + facebook?: Facebook; + gitHub?: GitHub; + google?: Google; + twitter?: Twitter; +} + +// @public +export interface IdentitySettings { + identity: string; + lifecycle?: IdentitySettingsLifeCycle; +} + +// @public +export type IdentitySettingsLifeCycle = string; + +// @public +export type ImageType = string; + +// @public +export interface Ingress { + additionalPortMappings?: IngressPortMapping[]; + allowInsecure?: boolean; + clientCertificateMode?: IngressClientCertificateMode; + corsPolicy?: CorsPolicy; + customDomains?: CustomDomain[]; + exposedPort?: number; + external?: boolean; + readonly fqdn?: string; + ipSecurityRestrictions?: IpSecurityRestrictionRule[]; + stickySessions?: IngressStickySessions; + targetPort?: number; + targetPortHttpScheme?: IngressTargetPortHttpScheme; + traffic?: TrafficWeight[]; transport?: IngressTransportMethod; } @@ -1613,6 +2904,9 @@ export interface IngressStickySessions { affinity?: Affinity; } +// @public +export type IngressTargetPortHttpScheme = string; + // @public export type IngressTransportMethod = string; @@ -1628,14 +2922,140 @@ export interface IpSecurityRestrictionRule { name: string; } +// @public +export interface JavaComponent extends ProxyResource { + properties?: JavaComponentPropertiesUnion; +} + +// @public +export interface JavaComponentConfigurationProperty { + propertyName?: string; + value?: string; +} + +// @public +export interface JavaComponentIngress { + readonly fqdn?: string; +} + +// @public +export interface JavaComponentProperties { + componentType: "SpringCloudGateway" | "SpringBootAdmin" | "Nacos" | "SpringCloudEureka" | "SpringCloudConfig"; + configurations?: JavaComponentConfigurationProperty[]; + readonly provisioningState?: JavaComponentProvisioningState; + scale?: JavaComponentPropertiesScale; + serviceBinds?: JavaComponentServiceBind[]; +} + +// @public +export interface JavaComponentPropertiesScale { + maxReplicas?: number; + minReplicas?: number; +} + +// @public (undocumented) +export type JavaComponentPropertiesUnion = JavaComponentProperties | SpringCloudGatewayComponent | SpringBootAdminComponent | NacosComponent | SpringCloudEurekaComponent | SpringCloudConfigComponent; + +// @public +export type JavaComponentProvisioningState = string; + +// @public +export interface JavaComponents { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, name: string, javaComponentEnvelope: JavaComponent, options?: JavaComponentsCreateOrUpdateOptionalParams): Promise, JavaComponentsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, name: string, javaComponentEnvelope: JavaComponent, options?: JavaComponentsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, environmentName: string, name: string, options?: JavaComponentsDeleteOptionalParams): Promise, JavaComponentsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, environmentName: string, name: string, options?: JavaComponentsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, environmentName: string, name: string, javaComponentEnvelope: JavaComponent, options?: JavaComponentsUpdateOptionalParams): Promise, JavaComponentsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, environmentName: string, name: string, javaComponentEnvelope: JavaComponent, options?: JavaComponentsUpdateOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, name: string, options?: JavaComponentsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: JavaComponentsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface JavaComponentsCollection { + readonly nextLink?: string; + value: JavaComponent[]; +} + +// @public +export interface JavaComponentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JavaComponentsCreateOrUpdateResponse = JavaComponent; + +// @public +export interface JavaComponentsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JavaComponentsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JavaComponentsDeleteResponse = JavaComponentsDeleteHeaders; + +// @public +export interface JavaComponentServiceBind { + name?: string; + serviceId?: string; +} + +// @public +export interface JavaComponentsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JavaComponentsGetResponse = JavaComponent; + +// @public +export interface JavaComponentsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JavaComponentsListNextResponse = JavaComponentsCollection; + +// @public +export interface JavaComponentsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JavaComponentsListResponse = JavaComponentsCollection; + +// @public +export interface JavaComponentsUpdateHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface JavaComponentsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JavaComponentsUpdateResponse = JavaComponent; + +// @public +export type JavaComponentType = string; + // @public export interface Job extends TrackedResource { configuration?: JobConfiguration; environmentId?: string; readonly eventStreamEndpoint?: string; + extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; readonly outboundIpAddresses?: string[]; readonly provisioningState?: JobProvisioningState; + readonly runningState?: JobRunningState; template?: JobTemplate; workloadProfileName?: string; } @@ -1643,6 +3063,7 @@ export interface Job extends TrackedResource { // @public export interface JobConfiguration { eventTriggerConfig?: JobConfigurationEventTriggerConfig; + identitySettings?: IdentitySettings[]; manualTriggerConfig?: JobConfigurationManualTriggerConfig; registries?: RegistryCredentials[]; replicaRetryLimit?: number; @@ -1674,6 +3095,7 @@ export interface JobConfigurationScheduleTriggerConfig { // @public export interface JobExecution { + detailedStatus?: ExecutionStatus; endTime?: Date; id?: string; name?: string; @@ -1722,6 +3144,7 @@ export interface JobExecutionTemplate { // @public export interface JobPatchProperties { + extendedLocation?: ExtendedLocation; identity?: ManagedServiceIdentity; // (undocumented) properties?: JobPatchPropertiesProperties; @@ -1742,18 +3165,25 @@ export interface JobPatchPropertiesProperties { // @public export type JobProvisioningState = string; +// @public +export type JobRunningState = string; + // @public export interface Jobs { beginCreateOrUpdate(resourceGroupName: string, jobName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise, JobsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: Job, options?: JobsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise; + beginResume(resourceGroupName: string, jobName: string, options?: JobsResumeOptionalParams): Promise, JobsResumeResponse>>; + beginResumeAndWait(resourceGroupName: string, jobName: string, options?: JobsResumeOptionalParams): Promise; beginStart(resourceGroupName: string, jobName: string, options?: JobsStartOptionalParams): Promise, JobsStartResponse>>; beginStartAndWait(resourceGroupName: string, jobName: string, options?: JobsStartOptionalParams): Promise; beginStopExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise, void>>; beginStopExecutionAndWait(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobsStopExecutionOptionalParams): Promise; beginStopMultipleExecutions(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise; + beginSuspend(resourceGroupName: string, jobName: string, options?: JobsSuspendOptionalParams): Promise, JobsSuspendResponse>>; + beginSuspendAndWait(resourceGroupName: string, jobName: string, options?: JobsSuspendOptionalParams): Promise; beginUpdate(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise, JobsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, jobName: string, jobEnvelope: JobPatchProperties, options?: JobsUpdateOptionalParams): Promise; get(resourceGroupName: string, jobName: string, options?: JobsGetOptionalParams): Promise; @@ -1776,6 +3206,7 @@ export interface JobScale { // @public export interface JobScaleRule { auth?: ScaleRuleAuth[]; + identity?: string; metadata?: Record; name?: string; type?: string; @@ -1903,6 +3334,23 @@ export interface JobsProxyGetOptionalParams extends coreClient.OperationOptions // @public export type JobsProxyGetResponse = Job; +// @public +export interface JobsResumeHeaders { + // (undocumented) + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface JobsResumeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsResumeResponse = Job; + // @public export interface JobsStartHeaders { // (undocumented) @@ -1946,6 +3394,23 @@ export interface JobsStopMultipleExecutionsOptionalParams extends coreClient.Ope // @public export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; +// @public +export interface JobsSuspendHeaders { + // (undocumented) + azureAsyncOperation?: string; + // (undocumented) + location?: string; +} + +// @public +export interface JobsSuspendOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type JobsSuspendResponse = Job; + // @public export interface JobsUpdateHeaders { // (undocumented) @@ -1979,6 +3444,9 @@ export interface KedaConfiguration { readonly version?: string; } +// @public +export type Kind = string; + // @public export enum KnownAccessMode { ReadOnly = "ReadOnly", @@ -1993,6 +3461,7 @@ export enum KnownAction { // @public export enum KnownActiveRevisionsMode { + Labels = "Labels", Multiple = "Multiple", Single = "Single" } @@ -2017,23 +3486,67 @@ export enum KnownAppProtocol { // @public export enum KnownBindingType { + Auto = "Auto", Disabled = "Disabled", SniEnabled = "SniEnabled" } // @public -export enum KnownCertificateProvisioningState { +export enum KnownBuilderProvisioningState { Canceled = "Canceled", - DeleteFailed = "DeleteFailed", + Creating = "Creating", + Deleting = "Deleting", Failed = "Failed", - Pending = "Pending", - Succeeded = "Succeeded" -} - -// @public -export enum KnownCheckNameAvailabilityReason { - AlreadyExists = "AlreadyExists", - Invalid = "Invalid" + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownBuildProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + +// @public +export enum KnownBuildStatus { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted", + Succeeded = "Succeeded" +} + +// @public +export enum KnownCertificateProvisioningState { + Canceled = "Canceled", + DeleteFailed = "DeleteFailed", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded" +} + +// @public +export enum KnownCertificateType { + ImagePullTrustedCA = "ImagePullTrustedCA", + ServerSSLCertificate = "ServerSSLCertificate" +} + +// @public +export enum KnownCheckNameAvailabilityReason { + AlreadyExists = "AlreadyExists", + Invalid = "Invalid" +} + +// @public +export enum KnownConnectedEnvironmentDaprComponentProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" } // @public @@ -2048,6 +3561,14 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownConnectedEnvironmentStorageProvisioningState { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownContainerAppContainerRunningState { Running = "Running", @@ -2071,6 +3592,12 @@ export enum KnownContainerAppReplicaRunningState { Unknown = "Unknown" } +// @public +export enum KnownContainerType { + CustomContainer = "CustomContainer", + PythonLTS = "PythonLTS" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -2079,6 +3606,27 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownDetectionStatus { + Failed = "Failed", + RegistryLoginFailed = "RegistryLoginFailed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownDotNetComponentProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + +// @public +export enum KnownDotNetComponentType { + AspireDashboard = "AspireDashboard" +} + // @public export enum KnownEnvironmentProvisioningState { Canceled = "Canceled", @@ -2093,11 +3641,41 @@ export enum KnownEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownExecutionType { + Timed = "Timed" +} + // @public export enum KnownExtendedLocationTypes { CustomLocation = "CustomLocation" } +// @public +export enum KnownHttpRouteProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded", + Updating = "Updating", + Waiting = "Waiting" +} + +// @public +export enum KnownIdentitySettingsLifeCycle { + All = "All", + Init = "Init", + Main = "Main", + None = "None" +} + +// @public +export enum KnownImageType { + CloudBuild = "CloudBuild", + ContainerImage = "ContainerImage" +} + // @public export enum KnownIngressClientCertificateMode { Accept = "accept", @@ -2105,6 +3683,12 @@ export enum KnownIngressClientCertificateMode { Require = "require" } +// @public +export enum KnownIngressTargetPortHttpScheme { + Http = "http", + Https = "https" +} + // @public export enum KnownIngressTransportMethod { Auto = "auto", @@ -2113,6 +3697,24 @@ export enum KnownIngressTransportMethod { Tcp = "tcp" } +// @public +export enum KnownJavaComponentProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + +// @public +export enum KnownJavaComponentType { + Nacos = "Nacos", + SpringBootAdmin = "SpringBootAdmin", + SpringCloudConfig = "SpringCloudConfig", + SpringCloudEureka = "SpringCloudEureka", + SpringCloudGateway = "SpringCloudGateway" +} + // @public export enum KnownJobExecutionRunningState { Degraded = "Degraded", @@ -2133,6 +3735,34 @@ export enum KnownJobProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownJobRunningState { + Progressing = "Progressing", + Ready = "Ready", + Suspended = "Suspended" +} + +// @public +export enum KnownKind { + Workflowapp = "workflowapp" +} + +// @public +export enum KnownLevel { + Debug = "debug", + Error = "error", + Info = "info", + Off = "off", + Trace = "trace", + Warn = "warn" +} + +// @public +export enum KnownLogicAppsProxyMethod { + GET = "GET", + Post = "POST" +} + // @public export enum KnownLogLevel { Debug = "debug", @@ -2156,6 +3786,65 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownPatchApplyStatus { + Canceled = "Canceled", + CreatingRevision = "CreatingRevision", + ImagePushPullFailed = "ImagePushPullFailed", + ManuallySkipped = "ManuallySkipped", + NotStarted = "NotStarted", + RebaseFailed = "RebaseFailed", + RebaseInProgress = "RebaseInProgress", + RevisionCreationFailed = "RevisionCreationFailed", + Succeeded = "Succeeded" +} + +// @public +export enum KnownPatchingMode { + Automatic = "Automatic", + Disabled = "Disabled", + Manual = "Manual" +} + +// @public +export enum KnownPatchType { + FrameworkAndOSSecurity = "FrameworkAndOSSecurity", + FrameworkSecurity = "FrameworkSecurity", + OSSecurity = "OSSecurity", + Other = "Other" +} + +// @public +export enum KnownPoolManagementType { + Dynamic = "Dynamic", + Manual = "Manual" +} + +// @public +export enum KnownPrivateEndpointConnectionProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + Pending = "Pending", + Succeeded = "Succeeded", + Updating = "Updating", + Waiting = "Waiting" +} + +// @public +export enum KnownPrivateEndpointServiceConnectionStatus { + Approved = "Approved", + Disconnected = "Disconnected", + Pending = "Pending", + Rejected = "Rejected" +} + +// @public +export enum KnownPublicNetworkAccess { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownRevisionHealthState { Healthy = "Healthy", @@ -2188,6 +3877,21 @@ export enum KnownScheme { Https = "HTTPS" } +// @public +export enum KnownSessionNetworkStatus { + EgressDisabled = "EgressDisabled", + EgressEnabled = "EgressEnabled" +} + +// @public +export enum KnownSessionPoolProvisioningState { + Canceled = "Canceled", + Deleting = "Deleting", + Failed = "Failed", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownSourceControlOperationState { Canceled = "Canceled", @@ -2200,7 +3904,9 @@ export enum KnownSourceControlOperationState { export enum KnownStorageType { AzureFile = "AzureFile", EmptyDir = "EmptyDir", - Secret = "Secret" + NfsAzureFile = "NfsAzureFile", + Secret = "Secret", + Smb = "Smb" } // @public @@ -2217,6 +3923,42 @@ export enum KnownType { Startup = "Startup" } +// @public +export enum KnownWorkflowState { + Completed = "Completed", + Deleted = "Deleted", + Disabled = "Disabled", + Enabled = "Enabled", + NotSpecified = "NotSpecified", + Suspended = "Suspended" +} + +// @public +export interface LabelHistory extends ProxyResource { + properties?: LabelHistoryProperties; +} + +// @public +export interface LabelHistoryCollection { + readonly nextLink?: string; + value: LabelHistory[]; +} + +// @public +export interface LabelHistoryProperties { + readonly records?: LabelHistoryRecordItem[]; +} + +// @public +export interface LabelHistoryRecordItem { + readonly revision?: string; + readonly start?: Date; + readonly stop?: Date; +} + +// @public +export type Level = string; + // @public (undocumented) export interface ListUsagesResult { nextLink?: string; @@ -2226,9 +3968,94 @@ export interface ListUsagesResult { // @public export interface LogAnalyticsConfiguration { customerId?: string; + dynamicJsonColumns?: boolean; sharedKey?: string; } +// @public +export interface LoggerSetting { + level: Level; + logger: string; +} + +// @public +export interface LogicApp extends ProxyResource { + properties?: Record; +} + +// @public +export interface LogicApps { + createOrUpdate(resourceGroupName: string, containerAppName: string, logicAppName: string, resource: LogicApp, options?: LogicAppsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, containerAppName: string, logicAppName: string, options?: LogicAppsDeleteOptionalParams): Promise; + deployWorkflowArtifacts(resourceGroupName: string, containerAppName: string, logicAppName: string, options?: LogicAppsDeployWorkflowArtifactsOptionalParams): Promise; + get(resourceGroupName: string, containerAppName: string, logicAppName: string, options?: LogicAppsGetOptionalParams): Promise; + getWorkflow(resourceGroupName: string, containerAppName: string, logicAppName: string, workflowName: string, options?: LogicAppsGetWorkflowOptionalParams): Promise; + invoke(resourceGroupName: string, containerAppName: string, logicAppName: string, xMsLogicAppsProxyPath: string, xMsLogicAppsProxyMethod: LogicAppsProxyMethod, options?: LogicAppsInvokeOptionalParams): Promise; + listWorkflows(resourceGroupName: string, containerAppName: string, logicAppName: string, options?: LogicAppsListWorkflowsOptionalParams): PagedAsyncIterableIterator; + listWorkflowsConnections(resourceGroupName: string, containerAppName: string, logicAppName: string, options?: LogicAppsListWorkflowsConnectionsOptionalParams): Promise; +} + +// @public +export interface LogicAppsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsCreateOrUpdateResponse = LogicApp; + +// @public +export interface LogicAppsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface LogicAppsDeployWorkflowArtifactsOptionalParams extends coreClient.OperationOptions { + workflowArtifacts?: WorkflowArtifacts; +} + +// @public +export interface LogicAppsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsGetResponse = LogicApp; + +// @public +export interface LogicAppsGetWorkflowOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsGetWorkflowResponse = WorkflowEnvelope; + +// @public +export interface LogicAppsInvokeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsInvokeResponse = Record; + +// @public +export interface LogicAppsListWorkflowsConnectionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsListWorkflowsConnectionsResponse = WorkflowEnvelope; + +// @public +export interface LogicAppsListWorkflowsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsListWorkflowsNextResponse = WorkflowEnvelopeCollection; + +// @public +export interface LogicAppsListWorkflowsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type LogicAppsListWorkflowsResponse = WorkflowEnvelopeCollection; + +// @public +export type LogicAppsProxyMethod = string; + // @public export interface Login { allowedExternalRedirectUrls?: string[]; @@ -2252,6 +4079,62 @@ export interface LoginScopes { // @public export type LogLevel = string; +// @public +export interface LogsConfiguration { + destinations?: string[]; +} + +// @public +export interface MaintenanceConfigurationCollection { + readonly nextLink?: string; + value?: MaintenanceConfigurationResource[]; +} + +// @public +export interface MaintenanceConfigurationResource extends ProxyResource { + scheduledEntries?: ScheduledEntry[]; +} + +// @public +export interface MaintenanceConfigurations { + createOrUpdate(resourceGroupName: string, environmentName: string, configName: string, maintenanceConfigurationEnvelope: MaintenanceConfigurationResource, options?: MaintenanceConfigurationsCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, environmentName: string, configName: string, options?: MaintenanceConfigurationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, configName: string, options?: MaintenanceConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: MaintenanceConfigurationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface MaintenanceConfigurationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MaintenanceConfigurationsCreateOrUpdateResponse = MaintenanceConfigurationResource; + +// @public +export interface MaintenanceConfigurationsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface MaintenanceConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MaintenanceConfigurationsGetResponse = MaintenanceConfigurationResource; + +// @public +export interface MaintenanceConfigurationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MaintenanceConfigurationsListNextResponse = MaintenanceConfigurationCollection; + +// @public +export interface MaintenanceConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MaintenanceConfigurationsListResponse = MaintenanceConfigurationCollection; + // @public export interface ManagedCertificate extends TrackedResource { properties?: ManagedCertificateProperties; @@ -2336,7 +4219,9 @@ export type ManagedCertificatesUpdateResponse = ManagedCertificate; // @public export interface ManagedEnvironment extends TrackedResource { + appInsightsConfiguration?: AppInsightsConfiguration; appLogsConfiguration?: AppLogsConfiguration; + availabilityZones?: string[]; customDomainConfiguration?: CustomDomainConfiguration; daprAIConnectionString?: string; daprAIInstrumentationKey?: string; @@ -2344,12 +4229,16 @@ export interface ManagedEnvironment extends TrackedResource { readonly defaultDomain?: string; readonly deploymentErrors?: string; readonly eventStreamEndpoint?: string; + identity?: ManagedServiceIdentity; infrastructureResourceGroup?: string; kedaConfiguration?: KedaConfiguration; kind?: string; + openTelemetryConfiguration?: OpenTelemetryConfiguration; peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; peerTrafficConfiguration?: ManagedEnvironmentPropertiesPeerTrafficConfiguration; + readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: EnvironmentProvisioningState; + publicNetworkAccess?: PublicNetworkAccess; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; workloadProfiles?: WorkloadProfile[]; @@ -2357,24 +4246,98 @@ export interface ManagedEnvironment extends TrackedResource { } // @public -export interface ManagedEnvironmentDiagnostics { - getDetector(resourceGroupName: string, environmentName: string, detectorName: string, options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams): Promise; - listDetectors(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams): Promise; +export interface ManagedEnvironmentDiagnostics { + getDetector(resourceGroupName: string, environmentName: string, detectorName: string, options?: ManagedEnvironmentDiagnosticsGetDetectorOptionalParams): Promise; + listDetectors(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentDiagnosticsListDetectorsOptionalParams): Promise; +} + +// @public +export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; + +// @public +export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; + +// @public +export interface ManagedEnvironmentPrivateEndpointConnections { + beginCreateOrUpdate(resourceGroupName: string, environmentName: string, privateEndpointConnectionName: string, privateEndpointConnectionEnvelope: PrivateEndpointConnection, options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, environmentName: string, privateEndpointConnectionName: string, privateEndpointConnectionEnvelope: PrivateEndpointConnection, options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, environmentName: string, privateEndpointConnectionName: string, options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams): Promise, ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, environmentName: string, privateEndpointConnectionName: string, options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams): Promise; + get(resourceGroupName: string, environmentName: string, privateEndpointConnectionName: string, options?: ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams): Promise; + list(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse = ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders; + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentPrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams extends coreClient.OperationOptions { +export type ManagedEnvironmentPrivateEndpointConnectionsListNextResponse = PrivateEndpointConnectionListResult; + +// @public +export interface ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions { } // @public -export type ManagedEnvironmentDiagnosticsGetDetectorResponse = Diagnostics; +export type ManagedEnvironmentPrivateEndpointConnectionsListResponse = PrivateEndpointConnectionListResult; // @public -export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extends coreClient.OperationOptions { +export interface ManagedEnvironmentPrivateLinkResources { + list(resourceGroupName: string, environmentName: string, options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams): PagedAsyncIterableIterator; } // @public -export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; +export interface ManagedEnvironmentPrivateLinkResourcesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentPrivateLinkResourcesListNextResponse = PrivateLinkResourceListResult; + +// @public +export interface ManagedEnvironmentPrivateLinkResourcesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedEnvironmentPrivateLinkResourcesListResponse = PrivateLinkResourceListResult; // @public export interface ManagedEnvironmentPropertiesPeerAuthentication { @@ -2536,6 +4499,7 @@ export interface ManagedEnvironmentStorage extends ProxyResource { // @public export interface ManagedEnvironmentStorageProperties { azureFile?: AzureFileProperties; + nfsAzureFile?: NfsAzureFileProperties; } // @public @@ -2571,6 +4535,12 @@ export interface ManagedEnvironmentUsagesListOptionalParams extends coreClient.O // @public export type ManagedEnvironmentUsagesListResponse = ListUsagesResult; +// @public +export interface ManagedIdentitySetting { + identity: string; + lifecycle?: IdentitySettingsLifeCycle; +} + // @public export interface ManagedServiceIdentity { readonly principalId?: string; @@ -2581,14 +4551,36 @@ export interface ManagedServiceIdentity { }; } +// @public +export interface ManagedServiceIdentityAutoGenerated { + readonly principalId?: string; + readonly tenantId?: string; + type: ManagedServiceIdentityType; + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; +} + // @public export type ManagedServiceIdentityType = string; +// @public +export interface MetricsConfiguration { + destinations?: string[]; + includeKeda?: boolean; +} + // @public export interface Mtls { enabled?: boolean; } +// @public +export interface NacosComponent extends JavaComponentProperties { + componentType: "Nacos"; + ingress?: JavaComponentIngress; +} + // @public export interface Namespaces { checkNameAvailability(resourceGroupName: string, environmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; @@ -2601,6 +4593,13 @@ export interface NamespacesCheckNameAvailabilityOptionalParams extends coreClien // @public export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +// @public +export interface NfsAzureFileProperties { + accessMode?: AccessMode; + server?: string; + shareName?: string; +} + // @public export interface Nonce { nonceExpirationInterval?: string; @@ -2635,6 +4634,14 @@ export interface OpenIdConnectRegistration { openIdConnectConfiguration?: OpenIdConnectConfig; } +// @public +export interface OpenTelemetryConfiguration { + destinationsConfiguration?: DestinationsConfiguration; + logsConfiguration?: LogsConfiguration; + metricsConfiguration?: MetricsConfiguration; + tracesConfiguration?: TracesConfiguration; +} + // @public export interface OperationDetail { display?: OperationDisplay; @@ -2670,13 +4677,138 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = AvailableOperations; +// @public +export interface OtlpConfiguration { + endpoint?: string; + headers?: Header[]; + insecure?: boolean; + name?: string; +} + +// @public +export type PatchApplyStatus = string; + +// @public +export interface PatchCollection { + nextLink?: string; + value: ContainerAppsPatchResource[]; +} + +// @public +export interface PatchDetails { + readonly detectionStatus: DetectionStatus; + readonly lastDetectionTime: Date; + readonly newImageName?: string; + readonly newLayer?: PatchDetailsNewLayer; + readonly oldLayer?: PatchDetailsOldLayer; + readonly patchType?: PatchType; + readonly targetContainerName: string; + readonly targetImage: string; +} + +// @public +export interface PatchDetailsNewLayer { + frameworkAndVersion?: string; + name?: string; + osAndVersion?: string; +} + +// @public +export interface PatchDetailsOldLayer { + frameworkAndVersion?: string; + name?: string; + osAndVersion?: string; +} + +// @public +export type PatchingMode = string; + +// @public +export interface PatchProperties { + readonly createdAt?: Date; + readonly lastModifiedAt?: Date; + readonly patchApplyStatus?: PatchApplyStatus; + readonly patchDetails?: PatchDetails[]; + targetContainerAppId?: string; + targetEnvironmentId?: string; + targetRevisionId?: string; +} + +// @public +export interface PatchSkipConfig { + skip?: boolean; +} + +// @public +export type PatchType = string; + +// @public +export type PoolManagementType = string; + +// @public +export interface PreBuildStep { + description?: string; + httpGet?: HttpGet; + scripts?: string[]; +} + +// @public +export interface PrivateEndpoint { + readonly id?: string; +} + +// @public +export interface PrivateEndpointConnection extends Resource { + readonly groupIds?: string[]; + privateEndpoint?: PrivateEndpoint; + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +// @public +export interface PrivateEndpointConnectionListResult { + readonly nextLink?: string; + value?: PrivateEndpointConnection[]; +} + +// @public +export type PrivateEndpointConnectionProvisioningState = string; + +// @public +export type PrivateEndpointServiceConnectionStatus = string; + +// @public +export interface PrivateLinkResource extends Resource { + readonly groupId?: string; + readonly requiredMembers?: string[]; + requiredZoneNames?: string[]; +} + +// @public +export interface PrivateLinkResourceListResult { + readonly nextLink?: string; + value?: PrivateLinkResource[]; +} + +// @public +export interface PrivateLinkServiceConnectionState { + actionsRequired?: string; + description?: string; + status?: PrivateEndpointServiceConnectionStatus; +} + // @public export interface ProxyResource extends Resource { } +// @public +export type PublicNetworkAccess = string; + // @public export interface QueueScaleRule { + accountName?: string; auth?: ScaleRuleAuth[]; + identity?: string; queueLength?: number; queueName?: string; } @@ -2713,6 +4845,7 @@ export interface ReplicaCollection { // @public export interface ReplicaContainer { containerId?: string; + readonly debugEndpoint?: string; readonly execEndpoint?: string; readonly logStreamEndpoint?: string; name?: string; @@ -2723,6 +4856,12 @@ export interface ReplicaContainer { started?: boolean; } +// @public +export interface ReplicaExecutionStatus { + containers?: ContainerExecutionStatus[]; + name?: string; +} + // @public export interface Resource { readonly id?: string; @@ -2737,6 +4876,7 @@ export interface Revision extends ProxyResource { readonly createdTime?: Date; readonly fqdn?: string; readonly healthState?: RevisionHealthState; + readonly labels?: string[]; readonly lastActiveTime?: Date; readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; @@ -2761,13 +4901,49 @@ export type RevisionProvisioningState = string; // @public export type RevisionRunningState = string; +// @public +export interface Runtime { + dotnet?: RuntimeDotnet; + java?: RuntimeJava; +} + +// @public +export interface RuntimeDotnet { + autoConfigureDataProtection?: boolean; +} + +// @public +export interface RuntimeJava { + enableMetrics?: boolean; + javaAgent?: RuntimeJavaAgent; +} + +// @public +export interface RuntimeJavaAgent { + enabled?: boolean; + logging?: RuntimeJavaAgentLogging; +} + +// @public +export interface RuntimeJavaAgentLogging { + loggerSettings?: LoggerSetting[]; +} + // @public export interface Scale { + cooldownPeriod?: number; maxReplicas?: number; minReplicas?: number; + pollingInterval?: number; rules?: ScaleRule[]; } +// @public +export interface ScaleConfiguration { + maxConcurrentSessions?: number; + readySessionInstances?: number; +} + // @public export interface ScaleRule { azureQueue?: QueueScaleRule; @@ -2783,6 +4959,22 @@ export interface ScaleRuleAuth { triggerParameter?: string; } +// @public +export interface ScgRoute { + filters?: string[]; + id: string; + order?: number; + predicates?: string[]; + uri: string; +} + +// @public +export interface ScheduledEntry { + durationHours?: number; + startHourUtc: number; + weekDay: WeekDay; +} + // @public export type Scheme = string; @@ -2812,10 +5004,103 @@ export interface Service { // @public export interface ServiceBind { + clientType?: string; + customizedKeys?: { + [propertyName: string]: string; + }; name?: string; serviceId?: string; } +// @public +export interface SessionContainer { + args?: string[]; + command?: string[]; + env?: EnvironmentVar[]; + image?: string; + name?: string; + resources?: SessionContainerResources; +} + +// @public +export interface SessionContainerResources { + cpu?: number; + memory?: string; +} + +// @public +export interface SessionIngress { + targetPort?: number; +} + +// @public +export interface SessionNetworkConfiguration { + status?: SessionNetworkStatus; +} + +// @public +export type SessionNetworkStatus = string; + +// @public +export interface SessionPool extends TrackedResource { + containerType?: ContainerType; + customContainerTemplate?: CustomContainerTemplate; + dynamicPoolConfiguration?: DynamicPoolConfiguration; + environmentId?: string; + identity?: ManagedServiceIdentityAutoGenerated; + managedIdentitySettings?: ManagedIdentitySetting[]; + readonly nodeCount?: number; + readonly poolManagementEndpoint?: string; + poolManagementType?: PoolManagementType; + readonly provisioningState?: SessionPoolProvisioningState; + scaleConfiguration?: ScaleConfiguration; + secrets?: SessionPoolSecret[]; + sessionNetworkConfiguration?: SessionNetworkConfiguration; +} + +// @public +export interface SessionPoolCollection { + readonly nextLink?: string; + value: SessionPool[]; +} + +// @public +export type SessionPoolProvisioningState = string; + +// @public +export interface SessionPoolSecret { + name?: string; + value?: string; +} + +// @public +export interface SessionPoolUpdatableProperties { + customContainerTemplate?: CustomContainerTemplate; + dynamicPoolConfiguration?: DynamicPoolConfiguration; + identity?: ManagedServiceIdentityAutoGenerated; + scaleConfiguration?: ScaleConfiguration; + secrets?: SessionPoolSecret[]; + sessionNetworkConfiguration?: SessionNetworkConfiguration; +} + +// @public +export interface SessionRegistryCredentials { + identity?: string; + passwordSecretRef?: string; + server?: string; + username?: string; +} + +// @public +export interface SmbStorage { + accessMode?: AccessMode; + domain?: string; + host?: string; + password?: string; + shareName?: string; + username?: string; +} + // @public export interface SourceControl extends ProxyResource { branch?: string; @@ -2833,6 +5118,30 @@ export interface SourceControlCollection { // @public export type SourceControlOperationState = string; +// @public +export interface SpringBootAdminComponent extends JavaComponentProperties { + componentType: "SpringBootAdmin"; + ingress?: JavaComponentIngress; +} + +// @public +export interface SpringCloudConfigComponent extends JavaComponentProperties { + componentType: "SpringCloudConfig"; +} + +// @public +export interface SpringCloudEurekaComponent extends JavaComponentProperties { + componentType: "SpringCloudEureka"; + ingress?: JavaComponentIngress; +} + +// @public +export interface SpringCloudGatewayComponent extends JavaComponentProperties { + componentType: "SpringCloudGateway"; + ingress?: JavaComponentIngress; + springCloudGatewayRoutes?: ScgRoute[]; +} + // @public export type StorageType = string; @@ -2846,9 +5155,20 @@ export interface SystemData { lastModifiedByType?: CreatedByType; } +// @public +export interface TcpConnectionPool { + maxConnections?: number; +} + +// @public +export interface TcpRetryPolicy { + maxConnectAttempts?: number; +} + // @public export interface TcpScaleRule { auth?: ScaleRuleAuth[]; + identity?: string; metadata?: { [propertyName: string]: string; }; @@ -2865,6 +5185,12 @@ export interface Template { volumes?: Volume[]; } +// @public +export interface TimeoutPolicy { + connectionTimeoutInSeconds?: number; + responseTimeoutInSeconds?: number; +} + // @public export interface TokenStore { azureBlobStorage?: BlobStorageTokenStore; @@ -2872,6 +5198,12 @@ export interface TokenStore { tokenRefreshExtensionHours?: number; } +// @public +export interface TracesConfiguration { + destinations?: string[]; + includeDapr?: boolean; +} + // @public export interface TrackedResource extends Resource { location: string; @@ -2973,8 +5305,54 @@ export interface VolumeMount { volumeName?: string; } +// @public +export type WeekDay = "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" | "Everyday" | "Weekend"; + +// @public +export interface WorkflowArtifacts { + appSettings?: Record; + files?: Record; + filesToDelete?: string[]; +} + +// @public +export interface WorkflowEnvelope { + readonly id?: string; + kind?: string; + location?: string; + readonly name?: string; + properties?: WorkflowEnvelopeProperties; + readonly type?: string; +} + +// @public +export interface WorkflowEnvelopeCollection { + readonly nextLink?: string; + value: WorkflowEnvelope[]; +} + +// @public +export interface WorkflowEnvelopeProperties { + files?: Record; + flowState?: WorkflowState; + health?: WorkflowHealth; +} + +// @public +export interface WorkflowHealth { + error?: ErrorEntity; + state: WorkflowHealthState; +} + +// @public +export type WorkflowHealthState = "NotSpecified" | "Healthy" | "Unhealthy" | "Unknown"; + +// @public +export type WorkflowState = string; + // @public export interface WorkloadProfile { + enableFips?: boolean; maximumCount?: number; minimumCount?: number; name: string; diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index ca0a17a215f0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/availableWorkloadProfilesGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts deleted file mode 100644 index 64ffde8e9938..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/billingMetersGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 497d7da5abe7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - 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 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 - */ -async function createOrUpdateCertificate() { - 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 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(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts deleted file mode 100644 index 7622ba077341..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts deleted file mode 100644 index d8231231729f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts deleted file mode 100644 index f0b86bc276ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts deleted file mode 100644 index cd19eae6717d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/certificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - CertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function patchCertificate() { - 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: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 7c56eb5882aa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - Certificate, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - 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 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 - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = - { certificateEnvelope }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index b90953e38c8f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index cc27ee5b8041..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 6f40d97b6846..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 1bd6d2bbf7e5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - CertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 1f4949232633..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index d896102dad1e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 { - ConnectedEnvironment, - 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 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 - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index bcae97a56396..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 { - DaprComponent, - 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 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 - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = - await client.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index d090647de52d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index 75ea7e2370f3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 92ccce214c99..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index d20b767e0693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 0e400e114a37..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts deleted file mode 100644 index 6630731487b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 4245f7b597ed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index e2b04751a4f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 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 - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index e13f23e5a377..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - ConnectedEnvironmentStorage, - 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 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 - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index ee461a360d51..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 792bb5cdcfb6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 891a0008d884..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index 6e02a2546c3e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index e82a437e53fd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { AuthConfig, 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 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 - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope: AuthConfig = { - encryptionSettings: { - containerAppAuthEncryptionSecretName: "testEncryptionSecretName", - containerAppAuthSigningSecretName: "testSigningSecretName", - }, - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index b76afd6edf11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 6ae780dfd8fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 546e3c577b82..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 817d7138222a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 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 { ContainerApp, 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 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 - */ -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 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/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, - service: { type: "redis" }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - 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.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "redisService", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService", - }, - ], - }, - 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/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 - */ -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 containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerapptcp-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerapptcp", - image: "repo/testcontainerapptcp: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); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts deleted file mode 100644 index accd271c5073..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index a4baf350ecdb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName, - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index 2cd981157598..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index ffed43abe9b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index ef59b43c2dda..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index 60f640b0628a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsDiagnosticsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index aec7fc0f7e4f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts deleted file mode 100644 index 5cd40ad86e28..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index b34660364d3a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsByResourceGroup() { - 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.containerApps.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 286f548b65a6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsBySubscription() { - 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.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 4b81c63455be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -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 customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options, - ); - console.log(result); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts deleted file mode 100644 index eb341ae13fc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 8293b8d9d4c4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index e16f1cb877bb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 2a51e79ba18b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index b86121a96331..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 1d370639648f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index b5ff0bde4e42..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index 5d0b53df0b26..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 9ca379060247..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 { - SourceControl, - 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 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 - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - kind: "feaderated", - tenantId: "", - }, - contextPath: "./", - githubPersonalAccessToken: "test", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "test-registry.azurecr.io", - registryUserName: "test-registry", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = - await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index ba4462ac8be0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index e66adce267db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index be7683459d62..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStartSample.ts deleted file mode 100644 index 52453015347a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStartSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStartAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - startContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStopSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStopSample.ts deleted file mode 100644 index 5b1e617c8c74..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsStopSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStopAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - stopContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 44401a1faaf0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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 { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -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 containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - ingress: { - 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, - service: { type: "redis" }, - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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", - image: "repo/testcontainerapp0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "service", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service", - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope, - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 18b184c0c9b6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 { - DaprComponent, - 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 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 - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secretStoreComponent: "my-secret-store", - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -/** - * 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 - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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 = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts deleted file mode 100644 index d4510a70df57..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts deleted file mode 100644 index 29c357445de7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsGetSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -/** - * 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/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts deleted file mode 100644 index d7ada620025c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts deleted file mode 100644 index 145ea5f7f2fc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/getCustomDomainVerificationIdSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/getCustomDomainVerificationIdSample.ts deleted file mode 100644 index 23dad78a106d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/getCustomDomainVerificationIdSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 verification id of a subscription used for verifying custom domains - * - * @summary Get the verification id of a subscription used for verifying custom domains - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Subscriptions_GetCustomDomainVerificationId.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "d27c3573-f76e-4b26-b871-0ccd2203d08c"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.getCustomDomainVerificationId(); - console.log(result); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobExecutionSample.ts deleted file mode 100644 index 5d45b842267e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 of a single job execution - * - * @summary Get details of a single job execution - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Execution_Get.json - */ -async function getASingleJobExecution() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobExecution( - resourceGroupName, - jobName, - jobExecutionName, - ); - console.log(result); -} - -async function main() { - getASingleJobExecution(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 8d8d7a3158c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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 { Job, 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 Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: Job = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 5, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate_EventTrigger.json - */ -async function createOrUpdateContainerAppsJobWithEventDrivenTrigger() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: Job = { - configuration: { - eventTriggerConfig: { - parallelism: 4, - replicaCompletionCount: 1, - scale: { - maxExecutions: 5, - minExecutions: 1, - pollingInterval: 40, - rules: [ - { - name: "servicebuscalingrule", - type: "azure-servicebus", - metadata: { topicName: "my-topic" }, - }, - ], - }, - }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Event", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); - createOrUpdateContainerAppsJobWithEventDrivenTrigger(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts deleted file mode 100644 index a7bf3aacb318..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testworkercontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait( - resourceGroupName, - jobName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts deleted file mode 100644 index db27d6bf97ba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsExecutionsListSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list( - resourceGroupName, - jobName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetDetectorSample.ts deleted file mode 100644 index 4186505aee99..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 diagnostics data for a Container App Job. - * - * @summary Get the diagnostics data for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_GetDetector.json - */ -async function getDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const detectorName = "containerappjobnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.getDetector( - resourceGroupName, - jobName, - detectorName, - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts deleted file mode 100644 index 37ffca3189e5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts deleted file mode 100644 index 568123497625..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListByResourceGroupSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - 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.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts deleted file mode 100644 index 269cf61221ba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - 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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListDetectorsSample.ts deleted file mode 100644 index 2d193de01a12..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListDetectorsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 list of diagnostics for a Container App Job. - * - * @summary Get the list of diagnostics for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListDetectors.json - */ -async function getTheListOfAvailableDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listDetectors( - resourceGroupName, - jobName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts deleted file mode 100644 index 6fe7b0d1d976..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsProxyGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsProxyGetSample.ts deleted file mode 100644 index 93ec89f3d4e6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsProxyGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 Container App Job. - * - * @summary Get the properties of a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ProxyGet.json - */ -async function getContainerAppJobByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const apiName = "rootApi"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.proxyGet( - resourceGroupName, - jobName, - apiName, - ); - console.log(result); -} - -async function main() { - getContainerAppJobByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts deleted file mode 100644 index df2539cac0f1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 { - JobExecutionTemplate, - JobsStartOptionalParams, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const template: JobExecutionTemplate = { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }; - const options: JobsStartOptionalParams = { template }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - options, - ); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts deleted file mode 100644 index 6b5e7d4f6aed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName, - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts deleted file mode 100644 index 64bc170f328e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts deleted file mode 100644 index 1066bc92a3cd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 { - JobPatchProperties, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: JobPatchProperties = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index afdd2c31a547..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 { - ManagedCertificate, - ManagedCertificatesCreateOrUpdateOptionalParams, - 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 Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificate = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net", - }, - }; - const options: ManagedCertificatesCreateOrUpdateOptionalParams = { - managedCertificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts deleted file mode 100644 index bb578034fd12..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts deleted file mode 100644 index 39b8f9d4b5b6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts deleted file mode 100644 index 9ec87147c4db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts deleted file mode 100644 index 43f33c2ae45d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - ManagedCertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 5da198e41463..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName, - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index b4eca97c1c5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentUsagesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentUsagesListSample.ts deleted file mode 100644 index 648f93d91de5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentUsagesListSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 current usage information as well as the limits for environment. - * - * @summary Gets the current usage information as well as the limits for environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentUsages_List.json - */ -async function listManagedEnvironmentUsages() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironmentUsages.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedEnvironmentUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index fd9139910a8b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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 { - ManagedEnvironment, - 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 Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - peerAuthentication: { mtls: { enabled: true } }, - peerTrafficConfiguration: { encryption: { enabled: true } }, - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 193df4d1cb4a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index af65f155b9f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index de06209dd522..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts deleted file mode 100644 index 3d2aab1a72f2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 42ce2e5af7d9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index b7058dc1616c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index 8491cd5c0a16..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 35e703584d0e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - ManagedEnvironmentStorage, - 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 storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 4ddf49304337..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index bfb04c4c8479..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 405cc679e92f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index b918b7c81841..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - ManagedEnvironment, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 398877810136..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts deleted file mode 100644 index 8ea3fb505beb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - 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.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples-dev/usagesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/usagesListSample.ts deleted file mode 100644 index 84de9ecf7403..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/usagesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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, for the specified location, the current resource usage information as well as the limits under the subscription. - * - * @summary Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Usages_List.json - */ -async function listUsages() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/README.md deleted file mode 100644 index 7719290dcc4f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/README.md +++ /dev/null @@ -1,256 +0,0 @@ -# client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableWorkloadProfilesGetSample.js][availableworkloadprofilesgetsample] | 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 | -| [billingMetersGetSample.js][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.js][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.js][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Delete.json | -| [certificatesGetSample.js][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Get.json | -| [certificatesListSample.js][certificateslistsample] | 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 | -| [certificatesUpdateSample.js][certificatesupdatesample] | 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 | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.js][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.js][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.js][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.js][connectedenvironmentscertificateslistsample] | 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 | -| [connectedEnvironmentsCertificatesUpdateSample.js][connectedenvironmentscertificatesupdatesample] | 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 | -| [connectedEnvironmentsCheckNameAvailabilitySample.js][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.js][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js][connectedenvironmentsdaprcomponentscreateorupdatesample] | 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 | -| [connectedEnvironmentsDaprComponentsDeleteSample.js][connectedenvironmentsdaprcomponentsdeletesample] | 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 | -| [connectedEnvironmentsDaprComponentsGetSample.js][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.js][connectedenvironmentsdaprcomponentslistsample] | 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 | -| [connectedEnvironmentsDaprComponentsListSecretsSample.js][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.js][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.js][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.js][connectedenvironmentslistbyresourcegroupsample] | 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 | -| [connectedEnvironmentsListBySubscriptionSample.js][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.js][connectedenvironmentsstoragescreateorupdatesample] | 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 | -| [connectedEnvironmentsStoragesDeleteSample.js][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.js][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.js][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.js][connectedenvironmentsupdatesample] | 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 | -| [containerAppsAuthConfigsCreateOrUpdateSample.js][containerappsauthconfigscreateorupdatesample] | 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 | -| [containerAppsAuthConfigsDeleteSample.js][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.js][containerappsauthconfigsgetsample] | 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 | -| [containerAppsAuthConfigsListByContainerAppSample.js][containerappsauthconfigslistbycontainerappsample] | 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 | -| [containerAppsCreateOrUpdateSample.js][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.js][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.js][containerappsdiagnosticsgetdetectorsample] | 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 | -| [containerAppsDiagnosticsGetRevisionSample.js][containerappsdiagnosticsgetrevisionsample] | 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 | -| [containerAppsDiagnosticsGetRootSample.js][containerappsdiagnosticsgetrootsample] | 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 | -| [containerAppsDiagnosticsListDetectorsSample.js][containerappsdiagnosticslistdetectorssample] | 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 | -| [containerAppsDiagnosticsListRevisionsSample.js][containerappsdiagnosticslistrevisionssample] | 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 | -| [containerAppsGetAuthTokenSample.js][containerappsgetauthtokensample] | 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 | -| [containerAppsGetSample.js][containerappsgetsample] | 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 | -| [containerAppsListByResourceGroupSample.js][containerappslistbyresourcegroupsample] | 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 | -| [containerAppsListBySubscriptionSample.js][containerappslistbysubscriptionsample] | 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 | -| [containerAppsListCustomHostNameAnalysisSample.js][containerappslistcustomhostnameanalysissample] | 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 | -| [containerAppsListSecretsSample.js][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.js][containerappsrevisionreplicasgetreplicasample] | 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 | -| [containerAppsRevisionReplicasListReplicasSample.js][containerappsrevisionreplicaslistreplicassample] | 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 | -| [containerAppsRevisionsActivateRevisionSample.js][containerappsrevisionsactivaterevisionsample] | 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 | -| [containerAppsRevisionsDeactivateRevisionSample.js][containerappsrevisionsdeactivaterevisionsample] | 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 | -| [containerAppsRevisionsGetRevisionSample.js][containerappsrevisionsgetrevisionsample] | 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 | -| [containerAppsRevisionsListRevisionsSample.js][containerappsrevisionslistrevisionssample] | 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 | -| [containerAppsRevisionsRestartRevisionSample.js][containerappsrevisionsrestartrevisionsample] | 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 | -| [containerAppsSourceControlsCreateOrUpdateSample.js][containerappssourcecontrolscreateorupdatesample] | 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 | -| [containerAppsSourceControlsDeleteSample.js][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.js][containerappssourcecontrolsgetsample] | 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 | -| [containerAppsSourceControlsListByContainerAppSample.js][containerappssourcecontrolslistbycontainerappsample] | 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 | -| [containerAppsStartSample.js][containerappsstartsample] | Start a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Start.json | -| [containerAppsStopSample.js][containerappsstopsample] | Stop a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Stop.json | -| [containerAppsUpdateSample.js][containerappsupdatesample] | 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 | -| [daprComponentsCreateOrUpdateSample.js][daprcomponentscreateorupdatesample] | 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 | -| [daprComponentsDeleteSample.js][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.js][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.js][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.js][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_ListSecrets.json | -| [getCustomDomainVerificationIdSample.js][getcustomdomainverificationidsample] | Get the verification id of a subscription used for verifying custom domains x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Subscriptions_GetCustomDomainVerificationId.json | -| [jobExecutionSample.js][jobexecutionsample] | Get details of a single job execution x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Execution_Get.json | -| [jobsCreateOrUpdateSample.js][jobscreateorupdatesample] | Create or Update a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate.json | -| [jobsDeleteSample.js][jobsdeletesample] | Delete a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Delete.json | -| [jobsExecutionsListSample.js][jobsexecutionslistsample] | Get a Container Apps Job's executions x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Executions_Get.json | -| [jobsGetDetectorSample.js][jobsgetdetectorsample] | Get the diagnostics data for a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_GetDetector.json | -| [jobsGetSample.js][jobsgetsample] | Get the properties of a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Get.json | -| [jobsListByResourceGroupSample.js][jobslistbyresourcegroupsample] | Get the Container Apps Jobs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListByResourceGroup.json | -| [jobsListBySubscriptionSample.js][jobslistbysubscriptionsample] | Get the Container Apps Jobs in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListBySubscription.json | -| [jobsListDetectorsSample.js][jobslistdetectorssample] | Get the list of diagnostics for a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListDetectors.json | -| [jobsListSecretsSample.js][jobslistsecretssample] | List secrets for a container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListSecrets.json | -| [jobsProxyGetSample.js][jobsproxygetsample] | Get the properties of a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ProxyGet.json | -| [jobsStartSample.js][jobsstartsample] | Start a Container Apps Job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Start.json | -| [jobsStopExecutionSample.js][jobsstopexecutionsample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Execution.json | -| [jobsStopMultipleExecutionsSample.js][jobsstopmultipleexecutionssample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Multiple.json | -| [jobsUpdateSample.js][jobsupdatesample] | Patches a Container Apps Job using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Patch.json | -| [managedCertificatesCreateOrUpdateSample.js][managedcertificatescreateorupdatesample] | Create or Update a Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_CreateOrUpdate.json | -| [managedCertificatesDeleteSample.js][managedcertificatesdeletesample] | Deletes the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Delete.json | -| [managedCertificatesGetSample.js][managedcertificatesgetsample] | Get the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Get.json | -| [managedCertificatesListSample.js][managedcertificateslistsample] | Get the Managed Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_ListByManagedEnvironment.json | -| [managedCertificatesUpdateSample.js][managedcertificatesupdatesample] | Patches a managed certificate. Oly patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_Patch.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.js][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.js][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_List.json | -| [managedEnvironmentUsagesListSample.js][managedenvironmentusageslistsample] | Gets the current usage information as well as the limits for environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentUsages_List.json | -| [managedEnvironmentsCreateOrUpdateSample.js][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json | -| [managedEnvironmentsDeleteSample.js][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.js][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.js][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_GetAuthToken.json | -| [managedEnvironmentsGetSample.js][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.js][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.js][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.js][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.js][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.js][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.js][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.js][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.js][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.js][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Operations_List.json | -| [usagesListSample.js][usageslistsample] | Gets, for the specified location, the current resource usage information as well as the limits under the subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Usages_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node availableWorkloadProfilesGetSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env APPCONTAINERS_SUBSCRIPTION_ID="" node availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/availableWorkloadProfilesGetSample.js -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/billingMetersGetSample.js -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesCreateOrUpdateSample.js -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesDeleteSample.js -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesGetSample.js -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesListSample.js -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesUpdateSample.js -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesDeleteSample.js -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesGetSample.js -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesListSample.js -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesUpdateSample.js -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsGetSample.js -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSample.js -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDeleteSample.js -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsGetSample.js -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListByResourceGroupSample.js -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListBySubscriptionSample.js -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesDeleteSample.js -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesGetSample.js -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesListSample.js -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsUpdateSample.js -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsDeleteSample.js -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsGetSample.js -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsListByContainerAppSample.js -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsCreateOrUpdateSample.js -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDeleteSample.js -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetDetectorSample.js -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRevisionSample.js -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRootSample.js -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListDetectorsSample.js -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListRevisionsSample.js -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetAuthTokenSample.js -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetSample.js -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListByResourceGroupSample.js -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListBySubscriptionSample.js -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListCustomHostNameAnalysisSample.js -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListSecretsSample.js -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasGetReplicaSample.js -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasListReplicasSample.js -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsActivateRevisionSample.js -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsDeactivateRevisionSample.js -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsGetRevisionSample.js -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsListRevisionsSample.js -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsRestartRevisionSample.js -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsCreateOrUpdateSample.js -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsDeleteSample.js -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsGetSample.js -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsListByContainerAppSample.js -[containerappsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStartSample.js -[containerappsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStopSample.js -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsUpdateSample.js -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsCreateOrUpdateSample.js -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsDeleteSample.js -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsGetSample.js -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSample.js -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSecretsSample.js -[getcustomdomainverificationidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/getCustomDomainVerificationIdSample.js -[jobexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobExecutionSample.js -[jobscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsCreateOrUpdateSample.js -[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsDeleteSample.js -[jobsexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsExecutionsListSample.js -[jobsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetDetectorSample.js -[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetSample.js -[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListByResourceGroupSample.js -[jobslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListBySubscriptionSample.js -[jobslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListDetectorsSample.js -[jobslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListSecretsSample.js -[jobsproxygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsProxyGetSample.js -[jobsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStartSample.js -[jobsstopexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopExecutionSample.js -[jobsstopmultipleexecutionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopMultipleExecutionsSample.js -[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsUpdateSample.js -[managedcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesCreateOrUpdateSample.js -[managedcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesDeleteSample.js -[managedcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesGetSample.js -[managedcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesListSample.js -[managedcertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesUpdateSample.js -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js -[managedenvironmentusageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentUsagesListSample.js -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsCreateOrUpdateSample.js -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDeleteSample.js -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDiagnosticsGetRootSample.js -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetAuthTokenSample.js -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetSample.js -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListByResourceGroupSample.js -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListBySubscriptionSample.js -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesDeleteSample.js -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesGetSample.js -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesListSample.js -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsUpdateSample.js -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/namespacesCheckNameAvailabilitySample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/operationsListSample.js -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/usagesListSample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/availableWorkloadProfilesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/availableWorkloadProfilesGetSample.js deleted file mode 100644 index 773e99c9c9d0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/availableWorkloadProfilesGetSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/billingMetersGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/billingMetersGetSample.js deleted file mode 100644 index e5a5f7c13f63..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/billingMetersGetSample.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesCreateOrUpdateSample.js deleted file mode 100644 index f24f54702144..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateCertificate() { - 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 = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options = { - 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(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesDeleteSample.js deleted file mode 100644 index d9be3ef62af9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesGetSample.js deleted file mode 100644 index 9706ace242ef..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get(resourceGroupName, environmentName, certificateName); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesListSample.js deleted file mode 100644 index 67b94d723b6d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesUpdateSample.js deleted file mode 100644 index 3ffe1a5e2237..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/certificatesUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function patchCertificate() { - 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 = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js deleted file mode 100644 index 50edf594427b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options = { certificateEnvelope }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesDeleteSample.js deleted file mode 100644 index 16ac4d0c1b2a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesGetSample.js deleted file mode 100644 index 902d79d7a221..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesListSample.js deleted file mode 100644 index 4f48d6c40339..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesUpdateSample.js deleted file mode 100644 index 6f28ee8966e2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCertificatesUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js deleted file mode 100644 index 5bf1d3cff28d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCheckNameAvailabilitySample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index d6af883aa343..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js deleted file mode 100644 index c26b02b74214..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js deleted file mode 100644 index e2efc3910e39..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsGetSample.js deleted file mode 100644 index b24e5b9cadd7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSample.js deleted file mode 100644 index 4ec656cdf428..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js deleted file mode 100644 index fa40243ceebe..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDaprComponentsListSecretsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDeleteSample.js deleted file mode 100644 index 0c8654dc4dde..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsGetSample.js deleted file mode 100644 index 15af82c8c5ca..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsGetSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index 7d2b0704d650..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index 1e0eb3b3f762..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 261f206e46a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 887fe1ce7b35..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesGetSample.js deleted file mode 100644 index 5bca477349a0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesListSample.js deleted file mode 100644 index 0de3b44b8f75..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsUpdateSample.js deleted file mode 100644 index 5aa3723e8ee5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/connectedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js deleted file mode 100644 index ed78b4071c05..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsCreateOrUpdateSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope = { - encryptionSettings: { - containerAppAuthEncryptionSecretName: "testEncryptionSecretName", - containerAppAuthSigningSecretName: "testSigningSecretName", - }, - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsDeleteSample.js deleted file mode 100644 index dcd12c2b363d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsGetSample.js deleted file mode 100644 index 8d994cdff5d7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsListByContainerAppSample.js deleted file mode 100644 index 3969119cb0ba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsAuthConfigsListByContainerAppSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsCreateOrUpdateSample.js deleted file mode 100644 index c462f908c108..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsCreateOrUpdateSample.js +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 containerAppEnvelope = { - 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/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, - service: { type: "redis" }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - 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.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "redisService", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService", - }, - ], - }, - 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/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 = { - 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 - */ -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 containerAppEnvelope = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerapptcp-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerapptcp", - image: "repo/testcontainerapptcp: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); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDeleteSample.js deleted file mode 100644 index 82b36fb81b5e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetDetectorSample.js deleted file mode 100644 index d3be4d18e72e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetDetectorSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName, - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRevisionSample.js deleted file mode 100644 index a4abb9810ad3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRevisionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRootSample.js deleted file mode 100644 index a5d39d3f7eaf..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsGetRootSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListDetectorsSample.js deleted file mode 100644 index 5ff6b9887545..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListDetectorsSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListRevisionsSample.js deleted file mode 100644 index 61bd9ae32baa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsDiagnosticsListRevisionsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetAuthTokenSample.js deleted file mode 100644 index de75e6188641..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetAuthTokenSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetSample.js deleted file mode 100644 index 94b7cd31ae03..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListByResourceGroupSample.js deleted file mode 100644 index 1563c8218fc4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppsByResourceGroup() { - 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.containerApps.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListBySubscriptionSample.js deleted file mode 100644 index dcc74c3e5094..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppsBySubscription() { - 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.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListCustomHostNameAnalysisSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListCustomHostNameAnalysisSample.js deleted file mode 100644 index ba1e5797af8e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListCustomHostNameAnalysisSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 customHostname = "my.name.corp"; - const options = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options, - ); - console.log(result); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListSecretsSample.js deleted file mode 100644 index 0faae015a4d7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsListSecretsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasGetReplicaSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasGetReplicaSample.js deleted file mode 100644 index f02337c39b78..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasGetReplicaSample.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasListReplicasSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasListReplicasSample.js deleted file mode 100644 index 4ffd99c097b6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionReplicasListReplicasSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsActivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsActivateRevisionSample.js deleted file mode 100644 index f5f2b8168fb2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsActivateRevisionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsDeactivateRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsDeactivateRevisionSample.js deleted file mode 100644 index c54e5d1657fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsDeactivateRevisionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsGetRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsGetRevisionSample.js deleted file mode 100644 index 38e92b611c70..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsGetRevisionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsListRevisionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsListRevisionsSample.js deleted file mode 100644 index 699117c19b57..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsListRevisionsSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsRestartRevisionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsRestartRevisionSample.js deleted file mode 100644 index 401af1bab748..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsRevisionsRestartRevisionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsCreateOrUpdateSample.js deleted file mode 100644 index b997ab1256b5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsCreateOrUpdateSample.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - kind: "feaderated", - tenantId: "", - }, - contextPath: "./", - githubPersonalAccessToken: "test", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "test-registry.azurecr.io", - registryUserName: "test-registry", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsDeleteSample.js deleted file mode 100644 index 51a52afada3e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsGetSample.js deleted file mode 100644 index 77941ebaac43..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsListByContainerAppSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsListByContainerAppSample.js deleted file mode 100644 index 51a17a185d13..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsSourceControlsListByContainerAppSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStartSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStartSample.js deleted file mode 100644 index 67fadf032896..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStartSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStartAndWait(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - startContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStopSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStopSample.js deleted file mode 100644 index 75a93508e032..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsStopSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStopAndWait(resourceGroupName, containerAppName); - console.log(result); -} - -async function main() { - stopContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsUpdateSample.js deleted file mode 100644 index c897c74d5d0d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/containerAppsUpdateSample.js +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -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 containerAppEnvelope = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - ingress: { - 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, - service: { type: "redis" }, - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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", - image: "repo/testcontainerapp0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "service", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service", - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope, - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsCreateOrUpdateSample.js deleted file mode 100644 index 6abf1e22e43f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsCreateOrUpdateSample.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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 - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secretStoreComponent: "my-secret-store", - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -/** - * 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 - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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 = "reddog"; - const daprComponentEnvelope = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsDeleteSample.js deleted file mode 100644 index 3900784d51e6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsGetSample.js deleted file mode 100644 index a2e2f346ff0d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsGetSample.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, componentName); - console.log(result); -} - -/** - * 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/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get(resourceGroupName, environmentName, componentName); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSample.js deleted file mode 100644 index 16aa92620dfa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSecretsSample.js deleted file mode 100644 index b27df31ff7d2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/daprComponentsListSecretsSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("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/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/getCustomDomainVerificationIdSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/getCustomDomainVerificationIdSample.js deleted file mode 100644 index 96f8132607c3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/getCustomDomainVerificationIdSample.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the verification id of a subscription used for verifying custom domains - * - * @summary Get the verification id of a subscription used for verifying custom domains - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Subscriptions_GetCustomDomainVerificationId.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "d27c3573-f76e-4b26-b871-0ccd2203d08c"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.getCustomDomainVerificationId(); - console.log(result); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobExecutionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobExecutionSample.js deleted file mode 100644 index f08faae1b731..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobExecutionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get details of a single job execution - * - * @summary Get details of a single job execution - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Execution_Get.json - */ -async function getASingleJobExecution() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobExecution(resourceGroupName, jobName, jobExecutionName); - console.log(result); -} - -async function main() { - getASingleJobExecution(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsCreateOrUpdateSample.js deleted file mode 100644 index 45fad0ade3b5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsCreateOrUpdateSample.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 5, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate_EventTrigger.json - */ -async function createOrUpdateContainerAppsJobWithEventDrivenTrigger() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope = { - configuration: { - eventTriggerConfig: { - parallelism: 4, - replicaCompletionCount: 1, - scale: { - maxExecutions: 5, - minExecutions: 1, - pollingInterval: 40, - rules: [ - { - name: "servicebuscalingrule", - type: "azure-servicebus", - metadata: { topicName: "my-topic" }, - }, - ], - }, - }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Event", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); - createOrUpdateContainerAppsJobWithEventDrivenTrigger(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsDeleteSample.js deleted file mode 100644 index 1409ef4e0aa2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsDeleteSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Container Apps Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testworkercontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsExecutionsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsExecutionsListSample.js deleted file mode 100644 index d608ec7e927f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsExecutionsListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get a Container Apps Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list(resourceGroupName, jobName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetDetectorSample.js deleted file mode 100644 index 9e3e26c2404a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetDetectorSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Container App Job. - * - * @summary Get the diagnostics data for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_GetDetector.json - */ -async function getDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const detectorName = "containerappjobnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.getDetector(resourceGroupName, jobName, detectorName); - console.log(result); -} - -async function main() { - getDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetSample.js deleted file mode 100644 index a34a74f8e197..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of a Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListByResourceGroupSample.js deleted file mode 100644 index b435d384fe26..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - 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.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListBySubscriptionSample.js deleted file mode 100644 index b2536be9a472..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - 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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListDetectorsSample.js deleted file mode 100644 index 912d7c066627..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListDetectorsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Container App Job. - * - * @summary Get the list of diagnostics for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListDetectors.json - */ -async function getTheListOfAvailableDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listDetectors(resourceGroupName, jobName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListSecretsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListSecretsSample.js deleted file mode 100644 index c9d70b6ea44b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsListSecretsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to List secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsProxyGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsProxyGetSample.js deleted file mode 100644 index 6c78ec3b2b9f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsProxyGetSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of a Container App Job. - * - * @summary Get the properties of a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ProxyGet.json - */ -async function getContainerAppJobByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const apiName = "rootApi"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.proxyGet(resourceGroupName, jobName, apiName); - console.log(result); -} - -async function main() { - getContainerAppJobByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStartSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStartSample.js deleted file mode 100644 index 177bfab109f8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStartSample.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const template = { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }; - const options = { template }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait(resourceGroupName, jobName, options); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopExecutionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopExecutionSample.js deleted file mode 100644 index feb8622544a9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopExecutionSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName, - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopMultipleExecutionsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopMultipleExecutionsSample.js deleted file mode 100644 index 28254fb7df6b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsStopMultipleExecutionsSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsUpdateSample.js deleted file mode 100644 index f745125a1307..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/jobsUpdateSample.js +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait(resourceGroupName, jobName, jobEnvelope); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesCreateOrUpdateSample.js deleted file mode 100644 index d7da45463e99..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or Update a Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net", - }, - }; - const options = { - managedCertificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesDeleteSample.js deleted file mode 100644 index 421ad60c365a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesGetSample.js deleted file mode 100644 index 4592f591813d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesListSample.js deleted file mode 100644 index 4594a2458f3f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesListSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesUpdateSample.js deleted file mode 100644 index a66241110b79..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedCertificatesUpdateSample.js +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js deleted file mode 100644 index 82fa47bfec84..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsGetDetectorSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName, - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js deleted file mode 100644 index 3a0ce2761804..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentDiagnosticsListDetectorsSample.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentUsagesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentUsagesListSample.js deleted file mode 100644 index 0267a8916aa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentUsagesListSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets the current usage information as well as the limits for environment. - * - * @summary Gets the current usage information as well as the limits for environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentUsages_List.json - */ -async function listManagedEnvironmentUsages() { - const subscriptionId = process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironmentUsages.list(resourceGroupName, environmentName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedEnvironmentUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsCreateOrUpdateSample.js deleted file mode 100644 index 7f6f3f1fb369..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsCreateOrUpdateSample.js +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - peerAuthentication: { mtls: { enabled: true } }, - peerTrafficConfiguration: { encryption: { enabled: true } }, - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDeleteSample.js deleted file mode 100644 index 943ea302c0de..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDeleteSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete a Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDiagnosticsGetRootSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDiagnosticsGetRootSample.js deleted file mode 100644 index ed3c7df49bcd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsDiagnosticsGetRootSample.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetAuthTokenSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetAuthTokenSample.js deleted file mode 100644 index b264c37d4870..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetAuthTokenSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetSample.js deleted file mode 100644 index 8e4f1dbb62d4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsGetSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get the properties of a Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListByResourceGroupSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListByResourceGroupSample.js deleted file mode 100644 index b9cee73965b1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListByResourceGroupSample.js +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListBySubscriptionSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListBySubscriptionSample.js deleted file mode 100644 index ae2dc3168bd3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListBySubscriptionSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js deleted file mode 100644 index a72cb52d60fc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsListWorkloadProfileStatesSample.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js deleted file mode 100644 index 9b4a0e41c0e6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesCreateOrUpdateSample.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Create or update storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesDeleteSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesDeleteSample.js deleted file mode 100644 index 09d68b270c33..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesDeleteSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Delete storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesGetSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesGetSample.js deleted file mode 100644 index d14ada8efdda..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesGetSample.js +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesListSample.js deleted file mode 100644 index e3977f17844c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsStoragesListSample.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Get all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list(resourceGroupName, environmentName); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsUpdateSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsUpdateSample.js deleted file mode 100644 index bfda72bec74a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/managedEnvironmentsUpdateSample.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/namespacesCheckNameAvailabilitySample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/namespacesCheckNameAvailabilitySample.js deleted file mode 100644 index f8ca61b23d1b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/namespacesCheckNameAvailabilitySample.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/operationsListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/operationsListSample.js deleted file mode 100644 index 8f5095af917a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/operationsListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - 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.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/package.json deleted file mode 100644 index c20edcef9995..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-js", - "private": true, - "version": "1.0.0", - "description": " client library samples for JavaScript", - "engines": { - "node": ">=18.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "latest", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/usagesListSample.js b/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/usagesListSample.js deleted file mode 100644 index 2a699575a9c8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/javascript/usagesListSample.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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. -const { ContainerAppsAPIClient } = require("@azure/arm-appcontainers"); -const { DefaultAzureCredential } = require("@azure/identity"); -require("dotenv").config(); - -/** - * This sample demonstrates how to Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - * - * @summary Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Usages_List.json - */ -async function listUsages() { - const subscriptionId = process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/README.md b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/README.md deleted file mode 100644 index 225eb115235d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/README.md +++ /dev/null @@ -1,269 +0,0 @@ -# client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for in some common scenarios. - -| **File Name** | **Description** | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [availableWorkloadProfilesGetSample.ts][availableworkloadprofilesgetsample] | 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 | -| [billingMetersGetSample.ts][billingmetersgetsample] | Get all billingMeters for a location. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/BillingMeters_Get.json | -| [certificatesCreateOrUpdateSample.ts][certificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_CreateOrUpdate.json | -| [certificatesDeleteSample.ts][certificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Delete.json | -| [certificatesGetSample.ts][certificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificate_Get.json | -| [certificatesListSample.ts][certificateslistsample] | 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 | -| [certificatesUpdateSample.ts][certificatesupdatesample] | 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 | -| [connectedEnvironmentsCertificatesCreateOrUpdateSample.ts][connectedenvironmentscertificatescreateorupdatesample] | Create or Update a Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json | -| [connectedEnvironmentsCertificatesDeleteSample.ts][connectedenvironmentscertificatesdeletesample] | Deletes the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Delete.json | -| [connectedEnvironmentsCertificatesGetSample.ts][connectedenvironmentscertificatesgetsample] | Get the specified Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificate_Get.json | -| [connectedEnvironmentsCertificatesListSample.ts][connectedenvironmentscertificateslistsample] | 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 | -| [connectedEnvironmentsCertificatesUpdateSample.ts][connectedenvironmentscertificatesupdatesample] | 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 | -| [connectedEnvironmentsCheckNameAvailabilitySample.ts][connectedenvironmentschecknameavailabilitysample] | Checks if resource connectedEnvironmentName is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json | -| [connectedEnvironmentsCreateOrUpdateSample.ts][connectedenvironmentscreateorupdatesample] | Creates or updates an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_CreateOrUpdate.json | -| [connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts][connectedenvironmentsdaprcomponentscreateorupdatesample] | 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 | -| [connectedEnvironmentsDaprComponentsDeleteSample.ts][connectedenvironmentsdaprcomponentsdeletesample] | 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 | -| [connectedEnvironmentsDaprComponentsGetSample.ts][connectedenvironmentsdaprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Get.json | -| [connectedEnvironmentsDaprComponentsListSample.ts][connectedenvironmentsdaprcomponentslistsample] | 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 | -| [connectedEnvironmentsDaprComponentsListSecretsSample.ts][connectedenvironmentsdaprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json | -| [connectedEnvironmentsDeleteSample.ts][connectedenvironmentsdeletesample] | Delete an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Delete.json | -| [connectedEnvironmentsGetSample.ts][connectedenvironmentsgetsample] | Get the properties of an connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Get.json | -| [connectedEnvironmentsListByResourceGroupSample.ts][connectedenvironmentslistbyresourcegroupsample] | 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 | -| [connectedEnvironmentsListBySubscriptionSample.ts][connectedenvironmentslistbysubscriptionsample] | Get all connectedEnvironments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_ListBySubscription.json | -| [connectedEnvironmentsStoragesCreateOrUpdateSample.ts][connectedenvironmentsstoragescreateorupdatesample] | 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 | -| [connectedEnvironmentsStoragesDeleteSample.ts][connectedenvironmentsstoragesdeletesample] | Delete storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Delete.json | -| [connectedEnvironmentsStoragesGetSample.ts][connectedenvironmentsstoragesgetsample] | Get storage for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_Get.json | -| [connectedEnvironmentsStoragesListSample.ts][connectedenvironmentsstorageslistsample] | Get all storages for a connectedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsStorages_List.json | -| [connectedEnvironmentsUpdateSample.ts][connectedenvironmentsupdatesample] | 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 | -| [containerAppsAuthConfigsCreateOrUpdateSample.ts][containerappsauthconfigscreateorupdatesample] | 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 | -| [containerAppsAuthConfigsDeleteSample.ts][containerappsauthconfigsdeletesample] | Delete a Container App AuthConfig. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/AuthConfigs_Delete.json | -| [containerAppsAuthConfigsGetSample.ts][containerappsauthconfigsgetsample] | 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 | -| [containerAppsAuthConfigsListByContainerAppSample.ts][containerappsauthconfigslistbycontainerappsample] | 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 | -| [containerAppsCreateOrUpdateSample.ts][containerappscreateorupdatesample] | Create or update a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CreateOrUpdate.json | -| [containerAppsDeleteSample.ts][containerappsdeletesample] | Delete a Container App. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Delete.json | -| [containerAppsDiagnosticsGetDetectorSample.ts][containerappsdiagnosticsgetdetectorsample] | 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 | -| [containerAppsDiagnosticsGetRevisionSample.ts][containerappsdiagnosticsgetrevisionsample] | 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 | -| [containerAppsDiagnosticsGetRootSample.ts][containerappsdiagnosticsgetrootsample] | 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 | -| [containerAppsDiagnosticsListDetectorsSample.ts][containerappsdiagnosticslistdetectorssample] | 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 | -| [containerAppsDiagnosticsListRevisionsSample.ts][containerappsdiagnosticslistrevisionssample] | 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 | -| [containerAppsGetAuthTokenSample.ts][containerappsgetauthtokensample] | 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 | -| [containerAppsGetSample.ts][containerappsgetsample] | 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 | -| [containerAppsListByResourceGroupSample.ts][containerappslistbyresourcegroupsample] | 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 | -| [containerAppsListBySubscriptionSample.ts][containerappslistbysubscriptionsample] | 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 | -| [containerAppsListCustomHostNameAnalysisSample.ts][containerappslistcustomhostnameanalysissample] | 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 | -| [containerAppsListSecretsSample.ts][containerappslistsecretssample] | List secrets for a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_ListSecrets.json | -| [containerAppsRevisionReplicasGetReplicaSample.ts][containerappsrevisionreplicasgetreplicasample] | 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 | -| [containerAppsRevisionReplicasListReplicasSample.ts][containerappsrevisionreplicaslistreplicassample] | 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 | -| [containerAppsRevisionsActivateRevisionSample.ts][containerappsrevisionsactivaterevisionsample] | 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 | -| [containerAppsRevisionsDeactivateRevisionSample.ts][containerappsrevisionsdeactivaterevisionsample] | 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 | -| [containerAppsRevisionsGetRevisionSample.ts][containerappsrevisionsgetrevisionsample] | 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 | -| [containerAppsRevisionsListRevisionsSample.ts][containerappsrevisionslistrevisionssample] | 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 | -| [containerAppsRevisionsRestartRevisionSample.ts][containerappsrevisionsrestartrevisionsample] | 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 | -| [containerAppsSourceControlsCreateOrUpdateSample.ts][containerappssourcecontrolscreateorupdatesample] | 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 | -| [containerAppsSourceControlsDeleteSample.ts][containerappssourcecontrolsdeletesample] | Delete a Container App SourceControl. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/SourceControls_Delete.json | -| [containerAppsSourceControlsGetSample.ts][containerappssourcecontrolsgetsample] | 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 | -| [containerAppsSourceControlsListByContainerAppSample.ts][containerappssourcecontrolslistbycontainerappsample] | 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 | -| [containerAppsStartSample.ts][containerappsstartsample] | Start a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Start.json | -| [containerAppsStopSample.ts][containerappsstopsample] | Stop a container app x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_Stop.json | -| [containerAppsUpdateSample.ts][containerappsupdatesample] | 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 | -| [daprComponentsCreateOrUpdateSample.ts][daprcomponentscreateorupdatesample] | 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 | -| [daprComponentsDeleteSample.ts][daprcomponentsdeletesample] | Delete a Dapr Component from a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Delete.json | -| [daprComponentsGetSample.ts][daprcomponentsgetsample] | Get a dapr component. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Get_SecretStoreComponent.json | -| [daprComponentsListSample.ts][daprcomponentslistsample] | Get the Dapr Components for a managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_List.json | -| [daprComponentsListSecretsSample.ts][daprcomponentslistsecretssample] | List secrets for a dapr component x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_ListSecrets.json | -| [getCustomDomainVerificationIdSample.ts][getcustomdomainverificationidsample] | Get the verification id of a subscription used for verifying custom domains x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Subscriptions_GetCustomDomainVerificationId.json | -| [jobExecutionSample.ts][jobexecutionsample] | Get details of a single job execution x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Execution_Get.json | -| [jobsCreateOrUpdateSample.ts][jobscreateorupdatesample] | Create or Update a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate.json | -| [jobsDeleteSample.ts][jobsdeletesample] | Delete a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Delete.json | -| [jobsExecutionsListSample.ts][jobsexecutionslistsample] | Get a Container Apps Job's executions x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Executions_Get.json | -| [jobsGetDetectorSample.ts][jobsgetdetectorsample] | Get the diagnostics data for a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_GetDetector.json | -| [jobsGetSample.ts][jobsgetsample] | Get the properties of a Container Apps Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Get.json | -| [jobsListByResourceGroupSample.ts][jobslistbyresourcegroupsample] | Get the Container Apps Jobs in a given resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListByResourceGroup.json | -| [jobsListBySubscriptionSample.ts][jobslistbysubscriptionsample] | Get the Container Apps Jobs in a given subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListBySubscription.json | -| [jobsListDetectorsSample.ts][jobslistdetectorssample] | Get the list of diagnostics for a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListDetectors.json | -| [jobsListSecretsSample.ts][jobslistsecretssample] | List secrets for a container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListSecrets.json | -| [jobsProxyGetSample.ts][jobsproxygetsample] | Get the properties of a Container App Job. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ProxyGet.json | -| [jobsStartSample.ts][jobsstartsample] | Start a Container Apps Job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Start.json | -| [jobsStopExecutionSample.ts][jobsstopexecutionsample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Execution.json | -| [jobsStopMultipleExecutionsSample.ts][jobsstopmultipleexecutionssample] | Terminates execution of a running container apps job x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Multiple.json | -| [jobsUpdateSample.ts][jobsupdatesample] | Patches a Container Apps Job using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Patch.json | -| [managedCertificatesCreateOrUpdateSample.ts][managedcertificatescreateorupdatesample] | Create or Update a Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_CreateOrUpdate.json | -| [managedCertificatesDeleteSample.ts][managedcertificatesdeletesample] | Deletes the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Delete.json | -| [managedCertificatesGetSample.ts][managedcertificatesgetsample] | Get the specified Managed Certificate. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Get.json | -| [managedCertificatesListSample.ts][managedcertificateslistsample] | Get the Managed Certificates in a given managed environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_ListByManagedEnvironment.json | -| [managedCertificatesUpdateSample.ts][managedcertificatesupdatesample] | Patches a managed certificate. Oly patching of tags is supported x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_Patch.json | -| [managedEnvironmentDiagnosticsGetDetectorSample.ts][managedenvironmentdiagnosticsgetdetectorsample] | Get the diagnostics data for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_Get.json | -| [managedEnvironmentDiagnosticsListDetectorsSample.ts][managedenvironmentdiagnosticslistdetectorssample] | Get the list of diagnostics for a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_List.json | -| [managedEnvironmentUsagesListSample.ts][managedenvironmentusageslistsample] | Gets the current usage information as well as the limits for environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentUsages_List.json | -| [managedEnvironmentsCreateOrUpdateSample.ts][managedenvironmentscreateorupdatesample] | Creates or updates a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json | -| [managedEnvironmentsDeleteSample.ts][managedenvironmentsdeletesample] | Delete a Managed Environment if it does not have any container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Delete.json | -| [managedEnvironmentsDiagnosticsGetRootSample.ts][managedenvironmentsdiagnosticsgetrootsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsGetAuthTokenSample.ts][managedenvironmentsgetauthtokensample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_GetAuthToken.json | -| [managedEnvironmentsGetSample.ts][managedenvironmentsgetsample] | Get the properties of a Managed Environment used to host container apps. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json | -| [managedEnvironmentsListByResourceGroupSample.ts][managedenvironmentslistbyresourcegroupsample] | Get all the Managed Environments in a resource group. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListByResourceGroup.json | -| [managedEnvironmentsListBySubscriptionSample.ts][managedenvironmentslistbysubscriptionsample] | Get all Managed Environments for a subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListBySubscription.json | -| [managedEnvironmentsListWorkloadProfileStatesSample.ts][managedenvironmentslistworkloadprofilestatessample] | Get all workload Profile States for a Managed Environment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json | -| [managedEnvironmentsStoragesCreateOrUpdateSample.ts][managedenvironmentsstoragescreateorupdatesample] | Create or update storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json | -| [managedEnvironmentsStoragesDeleteSample.ts][managedenvironmentsstoragesdeletesample] | Delete storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Delete.json | -| [managedEnvironmentsStoragesGetSample.ts][managedenvironmentsstoragesgetsample] | Get storage for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Get.json | -| [managedEnvironmentsStoragesListSample.ts][managedenvironmentsstorageslistsample] | Get all storages for a managedEnvironment. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_List.json | -| [managedEnvironmentsUpdateSample.ts][managedenvironmentsupdatesample] | Patches a Managed Environment using JSON Merge Patch x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Patch.json | -| [namespacesCheckNameAvailabilitySample.ts][namespaceschecknameavailabilitysample] | Checks if resource name is available. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_CheckNameAvailability.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available RP operations. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Operations_List.json | -| [usagesListSample.ts][usageslistsample] | Gets, for the specified location, the current resource usage information as well as the limits under the subscription. x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Usages_List.json | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] to run these sample programs. - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/availableWorkloadProfilesGetSample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env APPCONTAINERS_SUBSCRIPTION_ID="" node dist/availableWorkloadProfilesGetSample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[availableworkloadprofilesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/availableWorkloadProfilesGetSample.ts -[billingmetersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/billingMetersGetSample.ts -[certificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesCreateOrUpdateSample.ts -[certificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesDeleteSample.ts -[certificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesGetSample.ts -[certificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesListSample.ts -[certificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesUpdateSample.ts -[connectedenvironmentscertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts -[connectedenvironmentscertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts -[connectedenvironmentscertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesGetSample.ts -[connectedenvironmentscertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesListSample.ts -[connectedenvironmentscertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts -[connectedenvironmentschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts -[connectedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts -[connectedenvironmentsdaprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts -[connectedenvironmentsdaprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts -[connectedenvironmentsdaprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts -[connectedenvironmentsdaprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts -[connectedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDeleteSample.ts -[connectedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsGetSample.ts -[connectedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts -[connectedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts -[connectedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts -[connectedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts -[connectedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesGetSample.ts -[connectedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesListSample.ts -[connectedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsUpdateSample.ts -[containerappsauthconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts -[containerappsauthconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsDeleteSample.ts -[containerappsauthconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsGetSample.ts -[containerappsauthconfigslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts -[containerappscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsCreateOrUpdateSample.ts -[containerappsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDeleteSample.ts -[containerappsdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts -[containerappsdiagnosticsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts -[containerappsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRootSample.ts -[containerappsdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts -[containerappsdiagnosticslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts -[containerappsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetAuthTokenSample.ts -[containerappsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetSample.ts -[containerappslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListByResourceGroupSample.ts -[containerappslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListBySubscriptionSample.ts -[containerappslistcustomhostnameanalysissample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts -[containerappslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListSecretsSample.ts -[containerappsrevisionreplicasgetreplicasample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts -[containerappsrevisionreplicaslistreplicassample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts -[containerappsrevisionsactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsActivateRevisionSample.ts -[containerappsrevisionsdeactivaterevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts -[containerappsrevisionsgetrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsGetRevisionSample.ts -[containerappsrevisionslistrevisionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsListRevisionsSample.ts -[containerappsrevisionsrestartrevisionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsRestartRevisionSample.ts -[containerappssourcecontrolscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts -[containerappssourcecontrolsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsDeleteSample.ts -[containerappssourcecontrolsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsGetSample.ts -[containerappssourcecontrolslistbycontainerappsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts -[containerappsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStartSample.ts -[containerappsstopsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStopSample.ts -[containerappsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsUpdateSample.ts -[daprcomponentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsCreateOrUpdateSample.ts -[daprcomponentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsDeleteSample.ts -[daprcomponentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsGetSample.ts -[daprcomponentslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSample.ts -[daprcomponentslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSecretsSample.ts -[getcustomdomainverificationidsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/getCustomDomainVerificationIdSample.ts -[jobexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobExecutionSample.ts -[jobscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsCreateOrUpdateSample.ts -[jobsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsDeleteSample.ts -[jobsexecutionslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsExecutionsListSample.ts -[jobsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetDetectorSample.ts -[jobsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetSample.ts -[jobslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListByResourceGroupSample.ts -[jobslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListBySubscriptionSample.ts -[jobslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListDetectorsSample.ts -[jobslistsecretssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListSecretsSample.ts -[jobsproxygetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsProxyGetSample.ts -[jobsstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStartSample.ts -[jobsstopexecutionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopExecutionSample.ts -[jobsstopmultipleexecutionssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopMultipleExecutionsSample.ts -[jobsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsUpdateSample.ts -[managedcertificatescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesCreateOrUpdateSample.ts -[managedcertificatesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesDeleteSample.ts -[managedcertificatesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesGetSample.ts -[managedcertificateslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesListSample.ts -[managedcertificatesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesUpdateSample.ts -[managedenvironmentdiagnosticsgetdetectorsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts -[managedenvironmentdiagnosticslistdetectorssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts -[managedenvironmentusageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentUsagesListSample.ts -[managedenvironmentscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts -[managedenvironmentsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDeleteSample.ts -[managedenvironmentsdiagnosticsgetrootsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts -[managedenvironmentsgetauthtokensample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetAuthTokenSample.ts -[managedenvironmentsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetSample.ts -[managedenvironmentslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListByResourceGroupSample.ts -[managedenvironmentslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListBySubscriptionSample.ts -[managedenvironmentslistworkloadprofilestatessample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts -[managedenvironmentsstoragescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts -[managedenvironmentsstoragesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesDeleteSample.ts -[managedenvironmentsstoragesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesGetSample.ts -[managedenvironmentsstorageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesListSample.ts -[managedenvironmentsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsUpdateSample.ts -[namespaceschecknameavailabilitysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/namespacesCheckNameAvailabilitySample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/operationsListSample.ts -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/usagesListSample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-appcontainers?view=azure-node-preview -[freesub]: https://azure.microsoft.com/free/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/package.json b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/package.json deleted file mode 100644 index e499df660a9c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "@azure-samples/arm-appcontainers-ts", - "private": true, - "version": "1.0.0", - "description": " client library samples for TypeScript", - "engines": { - "node": ">=18.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/appcontainers/arm-appcontainers" - }, - "keywords": [ - "node", - "azure", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appcontainers/arm-appcontainers", - "dependencies": { - "@azure/arm-appcontainers": "latest", - "dotenv": "latest", - "@azure/identity": "^4.0.1" - }, - "devDependencies": { - "@types/node": "^18.0.0", - "typescript": "~5.6.2", - "rimraf": "latest" - } -} diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/sample.env b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/availableWorkloadProfilesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/availableWorkloadProfilesGetSample.ts deleted file mode 100644 index ca0a17a215f0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/availableWorkloadProfilesGetSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.availableWorkloadProfiles.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/billingMetersGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/billingMetersGetSample.ts deleted file mode 100644 index 64ffde8e9938..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/billingMetersGetSample.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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 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 - */ -async function billingMetersGet() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const location = "East US"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.billingMeters.get(location); - console.log(result); -} - -async function main() { - billingMetersGet(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesCreateOrUpdateSample.ts deleted file mode 100644 index 497d7da5abe7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 { - Certificate, - CertificatesCreateOrUpdateOptionalParams, - 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 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 - */ -async function createOrUpdateCertificate() { - 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 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(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesDeleteSample.ts deleted file mode 100644 index 7622ba077341..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.delete( - resourceGroupName, - environmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesGetSample.ts deleted file mode 100644 index d8231231729f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getCertificate() { - 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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.get( - resourceGroupName, - environmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesListSample.ts deleted file mode 100644 index f0b86bc276ce..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.certificates.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesUpdateSample.ts deleted file mode 100644 index cd19eae6717d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/certificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - CertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function patchCertificate() { - 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: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.certificates.update( - resourceGroupName, - environmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index 7c56eb5882aa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - Certificate, - ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, - 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 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 - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: Certificate = { - location: "East US", - properties: { - password: "private key password", - value: Buffer.from("Y2VydA=="), - }, - }; - const options: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams = - { certificateEnvelope }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - certificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts deleted file mode 100644 index b90953e38c8f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.delete( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesGetSample.ts deleted file mode 100644 index cc27ee5b8041..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.get( - resourceGroupName, - connectedEnvironmentName, - certificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesListSample.ts deleted file mode 100644 index 6f40d97b6846..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listCertificatesByConnectedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsCertificates.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listCertificatesByConnectedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts deleted file mode 100644 index 1bd6d2bbf7e5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - CertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function patchCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const certificateName = "certificate-firendly-name"; - const certificateEnvelope: CertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsCertificates.update( - resourceGroupName, - connectedEnvironmentName, - certificateName, - certificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts deleted file mode 100644 index 1f4949232633..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/connectedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.checkNameAvailability( - resourceGroupName, - connectedEnvironmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index d896102dad1e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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 { - ConnectedEnvironment, - 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 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 - */ -async function createKubeEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const environmentEnvelope: ConnectedEnvironment = { - customDomainConfiguration: { - certificatePassword: "private key password", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - staticIp: "1.2.3.4", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - connectedEnvironmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createKubeEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index bcae97a56396..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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 { - DaprComponent, - 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 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 - */ -async function createOrUpdateDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = - await client.connectedEnvironmentsDaprComponents.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts deleted file mode 100644 index d090647de52d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.delete( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts deleted file mode 100644 index 75ea7e2370f3..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironmentsDaprComponents_Get.json - */ -async function getDaprComponent() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.get( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - getDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts deleted file mode 100644 index 92ccce214c99..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironmentsDaprComponents.list( - resourceGroupName, - connectedEnvironmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts deleted file mode 100644 index d20b767e0693..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDaprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "myenvironment"; - const componentName = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsDaprComponents.listSecrets( - resourceGroupName, - connectedEnvironmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDeleteSample.ts deleted file mode 100644 index 0e400e114a37..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 an connectedEnvironment. - * - * @summary Delete an connectedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ConnectedEnvironments_Delete.json - */ -async function deleteConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.beginDeleteAndWait( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - deleteConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsGetSample.ts deleted file mode 100644 index 6630731487b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function getConnectedEnvironmentByConnectedEnvironmentName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.get( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - getConnectedEnvironmentByConnectedEnvironmentName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 4245f7b597ed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index e2b04751a4f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 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 - */ -async function listConnectedEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.connectedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listConnectedEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index e13f23e5a377..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - ConnectedEnvironmentStorage, - 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 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 - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ConnectedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - connectedEnvironmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index ee461a360d51..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.delete( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index 792bb5cdcfb6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "env"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.get( - resourceGroupName, - connectedEnvironmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 891a0008d884..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironmentsStorages.list( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsUpdateSample.ts deleted file mode 100644 index 6e02a2546c3e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/connectedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const connectedEnvironmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.connectedEnvironments.update( - resourceGroupName, - connectedEnvironmentName, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts deleted file mode 100644 index e82a437e53fd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { AuthConfig, 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 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 - */ -async function createOrUpdateContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const authConfigEnvelope: AuthConfig = { - encryptionSettings: { - containerAppAuthEncryptionSecretName: "testEncryptionSecretName", - containerAppAuthSigningSecretName: "testSigningSecretName", - }, - globalValidation: { unauthenticatedClientAction: "AllowAnonymous" }, - identityProviders: { - facebook: { - registration: { appId: "123", appSecretSettingName: "facebook-secret" }, - }, - }, - platform: { enabled: true }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.createOrUpdate( - resourceGroupName, - containerAppName, - authConfigName, - authConfigEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsDeleteSample.ts deleted file mode 100644 index b76afd6edf11..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.delete( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsGetSample.ts deleted file mode 100644 index 6ae780dfd8fb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppAuthConfig() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const authConfigName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsAuthConfigs.get( - resourceGroupName, - containerAppName, - authConfigName, - ); - console.log(result); -} - -async function main() { - getContainerAppAuthConfig(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts deleted file mode 100644 index 546e3c577b82..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsAuthConfigsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listAuthConfigsByContainerApps() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsAuthConfigs.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAuthConfigsByContainerApps(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsCreateOrUpdateSample.ts deleted file mode 100644 index 817d7138222a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,293 +0,0 @@ -/* - * 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 { ContainerApp, 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 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 - */ -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 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/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, - service: { type: "redis" }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - 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.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "redisService", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService", - }, - ], - }, - 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/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 - */ -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 containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [{ revisionName: "testcontainerapptcp-ab1234", weight: 100 }], - transport: "tcp", - }, - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerapptcp", - image: "repo/testcontainerapptcp: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); -} - -async function main() { - createOrUpdateContainerApp(); - createOrUpdateManagedByApp(); - createOrUpdateTcpApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDeleteSample.ts deleted file mode 100644 index accd271c5073..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 App. - * - * @summary Delete a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginDeleteAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - deleteContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts deleted file mode 100644 index a4baf350ecdb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppDiagnosticsInfo() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const detectorName = "cappcontainerappnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getDetector( - resourceGroupName, - containerAppName, - detectorName, - ); - console.log(result); -} - -async function main() { - getContainerAppDiagnosticsInfo(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts deleted file mode 100644 index 2cd981157598..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRootSample.ts deleted file mode 100644 index ffed43abe9b2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsDiagnostics.getRoot( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts deleted file mode 100644 index ef59b43c2dda..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function getTheListOfAvailableDiagnosticsForAGivenContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const containerAppName = "mikono-capp-stage1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listDetectors( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticsForAGivenContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts deleted file mode 100644 index 60f640b0628a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsDiagnosticsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsDiagnostics.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetAuthTokenSample.ts deleted file mode 100644 index aec7fc0f7e4f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.getAuthToken( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerAppAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetSample.ts deleted file mode 100644 index 5cd40ad86e28..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsGetSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.get( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - getContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListByResourceGroupSample.ts deleted file mode 100644 index b34660364d3a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListByResourceGroupSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsByResourceGroup() { - 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.containerApps.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListBySubscriptionSample.ts deleted file mode 100644 index 286f548b65a6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppsBySubscription() { - 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.containerApps.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts deleted file mode 100644 index 4b81c63455be..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListCustomHostNameAnalysisSample.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 { - ContainerAppsListCustomHostNameAnalysisOptionalParams, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -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 customHostname = "my.name.corp"; - const options: ContainerAppsListCustomHostNameAnalysisOptionalParams = { - customHostname, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listCustomHostNameAnalysis( - resourceGroupName, - containerAppName, - options, - ); - console.log(result); -} - -async function main() { - analyzeCustomHostname(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListSecretsSample.ts deleted file mode 100644 index eb341ae13fc1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsListSecretsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.listSecrets( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts deleted file mode 100644 index 8293b8d9d4c4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasGetReplicaSample.ts +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevisionReplica() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const replicaName = "myapp--0wlqy09-5d9774cff-5wnd8"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.getReplica( - resourceGroupName, - containerAppName, - revisionName, - replicaName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevisionReplica(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts deleted file mode 100644 index e16f1cb877bb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionReplicasListReplicasSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppReplicas() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "myapp"; - const revisionName = "myapp--0wlqy09"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisionReplicas.listReplicas( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - listContainerAppReplicas(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsActivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsActivateRevisionSample.ts deleted file mode 100644 index 2a51e79ba18b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsActivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function activateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.activateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - activateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts deleted file mode 100644 index b86121a96331..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsDeactivateRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function deactivateContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.deactivateRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - deactivateContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsGetRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsGetRevisionSample.ts deleted file mode 100644 index 1d370639648f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsGetRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.getRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - getContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsListRevisionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsListRevisionsSample.ts deleted file mode 100644 index b5ff0bde4e42..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsListRevisionsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function listContainerAppRevisions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsRevisions.listRevisions( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppRevisions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsRestartRevisionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsRestartRevisionSample.ts deleted file mode 100644 index 5d0b53df0b26..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsRevisionsRestartRevisionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 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 - */ -async function restartContainerAppRevision() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testStaticSite0"; - const revisionName = "testcontainerApp0-pjxhsye"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsRevisions.restartRevision( - resourceGroupName, - containerAppName, - revisionName, - ); - console.log(result); -} - -async function main() { - restartContainerAppRevision(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts deleted file mode 100644 index 9ca379060247..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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 { - SourceControl, - 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 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 - */ -async function createOrUpdateContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const sourceControlEnvelope: SourceControl = { - branch: "master", - githubActionConfiguration: { - azureCredentials: { - clientId: "", - clientSecret: "", - kind: "feaderated", - tenantId: "", - }, - contextPath: "./", - githubPersonalAccessToken: "test", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "test-registry.azurecr.io", - registryUserName: "test-registry", - }, - }, - repoUrl: "https://github.com/xwang971/ghatest", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = - await client.containerAppsSourceControls.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - sourceControlEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsDeleteSample.ts deleted file mode 100644 index ba4462ac8be0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function deleteContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.beginDeleteAndWait( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsGetSample.ts deleted file mode 100644 index e66adce267db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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 - */ -async function getContainerAppSourceControl() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const sourceControlName = "current"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerAppsSourceControls.get( - resourceGroupName, - containerAppName, - sourceControlName, - ); - console.log(result); -} - -async function main() { - getContainerAppSourceControl(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts deleted file mode 100644 index be7683459d62..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsSourceControlsListByContainerAppSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 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 - */ -async function listAppSourceControls() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "workerapps-rg-xj"; - const containerAppName = "testcanadacentral"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.containerAppsSourceControls.listByContainerApp( - resourceGroupName, - containerAppName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAppSourceControls(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStartSample.ts deleted file mode 100644 index 52453015347a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStartSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStartAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - startContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStopSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStopSample.ts deleted file mode 100644 index 5b1e617c8c74..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsStopSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 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 - */ -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 credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginStopAndWait( - resourceGroupName, - containerAppName, - ); - console.log(result); -} - -async function main() { - stopContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsUpdateSample.ts deleted file mode 100644 index 44401a1faaf0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/containerAppsUpdateSample.ts +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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 { ContainerApp, ContainerAppsAPIClient } from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -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 - */ -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 containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug", - }, - ingress: { - 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, - service: { type: "redis" }, - }, - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - 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", - image: "repo/testcontainerapp0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } }, - }, - ], - }, - serviceBinds: [ - { - name: "service", - serviceId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service", - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope, - ); - console.log(result); -} - -async function main() { - patchContainerApp(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsCreateOrUpdateSample.ts deleted file mode 100644 index 18b184c0c9b6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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 { - DaprComponent, - 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 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 - */ -async function createOrUpdateDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secretStoreComponent: "my-secret-store", - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -/** - * 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 - */ -async function createOrUpdateDaprComponentWithSecrets() { - 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 = "reddog"; - const daprComponentEnvelope: DaprComponent = { - componentType: "state.azure.cosmosdb", - ignoreErrors: false, - initTimeout: "50s", - metadata: [ - { name: "url", value: "" }, - { name: "database", value: "itemsDB" }, - { name: "collection", value: "items" }, - { name: "masterkey", secretRef: "masterkey" }, - ], - scopes: ["container-app-1", "container-app-2"], - secrets: [{ name: "masterkey", value: "keyvalue" }], - version: "v1", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.createOrUpdate( - resourceGroupName, - environmentName, - componentName, - daprComponentEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateDaprComponentWithSecretStoreComponent(); - createOrUpdateDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsDeleteSample.ts deleted file mode 100644 index d4510a70df57..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Dapr Component from a Managed Environment. - * - * @summary Delete a Dapr Component from a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Delete.json - */ -async function deleteDaprComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.delete( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - deleteDaprComponent(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsGetSample.ts deleted file mode 100644 index 29c357445de7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsGetSample.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - * - * @summary Get a dapr component. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_Get_SecretStoreComponent.json - */ -async function getDaprComponentWithSecretStoreComponent() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -/** - * 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/DaprComponents_Get_Secrets.json - */ -async function getDaprComponentWithSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.get( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - getDaprComponentWithSecretStoreComponent(); - getDaprComponentWithSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSample.ts deleted file mode 100644 index d7ada620025c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 Dapr Components for a managed environment. - * - * @summary Get the Dapr Components for a managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/DaprComponents_List.json - */ -async function listDaprComponents() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "myenvironment"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.daprComponents.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listDaprComponents(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSecretsSample.ts deleted file mode 100644 index 145ea5f7f2fc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/daprComponentsListSecretsSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 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/DaprComponents_ListSecrets.json - */ -async function listContainerAppsSecrets() { - 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 = "reddog"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.daprComponents.listSecrets( - resourceGroupName, - environmentName, - componentName, - ); - console.log(result); -} - -async function main() { - listContainerAppsSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/getCustomDomainVerificationIdSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/getCustomDomainVerificationIdSample.ts deleted file mode 100644 index 23dad78a106d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/getCustomDomainVerificationIdSample.ts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 verification id of a subscription used for verifying custom domains - * - * @summary Get the verification id of a subscription used for verifying custom domains - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Subscriptions_GetCustomDomainVerificationId.json - */ -async function listAllOperations() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "d27c3573-f76e-4b26-b871-0ccd2203d08c"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.getCustomDomainVerificationId(); - console.log(result); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobExecutionSample.ts deleted file mode 100644 index 5d45b842267e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 of a single job execution - * - * @summary Get details of a single job execution - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Execution_Get.json - */ -async function getASingleJobExecution() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobExecution( - resourceGroupName, - jobName, - jobExecutionName, - ); - console.log(result); -} - -async function main() { - getASingleJobExecution(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 8d8d7a3158c6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * 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 { Job, 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 Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate.json - */ -async function createOrUpdateContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: Job = { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 5, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or Update a Container Apps Job. - * - * @summary Create or Update a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_CreateorUpdate_EventTrigger.json - */ -async function createOrUpdateContainerAppsJobWithEventDrivenTrigger() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: Job = { - configuration: { - eventTriggerConfig: { - parallelism: 4, - replicaCompletionCount: 1, - scale: { - maxExecutions: 5, - minExecutions: 1, - pollingInterval: 40, - rules: [ - { - name: "servicebuscalingrule", - type: "azure-servicebus", - metadata: { topicName: "my-topic" }, - }, - ], - }, - }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Event", - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginCreateOrUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateContainerAppsJob(); - createOrUpdateContainerAppsJobWithEventDrivenTrigger(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsDeleteSample.ts deleted file mode 100644 index a7bf3aacb318..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsDeleteSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Job. - * - * @summary Delete a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Delete.json - */ -async function deleteContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testworkercontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginDeleteAndWait( - resourceGroupName, - jobName, - ); - console.log(result); -} - -async function main() { - deleteContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsExecutionsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsExecutionsListSample.ts deleted file mode 100644 index db27d6bf97ba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsExecutionsListSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Job's executions - * - * @summary Get a Container Apps Job's executions - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Executions_Get.json - */ -async function getAContainerAppsJobExecutions() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobsExecutions.list( - resourceGroupName, - jobName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getAContainerAppsJobExecutions(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetDetectorSample.ts deleted file mode 100644 index 4186505aee99..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 diagnostics data for a Container App Job. - * - * @summary Get the diagnostics data for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_GetDetector.json - */ -async function getDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const detectorName = "containerappjobnetworkIO"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.getDetector( - resourceGroupName, - jobName, - detectorName, - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetSample.ts deleted file mode 100644 index 37ffca3189e5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsGetSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 Container Apps Job. - * - * @summary Get the properties of a Container Apps Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Get.json - */ -async function getContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.get(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - getContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListByResourceGroupSample.ts deleted file mode 100644 index 568123497625..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListByResourceGroupSample.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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 Container Apps Jobs in a given resource group. - * - * @summary Get the Container Apps Jobs in a given resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListByResourceGroup.json - */ -async function listContainerAppsJobsByResourceGroup() { - 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.jobs.listByResourceGroup(resourceGroupName)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListBySubscriptionSample.ts deleted file mode 100644 index 269cf61221ba..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 Container Apps Jobs in a given subscription. - * - * @summary Get the Container Apps Jobs in a given subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Jobs_ListBySubscription.json - */ -async function listContainerAppsJobsBySubscription() { - 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.jobs.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listContainerAppsJobsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListDetectorsSample.ts deleted file mode 100644 index 2d193de01a12..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListDetectorsSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 list of diagnostics for a Container App Job. - * - * @summary Get the list of diagnostics for a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListDetectors.json - */ -async function getTheListOfAvailableDiagnosticDataForAContainerAppJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const jobName = "mikonojob1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.jobs.listDetectors( - resourceGroupName, - jobName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAContainerAppJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListSecretsSample.ts deleted file mode 100644 index 6fe7b0d1d976..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsListSecretsSample.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * 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 secrets for a container apps job - * - * @summary List secrets for a container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ListSecrets.json - */ -async function listContainerAppsJobSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.listSecrets(resourceGroupName, jobName); - console.log(result); -} - -async function main() { - listContainerAppsJobSecrets(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsProxyGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsProxyGetSample.ts deleted file mode 100644 index 93ec89f3d4e6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsProxyGetSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 Container App Job. - * - * @summary Get the properties of a Container App Job. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_ProxyGet.json - */ -async function getContainerAppJobByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const apiName = "rootApi"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.proxyGet( - resourceGroupName, - jobName, - apiName, - ); - console.log(result); -} - -async function main() { - getContainerAppJobByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStartSample.ts deleted file mode 100644 index df2539cac0f1..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStartSample.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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 { - JobExecutionTemplate, - JobsStartOptionalParams, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Start a Container Apps Job - * - * @summary Start a Container Apps Job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Start.json - */ -async function runAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const template: JobExecutionTemplate = { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }; - const options: JobsStartOptionalParams = { template }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - options, - ); - console.log(result); -} - -async function main() { - runAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopExecutionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopExecutionSample.ts deleted file mode 100644 index 6b5e7d4f6aed..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopExecutionSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Execution.json - */ -async function terminateAContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobExecutionName = "jobExecution1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopExecutionAndWait( - resourceGroupName, - jobName, - jobExecutionName, - ); - console.log(result); -} - -async function main() { - terminateAContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopMultipleExecutionsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopMultipleExecutionsSample.ts deleted file mode 100644 index 64bc170f328e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Terminates execution of a running container apps job - * - * @summary Terminates execution of a running container apps job - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Stop_Multiple.json - */ -async function terminateMultipleContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - ); - console.log(result); -} - -async function main() { - terminateMultipleContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsUpdateSample.ts deleted file mode 100644 index 1066bc92a3cd..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/jobsUpdateSample.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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 { - JobPatchProperties, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Container Apps Job using JSON Merge Patch - * - * @summary Patches a Container Apps Job using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Job_Patch.json - */ -async function patchContainerAppsJob() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const jobName = "testcontainerappsjob0"; - const jobEnvelope: JobPatchProperties = { - properties: { - configuration: { - manualTriggerConfig: { parallelism: 4, replicaCompletionCount: 1 }, - replicaRetryLimit: 10, - replicaTimeout: 10, - triggerType: "Manual", - }, - template: { - containers: [ - { - name: "testcontainerappsjob0", - image: "repo/testcontainerappsjob0:v1", - probes: [ - { - type: "Liveness", - httpGet: { - path: "/health", - httpHeaders: [{ name: "Custom-Header", value: "Awesome" }], - port: 8080, - }, - initialDelaySeconds: 3, - periodSeconds: 3, - }, - ], - }, - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerappsjob0:v4", - resources: { cpu: 0.5, memory: "1Gi" }, - }, - ], - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginUpdateAndWait( - resourceGroupName, - jobName, - jobEnvelope, - ); - console.log(result); -} - -async function main() { - patchContainerAppsJob(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesCreateOrUpdateSample.ts deleted file mode 100644 index afdd2c31a547..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesCreateOrUpdateSample.ts +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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 { - ManagedCertificate, - ManagedCertificatesCreateOrUpdateOptionalParams, - 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 Managed Certificate. - * - * @summary Create or Update a Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_CreateOrUpdate.json - */ -async function createOrUpdateCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificate = { - location: "East US", - properties: { - domainControlValidation: "CNAME", - subjectName: "my-subject-name.company.country.net", - }, - }; - const options: ManagedCertificatesCreateOrUpdateOptionalParams = { - managedCertificateEnvelope, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - managedCertificateName, - options, - ); - console.log(result); -} - -async function main() { - createOrUpdateCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesDeleteSample.ts deleted file mode 100644 index bb578034fd12..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 Deletes the specified Managed Certificate. - * - * @summary Deletes the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Delete.json - */ -async function deleteCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.delete( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - deleteCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesGetSample.ts deleted file mode 100644 index 39b8f9d4b5b6..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 specified Managed Certificate. - * - * @summary Get the specified Managed Certificate. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificate_Get.json - */ -async function getCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.get( - resourceGroupName, - environmentName, - managedCertificateName, - ); - console.log(result); -} - -async function main() { - getCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesListSample.ts deleted file mode 100644 index 9ec87147c4db..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesListSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 Managed Certificates in a given managed environment. - * - * @summary Get the Managed Certificates in a given managed environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_ListByManagedEnvironment.json - */ -async function listManagedCertificatesByManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedCertificates.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedCertificatesByManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesUpdateSample.ts deleted file mode 100644 index 43f33c2ae45d..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedCertificatesUpdateSample.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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 { - ManagedCertificatePatch, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a managed certificate. Oly patching of tags is supported - * - * @summary Patches a managed certificate. Oly patching of tags is supported - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedCertificates_Patch.json - */ -async function patchManagedCertificate() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const managedCertificateName = "certificate-firendly-name"; - const managedCertificateEnvelope: ManagedCertificatePatch = { - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedCertificates.update( - resourceGroupName, - environmentName, - managedCertificateName, - managedCertificateEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedCertificate(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts deleted file mode 100644 index 5da198e41463..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsGetDetectorSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 diagnostics data for a Managed Environment used to host container apps. - * - * @summary Get the diagnostics data for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_Get.json - */ -async function getDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const detectorName = "ManagedEnvAvailabilityMetrics"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.getDetector( - resourceGroupName, - environmentName, - detectorName, - ); - console.log(result); -} - -async function main() { - getDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts deleted file mode 100644 index b4eca97c1c5b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentDiagnosticsListDetectorsSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 list of diagnostics for a Managed Environment used to host container apps. - * - * @summary Get the list of diagnostics for a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentDiagnostics_List.json - */ -async function getTheListOfAvailableDiagnosticDataForAManagedEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "f07f3711-b45e-40fe-a941-4e6d93f851e6"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "mikono-workerapp-test-rg"; - const environmentName = "mikonokubeenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentDiagnostics.listDetectors( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getTheListOfAvailableDiagnosticDataForAManagedEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentUsagesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentUsagesListSample.ts deleted file mode 100644 index 648f93d91de5..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentUsagesListSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 current usage information as well as the limits for environment. - * - * @summary Gets the current usage information as well as the limits for environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentUsages_List.json - */ -async function listManagedEnvironmentUsages() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironmentUsages.list( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listManagedEnvironmentUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index fd9139910a8b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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 { - ManagedEnvironment, - 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 Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json - */ -async function createEnvironmentWithCustomInfrastructureResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - infrastructureResourceGroup: "myInfrastructureRgName", - location: "East US", - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Creates or updates a Managed Environment used to host container apps. - * - * @summary Creates or updates a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_CreateOrUpdate.json - */ -async function createEnvironments() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - appLogsConfiguration: { - logAnalyticsConfiguration: { customerId: "string", sharedKey: "string" }, - }, - customDomainConfiguration: { - certificatePassword: "1234", - certificateValue: Buffer.from("Y2VydA=="), - dnsSuffix: "www.my-name.com", - }, - daprAIConnectionString: - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/", - location: "East US", - peerAuthentication: { mtls: { enabled: true } }, - peerTrafficConfiguration: { encryption: { enabled: true } }, - vnetConfiguration: { - infrastructureSubnetId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1", - }, - workloadProfiles: [ - { - name: "My-GP-01", - maximumCount: 12, - minimumCount: 3, - workloadProfileType: "GeneralPurpose", - }, - { - name: "My-MO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "MemoryOptimized", - }, - { - name: "My-CO-01", - maximumCount: 6, - minimumCount: 3, - workloadProfileType: "ComputeOptimized", - }, - { name: "My-consumption-01", workloadProfileType: "Consumption" }, - ], - zoneRedundant: true, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - createEnvironmentWithCustomInfrastructureResourceGroup(); - createEnvironments(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDeleteSample.ts deleted file mode 100644 index 193df4d1cb4a..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDeleteSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment if it does not have any container apps. - * - * @summary Delete a Managed Environment if it does not have any container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Delete.json - */ -async function deleteEnvironmentByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "examplekenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginDeleteAndWait( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - deleteEnvironmentByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts deleted file mode 100644 index af65f155b9f7..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsDiagnosticsGetRootSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsDiagnostics.getRoot( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetAuthTokenSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetAuthTokenSample.ts deleted file mode 100644 index de06209dd522..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetAuthTokenSample.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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 Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_GetAuthToken.json - */ -async function getManagedEnvironmentAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const environmentName = "testenv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.getAuthToken( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getManagedEnvironmentAuthToken(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetSample.ts deleted file mode 100644 index 3d2aab1a72f2..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsGetSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 Managed Environment used to host container apps. - * - * @summary Get the properties of a Managed Environment used to host container apps. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Get.json - */ -async function getEnvironmentsByName() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.get( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - getEnvironmentsByName(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListByResourceGroupSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListByResourceGroupSample.ts deleted file mode 100644 index 42ce2e5af7d9..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListByResourceGroupSample.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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 all the Managed Environments in a resource group. - * - * @summary Get all the Managed Environments in a resource group. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListByResourceGroup.json - */ -async function listEnvironmentsByResourceGroup() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup( - resourceGroupName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsByResourceGroup(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListBySubscriptionSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListBySubscriptionSample.ts deleted file mode 100644 index b7058dc1616c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListBySubscriptionSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 all Managed Environments for a subscription. - * - * @summary Get all Managed Environments for a subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListBySubscription.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listBySubscription()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts deleted file mode 100644 index 8491cd5c0a16..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsListWorkloadProfileStatesSample.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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 all workload Profile States for a Managed Environment. - * - * @summary Get all workload Profile States for a Managed Environment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json - */ -async function listEnvironmentsBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listWorkloadProfileStates( - resourceGroupName, - environmentName, - )) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listEnvironmentsBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts deleted file mode 100644 index 35e703584d0e..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesCreateOrUpdateSample.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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 { - ManagedEnvironmentStorage, - 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 storage for a managedEnvironment. - * - * @summary Create or update storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json - */ -async function createOrUpdateEnvironmentsStorage() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const storageEnvelope: ManagedEnvironmentStorage = { - properties: { - azureFile: { - accessMode: "ReadOnly", - accountKey: "key", - accountName: "account1", - shareName: "share1", - }, - }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.createOrUpdate( - resourceGroupName, - environmentName, - storageName, - storageEnvelope, - ); - console.log(result); -} - -async function main() { - createOrUpdateEnvironmentsStorage(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesDeleteSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesDeleteSample.ts deleted file mode 100644 index 4ddf49304337..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesDeleteSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 storage for a managedEnvironment. - * - * @summary Delete storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Delete.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.delete( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesGetSample.ts deleted file mode 100644 index bfb04c4c8479..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesGetSample.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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 storage for a managedEnvironment. - * - * @summary Get storage for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_Get.json - */ -async function getAEnvironmentsStoragePropertiesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const storageName = "jlaw-demo1"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.get( - resourceGroupName, - environmentName, - storageName, - ); - console.log(result); -} - -async function main() { - getAEnvironmentsStoragePropertiesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesListSample.ts deleted file mode 100644 index 405cc679e92f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsStoragesListSample.ts +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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 all storages for a managedEnvironment. - * - * @summary Get all storages for a managedEnvironment. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironmentsStorages_List.json - */ -async function listEnvironmentsStoragesBySubscription() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "8efdecc5-919e-44eb-b179-915dca89ebf9"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "managedEnv"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironmentsStorages.list( - resourceGroupName, - environmentName, - ); - console.log(result); -} - -async function main() { - listEnvironmentsStoragesBySubscription(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsUpdateSample.ts deleted file mode 100644 index b918b7c81841..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/managedEnvironmentsUpdateSample.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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 { - ManagedEnvironment, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Patches a Managed Environment using JSON Merge Patch - * - * @summary Patches a Managed Environment using JSON Merge Patch - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ManagedEnvironments_Patch.json - */ -async function patchManagedEnvironment() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const environmentEnvelope: ManagedEnvironment = { - location: "East US", - tags: { tag1: "value1", tag2: "value2" }, - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.managedEnvironments.beginUpdateAndWait( - resourceGroupName, - environmentName, - environmentEnvelope, - ); - console.log(result); -} - -async function main() { - patchManagedEnvironment(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/namespacesCheckNameAvailabilitySample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/namespacesCheckNameAvailabilitySample.ts deleted file mode 100644 index 398877810136..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/namespacesCheckNameAvailabilitySample.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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 { - CheckNameAvailabilityRequest, - ContainerAppsAPIClient, -} from "@azure/arm-appcontainers"; -import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Certificates_CheckNameAvailability.json - */ -async function certificatesCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcertificatename", - type: "Microsoft.App/managedEnvironments/certificates", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -/** - * This sample demonstrates how to Checks if resource name is available. - * - * @summary Checks if resource name is available. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/ContainerApps_CheckNameAvailability.json - */ -async function containerAppsCheckNameAvailability() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = - process.env["APPCONTAINERS_RESOURCE_GROUP"] || "examplerg"; - const environmentName = "testcontainerenv"; - const checkNameAvailabilityRequest: CheckNameAvailabilityRequest = { - name: "testcappname", - type: "Microsoft.App/containerApps", - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.namespaces.checkNameAvailability( - resourceGroupName, - environmentName, - checkNameAvailabilityRequest, - ); - console.log(result); -} - -async function main() { - certificatesCheckNameAvailability(); - containerAppsCheckNameAvailability(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/operationsListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/operationsListSample.ts deleted file mode 100644 index 8ea3fb505beb..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/operationsListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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 Lists all of the available RP operations. - * - * @summary Lists all of the available RP operations. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Operations_List.json - */ -async function listAllOperations() { - 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.operations.list()) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listAllOperations(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/usagesListSample.ts b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/usagesListSample.ts deleted file mode 100644 index 84de9ecf7403..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/src/usagesListSample.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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, for the specified location, the current resource usage information as well as the limits under the subscription. - * - * @summary Gets, for the specified location, the current resource usage information as well as the limits under the subscription. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2024-03-01/examples/Usages_List.json - */ -async function listUsages() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || "subid"; - const location = "westus"; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const resArray = new Array(); - for await (let item of client.usages.list(location)) { - resArray.push(item); - } - console.log(resArray); -} - -async function main() { - listUsages(); -} - -main().catch(console.error); diff --git a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/tsconfig.json b/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/tsconfig.json deleted file mode 100644 index 984eed535aa8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples/v2/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2020", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**/*.ts" - ] -} diff --git a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 1ec36e0b3995..b95486d395d7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -15,55 +15,95 @@ import { } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + AppResiliencyOperationsImpl, ContainerAppsAuthConfigsImpl, AvailableWorkloadProfilesImpl, BillingMetersImpl, + BuildersImpl, + BuildsByBuilderResourceImpl, + BuildsImpl, + BuildAuthTokenImpl, ConnectedEnvironmentsImpl, ConnectedEnvironmentsCertificatesImpl, ConnectedEnvironmentsDaprComponentsImpl, ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, + ContainerAppsBuildsByContainerAppImpl, + ContainerAppsBuildsImpl, + ContainerAppsPatchesImpl, + ContainerAppsLabelHistoryImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, JobsImpl, + DotNetComponentsImpl, + FunctionsExtensionImpl, OperationsImpl, + JavaComponentsImpl, JobsExecutionsImpl, + LogicAppsImpl, ManagedEnvironmentsImpl, CertificatesImpl, ManagedCertificatesImpl, NamespacesImpl, + ManagedEnvironmentPrivateEndpointConnectionsImpl, + ManagedEnvironmentPrivateLinkResourcesImpl, + DaprComponentResiliencyPoliciesImpl, DaprComponentsImpl, + DaprSubscriptionsImpl, + HttpRouteConfigOperationsImpl, + MaintenanceConfigurationsImpl, ManagedEnvironmentsStoragesImpl, + ContainerAppsSessionPoolsImpl, ContainerAppsSourceControlsImpl, UsagesImpl, ManagedEnvironmentUsagesImpl, } from "./operations"; import { + AppResiliencyOperations, ContainerAppsAuthConfigs, AvailableWorkloadProfiles, BillingMeters, + Builders, + BuildsByBuilderResource, + Builds, + BuildAuthToken, ConnectedEnvironments, ConnectedEnvironmentsCertificates, ConnectedEnvironmentsDaprComponents, ConnectedEnvironmentsStorages, ContainerApps, + ContainerAppsBuildsByContainerApp, + ContainerAppsBuilds, + ContainerAppsPatches, + ContainerAppsLabelHistory, ContainerAppsRevisions, ContainerAppsRevisionReplicas, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Jobs, + DotNetComponents, + FunctionsExtension, Operations, + JavaComponents, JobsExecutions, + LogicApps, ManagedEnvironments, Certificates, ManagedCertificates, Namespaces, + ManagedEnvironmentPrivateEndpointConnections, + ManagedEnvironmentPrivateLinkResources, + DaprComponentResiliencyPolicies, DaprComponents, + DaprSubscriptions, + HttpRouteConfigOperations, + MaintenanceConfigurations, ManagedEnvironmentsStorages, + ContainerAppsSessionPools, ContainerAppsSourceControls, Usages, ManagedEnvironmentUsages, @@ -86,7 +126,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { /** * Initializes a new instance of the ContainerAppsAPIClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( @@ -110,7 +150,7 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-appcontainers/2.1.0`; + const packageDetails = `azsdk-js-arm-appcontainers/3.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -164,10 +204,15 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-03-01"; + this.apiVersion = options.apiVersion || "2024-10-02-preview"; + this.appResiliencyOperations = new AppResiliencyOperationsImpl(this); this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); this.billingMeters = new BillingMetersImpl(this); + this.builders = new BuildersImpl(this); + this.buildsByBuilderResource = new BuildsByBuilderResourceImpl(this); + this.builds = new BuildsImpl(this); + this.buildAuthToken = new BuildAuthTokenImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl(this); @@ -177,6 +222,11 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this, ); this.containerApps = new ContainerAppsImpl(this); + this.containerAppsBuildsByContainerApp = + new ContainerAppsBuildsByContainerAppImpl(this); + this.containerAppsBuilds = new ContainerAppsBuildsImpl(this); + this.containerAppsPatches = new ContainerAppsPatchesImpl(this); + this.containerAppsLabelHistory = new ContainerAppsLabelHistoryImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this, @@ -188,16 +238,30 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsImpl(this); this.jobs = new JobsImpl(this); + this.dotNetComponents = new DotNetComponentsImpl(this); + this.functionsExtension = new FunctionsExtensionImpl(this); this.operations = new OperationsImpl(this); + this.javaComponents = new JavaComponentsImpl(this); this.jobsExecutions = new JobsExecutionsImpl(this); + this.logicApps = new LogicAppsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); this.managedCertificates = new ManagedCertificatesImpl(this); this.namespaces = new NamespacesImpl(this); + this.managedEnvironmentPrivateEndpointConnections = + new ManagedEnvironmentPrivateEndpointConnectionsImpl(this); + this.managedEnvironmentPrivateLinkResources = + new ManagedEnvironmentPrivateLinkResourcesImpl(this); + this.daprComponentResiliencyPolicies = + new DaprComponentResiliencyPoliciesImpl(this); this.daprComponents = new DaprComponentsImpl(this); + this.daprSubscriptions = new DaprSubscriptionsImpl(this); + this.httpRouteConfigOperations = new HttpRouteConfigOperationsImpl(this); + this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesImpl( this, ); + this.containerAppsSessionPools = new ContainerAppsSessionPoolsImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsImpl( this, ); @@ -266,28 +330,48 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { ); } + appResiliencyOperations: AppResiliencyOperations; containerAppsAuthConfigs: ContainerAppsAuthConfigs; availableWorkloadProfiles: AvailableWorkloadProfiles; billingMeters: BillingMeters; + builders: Builders; + buildsByBuilderResource: BuildsByBuilderResource; + builds: Builds; + buildAuthToken: BuildAuthToken; connectedEnvironments: ConnectedEnvironments; connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; + containerAppsBuildsByContainerApp: ContainerAppsBuildsByContainerApp; + containerAppsBuilds: ContainerAppsBuilds; + containerAppsPatches: ContainerAppsPatches; + containerAppsLabelHistory: ContainerAppsLabelHistory; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; jobs: Jobs; + dotNetComponents: DotNetComponents; + functionsExtension: FunctionsExtension; operations: Operations; + javaComponents: JavaComponents; jobsExecutions: JobsExecutions; + logicApps: LogicApps; managedEnvironments: ManagedEnvironments; certificates: Certificates; managedCertificates: ManagedCertificates; namespaces: Namespaces; + managedEnvironmentPrivateEndpointConnections: ManagedEnvironmentPrivateEndpointConnections; + managedEnvironmentPrivateLinkResources: ManagedEnvironmentPrivateLinkResources; + daprComponentResiliencyPolicies: DaprComponentResiliencyPolicies; daprComponents: DaprComponents; + daprSubscriptions: DaprSubscriptions; + httpRouteConfigOperations: HttpRouteConfigOperations; + maintenanceConfigurations: MaintenanceConfigurations; managedEnvironmentsStorages: ManagedEnvironmentsStorages; + containerAppsSessionPools: ContainerAppsSessionPools; containerAppsSourceControls: ContainerAppsSourceControls; usages: Usages; managedEnvironmentUsages: ManagedEnvironmentUsages; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index bc88b460932d..051b1e554885 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -8,6 +8,187 @@ import * as coreClient from "@azure/core-client"; +export type JavaComponentPropertiesUnion = + | JavaComponentProperties + | SpringCloudGatewayComponent + | SpringBootAdminComponent + | NacosComponent + | SpringCloudEurekaComponent + | SpringCloudConfigComponent; + +/** Policy to set request timeouts */ +export interface TimeoutPolicy { + /** Timeout, in seconds, for a request to respond */ + responseTimeoutInSeconds?: number; + /** Timeout, in seconds, for a request to initiate a connection */ + connectionTimeoutInSeconds?: number; +} + +/** Policy that defines http request retry conditions */ +export interface HttpRetryPolicy { + /** Maximum number of times a request will retry */ + maxRetries?: number; + /** Headers that must be present for a request to be retried */ + headers?: HeaderMatch[]; + /** Additional http status codes that can trigger a retry */ + httpStatusCodes?: number[]; + /** Errors that can trigger a retry */ + errors?: string[]; + /** Initial delay, in milliseconds, before retrying a request */ + initialDelayInMilliseconds?: number; + /** Maximum interval, in milliseconds, between retries */ + maxIntervalInMilliseconds?: number; +} + +/** Conditions required to match a header */ +export interface HeaderMatch { + /** Name of the header */ + header?: string; + /** Exact value of the header */ + exactMatch?: string; + /** Prefix value of the header */ + prefixMatch?: string; + /** Suffix value of the header */ + suffixMatch?: string; + /** Regex value of the header */ + regexMatch?: string; +} + +/** Policy that defines tcp request retry conditions */ +export interface TcpRetryPolicy { + /** Maximum number of attempts to connect to the tcp service */ + maxConnectAttempts?: number; +} + +/** Policy that defines circuit breaker conditions */ +export interface CircuitBreakerPolicy { + /** Number of consecutive errors before the circuit breaker opens */ + consecutiveErrors?: number; + /** The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. */ + intervalInSeconds?: number; + /** Maximum percentage of hosts that will be ejected after failure threshold has been met */ + maxEjectionPercent?: number; +} + +/** Defines parameters for http connection pooling */ +export interface HttpConnectionPool { + /** Maximum number of pending http1 requests allowed */ + http1MaxPendingRequests?: number; + /** Maximum number of http2 requests allowed */ + http2MaxRequests?: number; +} + +/** Defines parameters for tcp connection pooling */ +export interface TcpConnectionPool { + /** Maximum number of tcp connections allowed */ + maxConnections?: number; +} + +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { + /** + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** App Service error response. */ +export interface DefaultErrorResponse { + /** + * Error model. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: DefaultErrorResponseError; +} + +/** Error model. */ +export interface DefaultErrorResponseError { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** Details or the error */ + details?: DefaultErrorResponseErrorDetailsItem[]; + /** + * More information to debug error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly innererror?: string; +} + +/** Detailed errors. */ +export interface DefaultErrorResponseErrorDetailsItem { + /** + * Standardized string to programmatically identify the error. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; + /** + * Detailed error description and debugging information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; +} + +/** Collection of AppResiliency policies */ +export interface AppResiliencyCollection { + /** Collection of resources. */ + value: AppResiliency[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** AuthConfig collection ARM resource. */ export interface AuthConfigCollection { /** Collection of resources. */ @@ -378,8 +559,14 @@ export interface TokenStore { /** The configuration settings of the storage of the tokens if blob storage is used. */ export interface BlobStorageTokenStore { - /** The name of the app secrets containing the SAS URL of the blob storage containing the tokens. */ - sasUrlSettingName: string; + /** The name of the app secrets containing the SAS URL of the blob storage containing the tokens. Should not be used along with blobContainerUri. */ + sasUrlSettingName?: string; + /** The URI of the blob storage containing the tokens. Should not be used along with sasUrlSettingName. */ + blobContainerUri?: string; + /** The Client ID of a User-Assigned Managed Identity. Should not be used along with managedIdentityResourceId. */ + clientId?: string; + /** The Resource ID of a User-Assigned Managed Identity. Should not be used along with clientId. */ + managedIdentityResourceId?: string; } /** The configuration settings of the session cookie's expiration. */ @@ -432,100 +619,6 @@ export interface EncryptionSettings { containerAppAuthSigningSecretName?: string; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** App Service error response. */ -export interface DefaultErrorResponse { - /** - * Error model. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly error?: DefaultErrorResponseError; -} - -/** Error model. */ -export interface DefaultErrorResponseError { - /** - * Standardized string to programmatically identify the error. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * Detailed error description and debugging information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * Detailed error description and debugging information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; - /** Details or the error */ - details?: DefaultErrorResponseErrorDetailsItem[]; - /** - * More information to debug error. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly innererror?: string; -} - -/** Detailed errors. */ -export interface DefaultErrorResponseErrorDetailsItem { - /** - * Standardized string to programmatically identify the error. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly code?: string; - /** - * Detailed error description and debugging information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly message?: string; - /** - * Detailed error description and debugging information. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly target?: string; -} - /** Collection of available workload profiles in the location. */ export interface AvailableWorkloadProfilesCollection { /** Collection of workload profiles. */ @@ -608,6 +701,34 @@ export interface BillingMeterCollection { value: BillingMeter[]; } +/** Billing meter. */ +export interface BillingMeter { + /** + * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Region for the billing meter. */ + location?: string; + /** Revision resource specific properties */ + properties?: BillingMeterProperties; +} + /** Revision resource specific properties */ export interface BillingMeterProperties { /** Used to categorize billing meters. */ @@ -618,40 +739,172 @@ export interface BillingMeterProperties { displayName?: string; } -/** Collection of connectedEnvironments */ -export interface ConnectedEnvironmentCollection { - /** Collection of resources. */ - value?: ConnectedEnvironment[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** The response of a BuilderResource list operation. */ +export interface BuilderCollection { + /** The BuilderResource items on this page */ + value: BuilderResource[]; + /** The link to the next page of items */ + nextLink?: string; } -/** The complex type of the extended location. */ -export interface ExtendedLocation { - /** The name of the extended location. */ - name?: string; - /** The type of the extended location. */ - type?: ExtendedLocationTypes; +/** Model representing a mapping from a container registry to the identity used to connect to it. */ +export interface ContainerRegistry { + /** Login server of the container registry. */ + containerRegistryServer: string; + /** Resource ID of the managed identity. */ + identityResourceId: string; } -/** Configuration properties for apps environment custom domain */ -export interface CustomDomainConfiguration { +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentity { /** - * Id used to verify domain name ownership + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly customDomainVerificationId?: string; - /** Dns suffix for the environment domain */ - dnsSuffix?: string; - /** PFX or PEM blob */ - certificateValue?: Uint8Array; - /** Certificate password */ - certificatePassword?: string; + readonly principalId?: string; /** - * Certificate expiration date. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; +} + +/** User assigned identity properties */ +export interface UserAssignedIdentity { + /** + * The principal ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client ID of the assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; +} + +/** The type used for update operations of the BuilderResource. */ +export interface BuilderResourceUpdate { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; +} + +/** The response of a BuildResource list operation. */ +export interface BuildCollection { + /** The BuildResource items on this page */ + value: BuildResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Container registry that the final image will be uploaded to. */ +export interface ContainerRegistryWithCustomImage { + /** Login server of the container registry that the final image should be uploaded to. Builder resource needs to have this container registry defined along with an identity to use to access it. */ + server: string; + /** Full name that the final image should be uploaded as, including both image name and tag. */ + image?: string; +} + +/** Configuration of the build. */ +export interface BuildConfiguration { + /** Base OS used to build and run the app. */ + baseOs?: string; + /** Platform to be used to build and run the app. */ + platform?: string; + /** Platform version to be used to build and run the app. */ + platformVersion?: string; + /** List of environment variables to be passed to the build, secrets should not be used in environment variable. */ + environmentVariables?: EnvironmentVariable[]; + /** List of steps to perform before the build. */ + preBuildSteps?: PreBuildStep[]; +} + +/** Model representing an environment variable. */ +export interface EnvironmentVariable { + /** Environment variable name. */ + name: string; + /** Environment variable value. */ + value: string; +} + +/** Model representing a pre-build step. */ +export interface PreBuildStep { + /** Description of the pre-build step. */ + description?: string; + /** List of custom commands to run. */ + scripts?: string[]; + /** Http get request to send before the build. */ + httpGet?: HttpGet; +} + +/** Model representing a http get request. */ +export interface HttpGet { + /** URL to make HTTP GET request against. */ + url: string; + /** Name of the file that the request should be saved to. */ + fileName?: string; + /** List of headers to send with the request. */ + headers?: string[]; +} + +/** Build Auth Token. */ +export interface BuildToken { + /** + * Authentication token. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly token?: string; + /** + * Token expiration date. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expires?: Date; +} + +/** Collection of connectedEnvironments */ +export interface ConnectedEnvironmentCollection { + /** Collection of resources. */ + value?: ConnectedEnvironment[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The complex type of the extended location. */ +export interface ExtendedLocation { + /** The name of the extended location. */ + name?: string; + /** The type of the extended location. */ + type?: ExtendedLocationTypes; +} + +/** Configuration properties for apps environment custom domain */ +export interface CustomDomainConfiguration { + /** + * Id used to verify domain name ownership + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly customDomainVerificationId?: string; + /** Dns suffix for the environment domain */ + dnsSuffix?: string; + /** Certificate stored in Azure Key Vault. */ + certificateKeyVaultProperties?: CertificateKeyVaultProperties; + /** PFX or PEM blob */ + certificateValue?: Uint8Array; + /** Certificate password */ + certificatePassword?: string; + /** + * Certificate expiration date. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly expirationDate?: Date; @@ -667,6 +920,14 @@ export interface CustomDomainConfiguration { readonly subjectName?: string; } +/** Properties for a certificate stored in a Key Vault. */ +export interface CertificateKeyVaultProperties { + /** Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ + identity?: string; + /** URL pointing to the Azure Key Vault secret that holds the certificate. */ + keyVaultUrl?: string; +} + /** The check availability request body. */ export interface CheckNameAvailabilityRequest { /** The name of the resource for which availability needs to be checked. */ @@ -703,6 +964,13 @@ export interface CertificateProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: CertificateProvisioningState; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; + /** Properties for a certificate stored in a Key Vault. */ + certificateKeyVaultProperties?: CertificateKeyVaultProperties; /** Certificate password. */ password?: string; /** @@ -747,6 +1015,8 @@ export interface CertificateProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly publicKeyHash?: string; + /** The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA` */ + certificateType?: CertificateType; } /** A certificate to update */ @@ -755,10 +1025,10 @@ export interface CertificatePatch { tags?: { [propertyName: string]: string }; } -/** Dapr Components ARM resource. */ -export interface DaprComponentsCollection { - /** Collection of resources. */ - value: DaprComponent[]; +/** Collection of Dapr Components for Environments */ +export interface ConnectedEnvironmentDaprComponentsCollection { + /** Collection of Dapr component resources. */ + value: ConnectedEnvironmentDaprComponent[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -766,6 +1036,28 @@ export interface DaprComponentsCollection { readonly nextLink?: string; } +/** Dapr Component resource specific properties */ +export interface DaprComponentProperties { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + initTimeout?: string; + /** Collection of secrets used by a Dapr component */ + secrets?: Secret[]; + /** Name of a Dapr component to retrieve component secrets from */ + secretStoreComponent?: string; + /** Component metadata */ + metadata?: DaprMetadata[]; + /** Names of container apps that can use this Dapr component */ + scopes?: string[]; + /** List of container app services that are bound to the Dapr component */ + serviceComponentBind?: DaprComponentServiceBinding[]; +} + /** Secret definition. */ export interface Secret { /** Secret Name. */ @@ -788,6 +1080,24 @@ export interface DaprMetadata { secretRef?: string; } +/** Configuration to bind a Dapr Component to a dev ContainerApp Service */ +export interface DaprComponentServiceBinding { + /** Name of the service bind */ + name?: string; + /** Resource id of the target service */ + serviceId?: string; + /** Service bind metadata */ + metadata?: DaprServiceBindMetadata; +} + +/** Dapr component metadata. */ +export interface DaprServiceBindMetadata { + /** Service bind metadata property name. */ + name?: string; + /** Service bind metadata property value. */ + value?: string; +} + /** Dapr component Secrets Collection for ListSecrets Action. */ export interface DaprSecretsCollection { /** Collection of secrets used by a Dapr component */ @@ -816,8 +1126,20 @@ export interface ConnectedEnvironmentStoragesCollection { /** Storage properties */ export interface ConnectedEnvironmentStorageProperties { + /** + * Provisioning state of the storage. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ConnectedEnvironmentStorageProvisioningState; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; /** Azure file properties */ azureFile?: AzureFileProperties; + /** SMB storage properties */ + smb?: SmbStorage; } /** Azure File Properties. */ @@ -832,6 +1154,22 @@ export interface AzureFileProperties { shareName?: string; } +/** SMB storage properties */ +export interface SmbStorage { + /** The host name or IP address of the SMB server. */ + host?: string; + /** The path to the SMB shared folder. */ + shareName?: string; + /** The user to log on to the SMB server. */ + username?: string; + /** The domain name for the user. */ + domain?: string; + /** The password for the user. */ + password?: string; + /** Access mode for storage */ + accessMode?: AccessMode; +} + /** Container App collection ARM resource. */ export interface ContainerAppCollection { /** Collection of resources. */ @@ -843,36 +1181,10 @@ export interface ContainerAppCollection { readonly nextLink?: string; } -/** Managed service identity (system assigned and/or user assigned identities) */ -export interface ManagedServiceIdentity { - /** - * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ - type: ManagedServiceIdentityType; - /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ - userAssignedIdentities?: { [propertyName: string]: UserAssignedIdentity }; -} - -/** User assigned identity properties */ -export interface UserAssignedIdentity { - /** - * The principal ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client ID of the assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; +/** Container App auto patch configuration. */ +export interface ContainerAppPropertiesPatchingConfiguration { + /** Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. */ + patchingMode?: PatchingMode; } /** Non versioned Container App configuration properties that define the mutable settings of a Container app */ @@ -881,19 +1193,27 @@ export interface Configuration { secrets?: Secret[]; /** * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. + * Single: Only one revision can be active at a time. Traffic weights cannot be used. This is the default.Multiple: Multiple revisions can be active, including optional traffic weights and labels.Labels: Only revisions with labels are active. Traffic weights can be applied to labels. */ activeRevisionsMode?: ActiveRevisionsMode; + /** Required in labels revisions mode. Label to apply to newly created revision. */ + targetLabel?: string; /** Ingress configurations. */ ingress?: Ingress; /** Collection of private container registry credentials for containers used by the Container app */ registries?: RegistryCredentials[]; /** Dapr configuration for the Container App. */ dapr?: Dapr; + /** App runtime configuration for the Container App. */ + runtime?: Runtime; /** Optional. Max inactive revisions a Container App can have. */ maxInactiveRevisions?: number; + /** Optional. The percent of the total number of replicas that must be brought up before revision transition occurs. Defaults to 100 when none is given. Value must be greater than 0 and less than or equal to 100. */ + revisionTransitionThreshold?: number; /** Container App to be a dev Container App Service */ service?: Service; + /** Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not specified here, default settings will be used. */ + identitySettings?: IdentitySettings[]; } /** Container App Ingress configuration. */ @@ -927,6 +1247,8 @@ export interface Ingress { corsPolicy?: CorsPolicy; /** Settings to expose additional ports on container app */ additionalPortMappings?: IngressPortMapping[]; + /** Whether an http app listens on http or https */ + targetPortHttpScheme?: IngressTargetPortHttpScheme; } /** Traffic weight assigned to a revision */ @@ -1027,12 +1349,64 @@ export interface Dapr { enableApiLogging?: boolean; } +/** Container App Runtime configuration. */ +export interface Runtime { + /** Java app configuration */ + java?: RuntimeJava; + /** .NET app configuration */ + dotnet?: RuntimeDotnet; +} + +/** Java app configuration */ +export interface RuntimeJava { + /** Enable jmx core metrics for the java app */ + enableMetrics?: boolean; + /** Diagnostic capabilities achieved by java agent */ + javaAgent?: RuntimeJavaAgent; +} + +/** Diagnostic capabilities achieved by java agent */ +export interface RuntimeJavaAgent { + /** Enable java agent injection for the java app. */ + enabled?: boolean; + /** Capabilities on the java logging scenario. */ + logging?: RuntimeJavaAgentLogging; +} + +/** Capabilities on the java logging scenario. */ +export interface RuntimeJavaAgentLogging { + /** Settings of the logger for the java app. */ + loggerSettings?: LoggerSetting[]; +} + +/** Logger settings for java workloads. */ +export interface LoggerSetting { + /** Logger name. */ + logger: string; + /** The specified logger's log level. */ + level: Level; +} + +/** .NET app configuration */ +export interface RuntimeDotnet { + /** Auto configure the ASP.NET Core Data Protection feature */ + autoConfigureDataProtection?: boolean; +} + /** Container App to be a dev service */ export interface Service { /** Dev ContainerApp service type */ type: string; } +/** Optional settings for a Managed Identity that is assigned to the Container App. */ +export interface IdentitySettings { + /** The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. */ + identity: string; + /** Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. */ + lifecycle?: IdentitySettingsLifeCycle; +} + /** * Container App versioned application definition. * Defines the desired state of an immutable revision. @@ -1059,6 +1433,8 @@ export interface Template { export interface BaseContainer { /** Container image tag. */ image?: string; + /** The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. */ + imageType?: ImageType; /** Custom container name. */ name?: string; /** Container start command. */ @@ -1094,6 +1470,8 @@ export interface ContainerResources { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly ephemeralStorage?: string; + /** Required GPU in cores for GPU based app, e.g. 1.0 */ + gpu?: number; } /** Volume mount for the Container App. */ @@ -1164,6 +1542,10 @@ export interface Scale { minReplicas?: number; /** Optional. Maximum number of container replicas. Defaults to 10 if not set. */ maxReplicas?: number; + /** Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. */ + cooldownPeriod?: number; + /** Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. */ + pollingInterval?: number; /** Scaling rules. */ rules?: ScaleRule[]; } @@ -1184,12 +1566,16 @@ export interface ScaleRule { /** Container App container Azure Queue based scaling rule. */ export interface QueueScaleRule { + /** Storage account name. required if using managed identity to authenticate */ + accountName?: string; /** Queue name. */ queueName?: string; /** Queue length. */ queueLength?: number; /** Authentication secrets for the queue scale rule. */ auth?: ScaleRuleAuth[]; + /** The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. */ + identity?: string; } /** Auth Secrets for Scale Rule */ @@ -1211,6 +1597,8 @@ export interface CustomScaleRule { metadata?: { [propertyName: string]: string }; /** Authentication secrets for the custom scale rule. */ auth?: ScaleRuleAuth[]; + /** The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. */ + identity?: string; } /** Container App container Http scaling rule. */ @@ -1219,6 +1607,8 @@ export interface HttpScaleRule { metadata?: { [propertyName: string]: string }; /** Authentication secrets for the custom scale rule. */ auth?: ScaleRuleAuth[]; + /** The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. */ + identity?: string; } /** Container App container Tcp scaling rule. */ @@ -1227,6 +1617,8 @@ export interface TcpScaleRule { metadata?: { [propertyName: string]: string }; /** Authentication secrets for the tcp scale rule. */ auth?: ScaleRuleAuth[]; + /** The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. */ + identity?: string; } /** Volume definitions for the Container App. */ @@ -1239,7 +1631,7 @@ export interface Volume { storageName?: string; /** List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. */ secrets?: SecretVolumeItem[]; - /** Mount options used while mounting the AzureFile. Must be a comma-separated string. */ + /** Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string. */ mountOptions?: string; } @@ -1257,6 +1649,10 @@ export interface ServiceBind { serviceId?: string; /** Name of the service bind */ name?: string; + /** Type of the client to be used to connect to the service */ + clientType?: string; + /** Customized keys for customizing injected values to the app */ + customizedKeys?: { [propertyName: string]: string }; } /** Custom domain analysis. */ @@ -1378,70 +1774,259 @@ export interface ContainerAppSecret { readonly keyVaultUrl?: string; } -/** Container App Revisions collection ARM resource. */ -export interface RevisionCollection { - /** Collection of resources. */ - value: Revision[]; +/** The response of a Container Apps Build Resource list operation. */ +export interface ContainerAppsBuildCollection { + /** The Container Apps Build Resource items on this page */ + value: ContainerAppsBuildResource[]; + /** The link to the next page of items */ + nextLink?: string; +} + +/** Configuration of the build. */ +export interface ContainerAppsBuildConfiguration { /** - * Link to next page of resources. + * Base OS used to build and run the app. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Container object under Container App Revision Replica. */ -export interface ReplicaContainer { - /** The Name of the Container */ - name?: string; - /** The Id of the Container */ - containerId?: string; - /** The container ready status */ - ready?: boolean; - /** The container start status */ - started?: boolean; - /** The container restart count */ - restartCount?: number; + readonly baseOs?: string; /** - * Current running state of the container + * Platform to be used to build and run the app. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly runningState?: ContainerAppContainerRunningState; + readonly platform?: string; /** - * The details of container current running state + * Platform version to be used to build and run the app. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly runningStateDetails?: string; + readonly platformVersion?: string; /** - * Log Stream endpoint + * List of environment variables to be passed to the build, secrets should not be used in environment variable. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly logStreamEndpoint?: string; + readonly environmentVariables?: EnvironmentVariable[]; /** - * Container exec endpoint + * List of steps to perform before the build. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly execEndpoint?: string; + readonly preBuildSteps?: PreBuildStep[]; } -/** Container App Revision Replicas collection ARM resource. */ -export interface ReplicaCollection { - /** Collection of resources. */ - value: Replica[]; +/** Container App patch collection */ +export interface PatchCollection { + /** Collection of patch resources. */ + value: ContainerAppsPatchResource[]; + /** the link to the next page of items */ + nextLink?: string; } -/** Diagnostics data collection for a resource. */ -export interface DiagnosticsCollection { - /** Collection of diagnostic data. */ - value: Diagnostics[]; +/** Top level properties that describes current states of the patch resource */ +export interface PatchProperties { + /** The Azure resource id of the target environment for the patch. */ + targetEnvironmentId?: string; + /** The Azure resource id of the target container app for the patch. */ + targetContainerAppId?: string; + /** The Azure resource id of the target revision for the patch. */ + targetRevisionId?: string; /** - * Link to next page of resources. + * The status of the patch operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly patchApplyStatus?: PatchApplyStatus; + /** + * The UTC timestamp that describes when the patch object was created. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly createdAt?: Date; + /** + * The UTC timestamp that describes when the patch object was last updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastModifiedAt?: Date; + /** + * Detailed info describes the patch operation for the target container app. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchDetails?: PatchDetails[]; } -/** Diagnostics resource specific properties */ -export interface DiagnosticsProperties { +/** The detailed info of patch operation performing when applying a patch. */ +export interface PatchDetails { + /** + * The name of the target container for the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetContainerName: string; + /** + * The name of the target image for the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetImage: string; + /** + * The UTC timestamp that describes the latest detection was done. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastDetectionTime: Date; + /** + * The status of the patch detection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly detectionStatus: DetectionStatus; + /** + * The name of the new image created by the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly newImageName?: string; + /** + * New layer update details in the target image. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly newLayer?: PatchDetailsNewLayer; + /** + * The old layer details in the target image. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly oldLayer?: PatchDetailsOldLayer; + /** + * The type for the patch. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchType?: PatchType; +} + +/** New layer update details in the target image. */ +export interface PatchDetailsNewLayer { + /** The details of the new layer for the target image. */ + name?: string; + /** The framework and its version in the new run image for the target image. */ + frameworkAndVersion?: string; + /** The OS name and its version in the new run image for the target image. */ + osAndVersion?: string; +} + +/** The old layer details in the target image. */ +export interface PatchDetailsOldLayer { + /** The details of the old layer for the target image. */ + name?: string; + /** The framework and its version in the old run image for the target image. */ + frameworkAndVersion?: string; + /** The OS name and its version in the old run image for the target image. */ + osAndVersion?: string; +} + +/** The configuration for patcher to skip a patch or not. */ +export interface PatchSkipConfig { + /** The flag to indicate whether to skip the patch or not. */ + skip?: boolean; +} + +/** Container App Label History collection ARM resource. */ +export interface LabelHistoryCollection { + /** Collection of resources. */ + value: LabelHistory[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Container App Label History resource specific properties */ +export interface LabelHistoryProperties { + /** + * List of label history records. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly records?: LabelHistoryRecordItem[]; +} + +/** Container App Label History Item resource specific properties */ +export interface LabelHistoryRecordItem { + /** + * Container App revision name that label was applied to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly revision?: string; + /** + * Timestamp describing when the label was applied to the revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly start?: Date; + /** + * Timestamp describing when the label was removed from the revision. Only meaningful when the label is currently applied to the revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly stop?: Date; +} + +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { + /** Collection of resources. */ + value: Revision[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Container object under Container App Revision Replica. */ +export interface ReplicaContainer { + /** The Name of the Container */ + name?: string; + /** The Id of the Container */ + containerId?: string; + /** The container ready status */ + ready?: boolean; + /** The container start status */ + started?: boolean; + /** The container restart count */ + restartCount?: number; + /** + * Current running state of the container + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: ContainerAppContainerRunningState; + /** + * The details of container current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; + /** + * Log Stream endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly logStreamEndpoint?: string; + /** + * Container exec endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly execEndpoint?: string; + /** + * Container debug endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly debugEndpoint?: string; +} + +/** Container App Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { + /** Collection of resources. */ + value: Replica[]; +} + +/** Diagnostics data collection for a resource. */ +export interface DiagnosticsCollection { + /** Collection of diagnostic data. */ + value: Diagnostics[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Diagnostics resource specific properties */ +export interface DiagnosticsProperties { /** Metadata of the diagnostics response. */ metadata?: DiagnosticsDefinition; /** Set of data collections associated with the response. */ @@ -1601,12 +2186,92 @@ export interface LogAnalyticsConfiguration { customerId?: string; /** Log analytics customer key */ sharedKey?: string; + /** Boolean indicating whether to parse json string log into dynamic json columns */ + dynamicJsonColumns?: boolean; +} + +/** Configuration of Application Insights */ +export interface AppInsightsConfiguration { + /** Application Insights connection string */ + connectionString?: string; +} + +/** Configuration of Open Telemetry */ +export interface OpenTelemetryConfiguration { + /** Open telemetry destinations configuration */ + destinationsConfiguration?: DestinationsConfiguration; + /** Open telemetry trace configuration */ + tracesConfiguration?: TracesConfiguration; + /** Open telemetry logs configuration */ + logsConfiguration?: LogsConfiguration; + /** Open telemetry metrics configuration */ + metricsConfiguration?: MetricsConfiguration; +} + +/** Configuration of Open Telemetry destinations */ +export interface DestinationsConfiguration { + /** Open telemetry datadog destination configuration */ + dataDogConfiguration?: DataDogConfiguration; + /** Open telemetry otlp configurations */ + otlpConfigurations?: OtlpConfiguration[]; +} + +/** Configuration of datadog */ +export interface DataDogConfiguration { + /** The data dog site */ + site?: string; + /** The data dog api key */ + key?: string; +} + +/** Configuration of otlp */ +export interface OtlpConfiguration { + /** The name of otlp configuration */ + name?: string; + /** The endpoint of otlp configuration */ + endpoint?: string; + /** Boolean indicating if otlp configuration is insecure */ + insecure?: boolean; + /** Headers of otlp configurations */ + headers?: Header[]; +} + +/** Header of otlp configuration */ +export interface Header { + /** The key of otlp configuration header */ + key?: string; + /** The value of otlp configuration header */ + value?: string; +} + +/** Configuration of Open Telemetry traces */ +export interface TracesConfiguration { + /** Boolean indicating if including dapr traces */ + includeDapr?: boolean; + /** Open telemetry traces destinations */ + destinations?: string[]; +} + +/** Configuration of Open Telemetry logs */ +export interface LogsConfiguration { + /** Open telemetry logs destinations */ + destinations?: string[]; +} + +/** Configuration of Open Telemetry metrics */ +export interface MetricsConfiguration { + /** Boolean indicating if including keda metrics */ + includeKeda?: boolean; + /** Open telemetry metrics destinations */ + destinations?: string[]; } /** Workload profile to scope container app execution. */ export interface WorkloadProfile { /** Workload profile type for the workloads to run on. */ name: string; + /** Whether to use a FIPS-enabled OS. Supported only for dedicated workload profiles. */ + enableFips?: boolean; /** Workload profile type for the workloads to run on. */ workloadProfileType: string; /** The minimum capacity. */ @@ -1657,6 +2322,25 @@ export interface ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption enabled?: boolean; } +/** The Private Endpoint resource. */ +export interface PrivateEndpoint { + /** + * The ARM identifier for Private Endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; +} + +/** A collection of information about the state of the connection between service consumer and provider. */ +export interface PrivateLinkServiceConnectionState { + /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */ + status?: PrivateEndpointServiceConnectionStatus; + /** The reason for approval/rejection of the connection. */ + description?: string; + /** A message indicating if changes on the service provider require any updates on the consumer. */ + actionsRequired?: string; +} + /** Non versioned Container Apps Job configuration properties */ export interface JobConfiguration { /** Collection of secrets used by a Container Apps Job */ @@ -1675,6 +2359,8 @@ export interface JobConfiguration { eventTriggerConfig?: JobConfigurationEventTriggerConfig; /** Collection of private container registry credentials used by a Container apps job */ registries?: RegistryCredentials[]; + /** Optional settings for Managed Identities that are assigned to the Container App Job. If a Managed Identity is not specified here, default settings will be used. */ + identitySettings?: IdentitySettings[]; } /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ @@ -1730,6 +2416,8 @@ export interface JobScaleRule { metadata?: Record; /** Authentication secrets for the scale rule. */ auth?: ScaleRuleAuth[]; + /** The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned identity. */ + identity?: string; } /** Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created */ @@ -1742,6 +2430,33 @@ export interface JobTemplate { volumes?: Volume[]; } +/** .NET Components ARM resource. */ +export interface DotNetComponentsCollection { + /** Collection of resources. */ + value: DotNetComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Configuration properties for a .NET Component */ +export interface DotNetComponentConfigurationProperty { + /** The name of the property */ + propertyName?: string; + /** The value of the property */ + value?: string; +} + +/** Configuration to bind a .NET Component to another .NET Component */ +export interface DotNetComponentServiceBind { + /** Name of the service bind */ + name?: string; + /** Resource id of the target service */ + serviceId?: string; +} + /** Available operations of the service */ export interface AvailableOperations { /** Collection of available operation details */ @@ -1777,6 +2492,63 @@ export interface OperationDisplay { description?: string; } +/** Java Components ARM resource. */ +export interface JavaComponentsCollection { + /** Collection of resources. */ + value: JavaComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Java Component common properties. */ +export interface JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: + | "SpringCloudGateway" + | "SpringBootAdmin" + | "Nacos" + | "SpringCloudEureka" + | "SpringCloudConfig"; + /** + * Provisioning state of the Java Component. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: JavaComponentProvisioningState; + /** List of Java Components configuration properties */ + configurations?: JavaComponentConfigurationProperty[]; + /** Java component scaling configurations */ + scale?: JavaComponentPropertiesScale; + /** List of Java Components that are bound to the Java component */ + serviceBinds?: JavaComponentServiceBind[]; +} + +/** Configuration properties for a Java Component */ +export interface JavaComponentConfigurationProperty { + /** The name of the property */ + propertyName?: string; + /** The value of the property */ + value?: string; +} + +/** Java component scaling configurations */ +export interface JavaComponentPropertiesScale { + /** Optional. Minimum number of Java component replicas. Defaults to 1 if not set */ + minReplicas?: number; + /** Optional. Maximum number of Java component replicas */ + maxReplicas?: number; +} + +/** Configuration to bind a Java Component to another Java Component */ +export interface JavaComponentServiceBind { + /** Name of the service bind */ + name?: string; + /** Resource id of the target service */ + serviceId?: string; +} + /** Container Apps Jobs collection ARM resource. */ export interface JobsCollection { /** Collection of resources. */ @@ -1790,6 +2562,8 @@ export interface JobsCollection { /** Container Apps Job resource specific properties. */ export interface JobPatchProperties { + /** The complex type of the extended location. */ + extendedLocation?: ExtendedLocation; /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ identity?: ManagedServiceIdentity; /** Resource tags. */ @@ -1872,6 +2646,34 @@ export interface JobExecution { endTime?: Date; /** Job's execution container. */ template?: JobExecutionTemplate; + /** Detailed status of the job execution. */ + detailedStatus?: ExecutionStatus; +} + +/** Container Apps Job execution status. */ +export interface ExecutionStatus { + /** Replicas in the execution. */ + replicas?: ReplicaExecutionStatus[]; +} + +/** Container Apps Job execution replica status. */ +export interface ReplicaExecutionStatus { + /** Replica Name. */ + name?: string; + /** Containers in the execution replica */ + containers?: ContainerExecutionStatus[]; +} + +/** Container Apps Job execution container status. Contains status code and reason */ +export interface ContainerExecutionStatus { + /** Container Name. */ + name?: string; + /** Exit code */ + code?: number; + /** Additional information for the container status */ + additionalInformation?: string; + /** Status of the container */ + status?: string; } /** Container Apps Job Secrets Collection ARM resource. */ @@ -1880,6 +2682,90 @@ export interface JobSecretsCollection { value: Secret[]; } +/** Collection of workflow information elements. */ +export interface WorkflowEnvelopeCollection { + /** Collection of resources. */ + value: WorkflowEnvelope[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Workflow properties definition. */ +export interface WorkflowEnvelope { + /** + * The resource id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Gets the resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Gets the resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource kind. */ + kind?: string; + /** The resource location. */ + location?: string; + /** Additional workflow properties. */ + properties?: WorkflowEnvelopeProperties; +} + +/** Additional workflow properties. */ +export interface WorkflowEnvelopeProperties { + /** Gets or sets the files. */ + files?: Record; + /** Gets or sets the state of the workflow. */ + flowState?: WorkflowState; + /** Gets or sets workflow health. */ + health?: WorkflowHealth; +} + +/** Represents the workflow health. */ +export interface WorkflowHealth { + /** Gets or sets the workflow health state. */ + state: WorkflowHealthState; + /** Gets or sets the workflow error. */ + error?: ErrorEntity; +} + +/** Body of the error response returned from the API. */ +export interface ErrorEntity { + /** Type of error. */ + extendedCode?: string; + /** Message template. */ + messageTemplate?: string; + /** Parameters for the template. */ + parameters?: string[]; + /** Inner errors. */ + innerErrors?: ErrorEntity[]; + /** Error Details. */ + details?: ErrorEntity[]; + /** The error target. */ + target?: string; + /** Basic error code. */ + code?: string; + /** Any details of the error. */ + message?: string; +} + +/** The workflow filter. */ +export interface WorkflowArtifacts { + /** Application settings of the workflow. */ + appSettings?: Record; + /** Files of the app. */ + files?: Record; + /** Files of the app to delete. */ + filesToDelete?: string[]; +} + /** Collection of Environments */ export interface ManagedEnvironmentsCollection { /** Collection of resources. */ @@ -1952,22 +2838,32 @@ export interface WorkloadProfileStatesProperties { currentCount?: number; } -/** Collection of Storage for Environments */ -export interface ManagedEnvironmentStoragesCollection { - /** Collection of storage resources. */ - value: ManagedEnvironmentStorage[]; +/** List of private endpoint connection associated with the specified resource */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** Storage properties */ -export interface ManagedEnvironmentStorageProperties { - /** Azure file properties */ - azureFile?: AzureFileProperties; +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; + /** + * URL to get the next set of operation list results (if there are any). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; } -/** SourceControl collection ARM resource. */ -export interface SourceControlCollection { +/** Dapr Component Resiliency Policies ARM resource. */ +export interface DaprComponentResiliencyPoliciesCollection { /** Collection of resources. */ - value: SourceControl[]; + value: DaprComponentResiliencyPolicy[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1975,7 +2871,386 @@ export interface SourceControlCollection { readonly nextLink?: string; } -/** Configuration properties that define the mutable settings of a Container App SourceControl */ +/** Dapr Component Resiliency Policy Configuration. */ +export interface DaprComponentResiliencyPolicyConfiguration { + /** The optional HTTP retry policy configuration */ + httpRetryPolicy?: DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; + /** The optional timeout policy configuration */ + timeoutPolicy?: DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; + /** The optional circuit breaker policy configuration */ + circuitBreakerPolicy?: DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; +} + +/** Dapr Component Resiliency Policy HTTP Retry Policy Configuration. */ +export interface DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration { + /** The optional maximum number of retries */ + maxRetries?: number; + /** The optional retry backoff configuration */ + retryBackOff?: DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; +} + +/** Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. */ +export interface DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration { + /** The optional initial delay in milliseconds before an operation is retried */ + initialDelayInMilliseconds?: number; + /** The optional maximum time interval in milliseconds between retry attempts */ + maxIntervalInMilliseconds?: number; +} + +/** Dapr Component Resiliency Policy Timeout Policy Configuration. */ +export interface DaprComponentResiliencyPolicyTimeoutPolicyConfiguration { + /** The optional response timeout in seconds */ + responseTimeoutInSeconds?: number; +} + +/** Dapr Component Resiliency Policy Circuit Breaker Policy Configuration. */ +export interface DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration { + /** The number of consecutive errors before the circuit is opened. */ + consecutiveErrors?: number; + /** The interval in seconds until a retry attempt is made after the circuit is opened. */ + timeoutInSeconds?: number; + /** The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. */ + intervalInSeconds?: number; +} + +/** Dapr Components ARM resource. */ +export interface DaprComponentsCollection { + /** Collection of resources. */ + value: DaprComponent[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Dapr Subscriptions ARM resource. */ +export interface DaprSubscriptionsCollection { + /** Collection of resources. */ + value: DaprSubscription[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Dapr PubSub Event Subscription Routes configuration. */ +export interface DaprSubscriptionRoutes { + /** The list of Dapr PubSub Event Subscription Route Rules. */ + rules?: DaprSubscriptionRouteRule[]; + /** The default path to deliver events that do not match any of the rules. */ + default?: string; +} + +/** Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path. */ +export interface DaprSubscriptionRouteRule { + /** The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list. */ + match?: string; + /** The path for events that match this rule */ + path?: string; +} + +/** Dapr PubSub Bulk Subscription Options. */ +export interface DaprSubscriptionBulkSubscribeOptions { + /** Enable bulk subscription */ + enabled?: boolean; + /** Maximum number of messages to deliver in a bulk message. */ + maxMessagesCount?: number; + /** Maximum duration in milliseconds to wait before a bulk message is sent to the app. */ + maxAwaitDurationMs?: number; +} + +/** Http Route Config properties */ +export interface HttpRouteConfigProperties { + /** + * The provisioning state of the Http Route Config in cluster + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: HttpRouteProvisioningState; + /** + * List of errors when trying to reconcile http routes + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningErrors?: HttpRouteProvisioningErrors[]; + /** + * FQDN of the route resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fqdn?: string; + /** Custom domain bindings for http Routes' hostnames. */ + customDomains?: CustomDomain[]; + /** Routing Rules for http route resource. */ + rules?: HttpRouteRule[]; +} + +/** List of provisioning errors for a http route config object */ +export interface HttpRouteProvisioningErrors { + /** + * Timestamp error occured at + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timestamp?: Date; + /** + * Description or error message + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; +} + +/** Http Route rule. */ +export interface HttpRouteRule { + /** Targets- container apps, revisions, labels */ + targets?: HttpRouteTarget[]; + /** Routing configuration that will allow matches on specific paths/headers. */ + routes?: HttpRoute[]; + /** Description of rule. Optional. */ + description?: string; +} + +/** Targets - Container App Names, Revision Names, Labels. */ +export interface HttpRouteTarget { + /** Container App Name to route requests to */ + containerApp: string; + /** Revision to route requests to */ + revision?: string; + /** Label/Revision to route requests to */ + label?: string; + /** Weighted routing */ + weight?: number; +} + +/** Http Routes configuration, including paths to match on and whether or not rewrites are to be done. */ +export interface HttpRoute { + /** Conditions route will match on */ + match?: HttpRouteMatch; + /** Once route is matched, what is the desired action */ + action?: HttpRouteAction; +} + +/** Criteria to match on */ +export interface HttpRouteMatch { + /** match on all prefix's. Not exact */ + prefix?: string; + /** match on exact path */ + path?: string; + /** match on all prefix's. Not exact */ + pathSeparatedPrefix?: string; + /** path case sensitive, default is true */ + caseSensitive?: boolean; +} + +/** Action to perform once matching of routes is done */ +export interface HttpRouteAction { + /** Rewrite prefix, default is no rewrites */ + prefixRewrite?: string; +} + +/** Collection of Advanced Ingress Routing Config resources. */ +export interface HttpRouteConfigCollection { + /** Collection of resources. */ + value: HttpRouteConfig[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** The response of list maintenance configuration resources. */ +export interface MaintenanceConfigurationCollection { + /** Results of the list maintenance configuration resources. */ + value?: MaintenanceConfigurationResource[]; + /** + * Link for next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Maintenance schedule entry for a managed environment. */ +export interface ScheduledEntry { + /** Day of the week when a managed environment can be patched. */ + weekDay: WeekDay; + /** Start hour after which managed environment maintenance can start from 0 to 23 hour. */ + startHourUtc: number; + /** Length of maintenance window range from 8 to 24 hours. */ + durationHours?: number; +} + +/** Collection of Storage for Environments */ +export interface ManagedEnvironmentStoragesCollection { + /** Collection of storage resources. */ + value: ManagedEnvironmentStorage[]; +} + +/** Storage properties */ +export interface ManagedEnvironmentStorageProperties { + /** Azure file properties */ + azureFile?: AzureFileProperties; + /** NFS Azure file properties */ + nfsAzureFile?: NfsAzureFileProperties; +} + +/** NFS Azure File Properties. */ +export interface NfsAzureFileProperties { + /** Server for NFS azure file. */ + server?: string; + /** Access mode for storage */ + accessMode?: AccessMode; + /** NFS Azure file share name. */ + shareName?: string; +} + +/** Session pool collection Azure resource. */ +export interface SessionPoolCollection { + /** Collection of resources. */ + value: SessionPool[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Managed service identity (system assigned and/or user assigned identities) */ +export interface ManagedServiceIdentityAutoGenerated { + /** + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ + type: ManagedServiceIdentityType; + /** The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ + userAssignedIdentities?: { + [propertyName: string]: UserAssignedIdentity | null; + }; +} + +/** Scale configuration. */ +export interface ScaleConfiguration { + /** The maximum count of sessions at the same time. */ + maxConcurrentSessions?: number; + /** The minimum count of ready session instances. */ + readySessionInstances?: number; +} + +/** Secret definition. */ +export interface SessionPoolSecret { + /** Secret Name. */ + name?: string; + /** Secret Value. */ + value?: string; +} + +/** Dynamic pool configuration. */ +export interface DynamicPoolConfiguration { + /** The execution type of the session pool. */ + executionType?: ExecutionType; + /** The cooldown period of a session in seconds. */ + cooldownPeriodInSeconds?: number; +} + +/** Custom container configuration. */ +export interface CustomContainerTemplate { + /** Private container registry credentials for containers used by the sessions of the session pool. */ + registryCredentials?: SessionRegistryCredentials; + /** List of container definitions for the sessions of the session pool. */ + containers?: SessionContainer[]; + /** Session pool ingress configuration. */ + ingress?: SessionIngress; +} + +/** Session pool private registry credentials. */ +export interface SessionRegistryCredentials { + /** Container registry server. */ + server?: string; + /** Container registry username. */ + username?: string; + /** The name of the secret that contains the registry login password */ + passwordSecretRef?: string; + /** A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ + identity?: string; +} + +/** Container definitions for the sessions of the session pool. */ +export interface SessionContainer { + /** Container image tag. */ + image?: string; + /** Custom container name. */ + name?: string; + /** Container start command. */ + command?: string[]; + /** Container start command arguments. */ + args?: string[]; + /** Container environment variables. */ + env?: EnvironmentVar[]; + /** Container resource requirements. */ + resources?: SessionContainerResources; +} + +/** Container resource requirements for sessions of the session pool. */ +export interface SessionContainerResources { + /** Required CPU in cores, e.g. 0.5 */ + cpu?: number; + /** Required memory, e.g. "250Mb" */ + memory?: string; +} + +/** Session pool ingress configuration. */ +export interface SessionIngress { + /** Target port in containers for traffic from ingress */ + targetPort?: number; +} + +/** Session network configuration. */ +export interface SessionNetworkConfiguration { + /** Network status for the sessions. */ + status?: SessionNetworkStatus; +} + +/** Optional settings for a Managed Identity that is assigned to the Session pool. */ +export interface ManagedIdentitySetting { + /** The resource ID of a user-assigned managed identity that is assigned to the Session Pool, or 'system' for system-assigned identity. */ + identity: string; + /** Use to select the lifecycle stages of a Session Pool during which the Managed Identity should be available. */ + lifecycle?: IdentitySettingsLifeCycle; +} + +/** Container App session pool updatable properties. */ +export interface SessionPoolUpdatableProperties { + /** Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentityAutoGenerated; + /** The scale configuration of the session pool. */ + scaleConfiguration?: ScaleConfiguration; + /** The secrets of the session pool. */ + secrets?: SessionPoolSecret[]; + /** The pool configuration if the poolManagementType is dynamic. */ + dynamicPoolConfiguration?: DynamicPoolConfiguration; + /** The custom container configuration if the containerType is CustomContainer. */ + customContainerTemplate?: CustomContainerTemplate; + /** The network configuration of the sessions in the session pool. */ + sessionNetworkConfiguration?: SessionNetworkConfiguration; +} + +/** SourceControl collection ARM resource. */ +export interface SourceControlCollection { + /** Collection of resources. */ + value: SourceControl[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Configuration properties that define the mutable settings of a Container App SourceControl */ export interface GithubActionConfiguration { /** Registry configurations. */ registryInfo?: RegistryInfo; @@ -1983,6 +3258,8 @@ export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; /** Context path */ contextPath?: string; + /** Dockerfile path */ + dockerfilePath?: string; /** One time Github PAT to configure github environment */ githubPersonalAccessToken?: string; /** Image name */ @@ -1995,6 +3272,8 @@ export interface GithubActionConfiguration { runtimeStack?: string; /** Runtime version */ runtimeVersion?: string; + /** List of environment variables to be passed to the build. */ + buildEnvironmentVariables?: EnvironmentVariable[]; } /** Container App registry information. */ @@ -2048,6 +3327,29 @@ export interface UsageName { localizedValue?: string; } +/** Spring Cloud Gateway route definition */ +export interface ScgRoute { + /** Id of the route */ + id: string; + /** Uri of the route */ + uri: string; + /** Predicates of the route */ + predicates?: string[]; + /** Filters of the route */ + filters?: string[]; + /** Order of the route */ + order?: number; +} + +/** Container App Ingress configuration. */ +export interface JavaComponentIngress { + /** + * Hostname of the Java Component endpoint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly fqdn?: string; +} + /** Container App executions names list. */ export interface JobExecutionNamesCollection { /** Collection of resources. */ @@ -2065,6 +3367,55 @@ export interface TrackedResource extends Resource { location: string; } +/** The Private Endpoint Connection resource. */ +export interface PrivateEndpointConnection extends Resource { + /** + * The group ids for the private endpoint resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupIds?: string[]; + /** The resource of private end point. */ + privateEndpoint?: PrivateEndpoint; + /** A collection of information about the state of the connection between service consumer and provider. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + /** + * The provisioning state of the private endpoint connection resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +/** A private link resource */ +export interface PrivateLinkResource extends Resource { + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** The private link resource private link DNS zone name. */ + requiredZoneNames?: string[]; +} + +/** Dapr component properties */ +export interface ConnectedEnvironmentDaprComponentProperties + extends DaprComponentProperties { + /** + * Provisioning state of the Connected Environment Dapr Component. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ConnectedEnvironmentDaprComponentProvisioningState; + /** + * Any errors that occurred during deployment or deployment validation + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; +} + /** Container App init container definition */ export interface InitContainer extends BaseContainer {} @@ -2074,6 +3425,62 @@ export interface Container extends BaseContainer { probes?: ContainerAppProbe[]; } +/** Spring Cloud Gateway properties. */ +export interface SpringCloudGatewayComponent extends JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: "SpringCloudGateway"; + /** Java Component Ingress configurations. */ + ingress?: JavaComponentIngress; + /** Gateway route definition */ + springCloudGatewayRoutes?: ScgRoute[]; +} + +/** Spring Boot Admin properties. */ +export interface SpringBootAdminComponent extends JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: "SpringBootAdmin"; + /** Java Component Ingress configurations. */ + ingress?: JavaComponentIngress; +} + +/** Nacos properties. */ +export interface NacosComponent extends JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: "Nacos"; + /** Java Component Ingress configurations. */ + ingress?: JavaComponentIngress; +} + +/** Spring Cloud Eureka properties. */ +export interface SpringCloudEurekaComponent extends JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: "SpringCloudEureka"; + /** Java Component Ingress configurations. */ + ingress?: JavaComponentIngress; +} + +/** Spring Cloud Config properties. */ +export interface SpringCloudConfigComponent extends JavaComponentProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + componentType: "SpringCloudConfig"; +} + +/** Configuration to setup App Resiliency */ +export interface AppResiliency extends ProxyResource { + /** Policy to set request timeouts */ + timeoutPolicy?: TimeoutPolicy; + /** Policy that defines http request retry conditions */ + httpRetryPolicy?: HttpRetryPolicy; + /** Policy that defines tcp request retry conditions */ + tcpRetryPolicy?: TcpRetryPolicy; + /** Policy that defines circuit breaker conditions */ + circuitBreakerPolicy?: CircuitBreakerPolicy; + /** Defines parameters for http connection pooling */ + httpConnectionPool?: HttpConnectionPool; + /** Defines parameters for tcp connection pooling */ + tcpConnectionPool?: TcpConnectionPool; +} + /** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ export interface AuthConfig extends ProxyResource { /** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ @@ -2098,32 +3505,43 @@ export interface AvailableWorkloadProfile extends ProxyResource { properties?: AvailableWorkloadProfileProperties; } -/** Billing meter. */ -export interface BillingMeter extends ProxyResource { - /** Region for the billing meter. */ - location?: string; - /** Revision resource specific properties */ - properties?: BillingMeterProperties; +/** Information pertaining to an individual build. */ +export interface BuildResource extends ProxyResource { + /** + * Build provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: BuildProvisioningState; + /** + * Status of the build once it has been provisioned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildStatus?: BuildStatus; + /** Container registry that the final image will be uploaded to. */ + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + /** Configuration of the build. */ + configuration?: BuildConfiguration; + /** + * Endpoint to which the source code should be uploaded. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uploadEndpoint?: string; + /** + * Endpoint from which the build logs can be streamed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly logStreamEndpoint?: string; + /** + * Endpoint to use to retrieve an authentication token for log streaming and uploading source code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tokenEndpoint?: string; } /** Dapr Component. */ -export interface DaprComponent extends ProxyResource { - /** Component type */ - componentType?: string; - /** Component version */ - version?: string; - /** Boolean describing if the component errors are ignores */ - ignoreErrors?: boolean; - /** Initialization timeout */ - initTimeout?: string; - /** Collection of secrets used by a Dapr component */ - secrets?: Secret[]; - /** Name of a Dapr component to retrieve component secrets from */ - secretStoreComponent?: string; - /** Component metadata */ - metadata?: DaprMetadata[]; - /** Names of container apps that can use this Dapr component */ - scopes?: string[]; +export interface ConnectedEnvironmentDaprComponent extends ProxyResource { + /** Dapr component properties */ + properties?: ConnectedEnvironmentDaprComponentProperties; } /** Storage resource for connectedEnvironment. */ @@ -2132,6 +3550,50 @@ export interface ConnectedEnvironmentStorage extends ProxyResource { properties?: ConnectedEnvironmentStorageProperties; } +/** Information pertaining to an individual build. */ +export interface ContainerAppsBuildResource extends ProxyResource { + /** + * Build provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: BuildProvisioningState; + /** + * Status of the build once it has been provisioned. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildStatus?: BuildStatus; + /** + * Container registry that the final image will be uploaded to. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly destinationContainerRegistry?: ContainerRegistryWithCustomImage; + /** + * Configuration of the build. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly configuration?: ContainerAppsBuildConfiguration; + /** + * Endpoint from which the build logs can be streamed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly logStreamEndpoint?: string; +} + +/** Container App Patch */ +export interface ContainerAppsPatchResource extends ProxyResource { + /** + * Properties that describes current states of the patch resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: PatchProperties; +} + +/** Container App Label History. */ +export interface LabelHistory extends ProxyResource { + /** Container App Label History resource specific properties */ + properties?: LabelHistoryProperties; +} + /** Container App Revision. */ export interface Revision extends ProxyResource { /** @@ -2172,6 +3634,11 @@ export interface Revision extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly trafficWeight?: number; + /** + * List of labels assigned to this revision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly labels?: string[]; /** * Optional Field - Platform Error Message * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2223,12 +3690,99 @@ export interface Diagnostics extends ProxyResource { properties?: DiagnosticsProperties; } +/** .NET Component. */ +export interface DotNetComponent extends ProxyResource { + /** Type of the .NET Component. */ + componentType?: DotNetComponentType; + /** + * Provisioning state of the .NET Component. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: DotNetComponentProvisioningState; + /** List of .NET Components configuration properties */ + configurations?: DotNetComponentConfigurationProperty[]; + /** List of .NET Components that are bound to the .NET component */ + serviceBinds?: DotNetComponentServiceBind[]; +} + +/** Java Component. */ +export interface JavaComponent extends ProxyResource { + /** Java Component resource specific properties */ + properties?: JavaComponentPropertiesUnion; +} + +/** A logic app extension resource */ +export interface LogicApp extends ProxyResource { + /** The resource-specific properties for this resource. */ + properties?: Record; +} + /** Collection of all the workload Profile States for a Managed Environment.. */ export interface WorkloadProfileStates extends ProxyResource { /** Workload Profile resource specific properties. */ properties?: WorkloadProfileStatesProperties; } +/** Dapr Component Resiliency Policy. */ +export interface DaprComponentResiliencyPolicy extends ProxyResource { + /** The optional inbound component resiliency policy configuration */ + inboundPolicy?: DaprComponentResiliencyPolicyConfiguration; + /** The optional outbound component resiliency policy configuration */ + outboundPolicy?: DaprComponentResiliencyPolicyConfiguration; +} + +/** Dapr Component. */ +export interface DaprComponent extends ProxyResource { + /** Component type */ + componentType?: string; + /** Component version */ + version?: string; + /** Boolean describing if the component errors are ignores */ + ignoreErrors?: boolean; + /** Initialization timeout */ + initTimeout?: string; + /** Collection of secrets used by a Dapr component */ + secrets?: Secret[]; + /** Name of a Dapr component to retrieve component secrets from */ + secretStoreComponent?: string; + /** Component metadata */ + metadata?: DaprMetadata[]; + /** Names of container apps that can use this Dapr component */ + scopes?: string[]; + /** List of container app services that are bound to the Dapr component */ + serviceComponentBind?: DaprComponentServiceBinding[]; +} + +/** Dapr PubSub Event Subscription. */ +export interface DaprSubscription extends ProxyResource { + /** Dapr PubSub component name */ + pubsubName?: string; + /** Topic name */ + topic?: string; + /** Deadletter topic name */ + deadLetterTopic?: string; + /** Subscription routes */ + routes?: DaprSubscriptionRoutes; + /** Application scopes to restrict the subscription to specific apps. */ + scopes?: string[]; + /** Subscription metadata */ + metadata?: { [propertyName: string]: string }; + /** Bulk subscription options */ + bulkSubscribe?: DaprSubscriptionBulkSubscribeOptions; +} + +/** Advanced Ingress routing for path/header based routing for a Container App Environment */ +export interface HttpRouteConfig extends ProxyResource { + /** Http Route Config properties */ + properties?: HttpRouteConfigProperties; +} + +/** Information about the Maintenance Configuration resource. */ +export interface MaintenanceConfigurationResource extends ProxyResource { + /** List of maintenance schedules for a managed environment. */ + scheduledEntries?: ScheduledEntry[]; +} + /** Storage resource for managedEnvironment. */ export interface ManagedEnvironmentStorage extends ProxyResource { /** Storage properties */ @@ -2254,6 +3808,21 @@ export interface SourceControl extends ProxyResource { githubActionConfiguration?: GithubActionConfiguration; } +/** Information about the SourceToCloud builder resource. */ +export interface BuilderResource extends TrackedResource { + /** The managed service identities assigned to this resource. */ + identity?: ManagedServiceIdentity; + /** + * Provisioning state of a builder resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: BuilderProvisioningState; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; + /** List of mappings of container registries and the managed identity used to connect to it. */ + containerRegistries?: ContainerRegistry[]; +} + /** An environment for Kubernetes cluster specialized for web workloads by Azure App Service */ export interface ConnectedEnvironment extends TrackedResource { /** The complex type of the extended location. */ @@ -2295,17 +3864,26 @@ export interface ContainerApp extends TrackedResource { identity?: ManagedServiceIdentity; /** The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. */ managedBy?: string; + /** Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. */ + kind?: Kind; /** * Provisioning state of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ContainerAppProvisioningState; + /** + * Any errors that occurred during deployment + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deploymentErrors?: string; /** Deprecated. Resource ID of the Container App's environment. */ managedEnvironmentId?: string; /** Resource ID of environment. */ environmentId?: string; /** Workload profile name to pin for container app execution. */ workloadProfileName?: string; + /** Container App auto patch configuration. */ + patchingConfiguration?: ContainerAppPropertiesPatchingConfiguration; /** * Name of the latest revision of the Container App. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2360,6 +3938,8 @@ export interface ContainerAppAuthToken extends TrackedResource { export interface ManagedEnvironment extends TrackedResource { /** Kind of the Environment. */ kind?: string; + /** Managed identities for the Managed Environment to interact with other Azure services without maintaining any secrets or credentials in code. */ + identity?: ManagedServiceIdentity; /** * Provisioning state of the Environment. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2392,8 +3972,14 @@ export interface ManagedEnvironment extends TrackedResource { * supported */ appLogsConfiguration?: AppLogsConfiguration; + /** Environment level Application Insights configuration */ + appInsightsConfiguration?: AppInsightsConfiguration; + /** Environment Open Telemetry configuration */ + openTelemetryConfiguration?: OpenTelemetryConfiguration; /** Whether or not this Managed Environment is zone-redundant. */ zoneRedundant?: boolean; + /** The list of availability zones to use for managed environment */ + availabilityZones?: string[]; /** Custom domain configuration for the environment */ customDomainConfiguration?: CustomDomainConfiguration; /** @@ -2413,10 +3999,19 @@ export interface ManagedEnvironment extends TrackedResource { peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; /** Peer traffic settings for the Managed Environment */ peerTrafficConfiguration?: ManagedEnvironmentPropertiesPeerTrafficConfiguration; + /** + * Private endpoint connections to the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. */ + publicNetworkAccess?: PublicNetworkAccess; } /** Container App Job */ export interface Job extends TrackedResource { + /** The complex type of the extended location. */ + extendedLocation?: ExtendedLocation; /** Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ identity?: ManagedServiceIdentity; /** @@ -2424,6 +4019,11 @@ export interface Job extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: JobProvisioningState; + /** + * Current running state of the job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: JobRunningState; /** Resource ID of environment. */ environmentId?: string; /** Workload profile name to pin for container apps job execution. */ @@ -2464,11 +4064,95 @@ export interface EnvironmentAuthToken extends TrackedResource { readonly expires?: Date; } +/** Container App session pool. */ +export interface SessionPool extends TrackedResource { + /** Managed identities needed by a session pool to interact with other Azure services to not maintain any secrets or credentials in code. */ + identity?: ManagedServiceIdentityAutoGenerated; + /** Resource ID of the session pool's environment. */ + environmentId?: string; + /** The container type of the sessions. */ + containerType?: ContainerType; + /** The pool management type of the session pool. */ + poolManagementType?: PoolManagementType; + /** + * The number of nodes the session pool is using. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nodeCount?: number; + /** The scale configuration of the session pool. */ + scaleConfiguration?: ScaleConfiguration; + /** The secrets of the session pool. */ + secrets?: SessionPoolSecret[]; + /** The pool configuration if the poolManagementType is dynamic. */ + dynamicPoolConfiguration?: DynamicPoolConfiguration; + /** The custom container configuration if the containerType is CustomContainer. */ + customContainerTemplate?: CustomContainerTemplate; + /** The network configuration of the sessions in the session pool. */ + sessionNetworkConfiguration?: SessionNetworkConfiguration; + /** + * The endpoint to manage the pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly poolManagementEndpoint?: string; + /** + * Provisioning state of the session pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: SessionPoolProvisioningState; + /** Optional settings for a Managed Identity that is assigned to the Session pool. */ + managedIdentitySettings?: ManagedIdentitySetting[]; +} + +/** Defines headers for Builders_createOrUpdate operation. */ +export interface BuildersCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builders_update operation. */ +export interface BuildersUpdateHeaders { + location?: string; +} + +/** Defines headers for Builders_delete operation. */ +export interface BuildersDeleteHeaders { + location?: string; +} + +/** Defines headers for Builds_createOrUpdate operation. */ +export interface BuildsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Builds_delete operation. */ +export interface BuildsDeleteHeaders { + location?: string; +} + /** Defines headers for ConnectedEnvironments_delete operation. */ export interface ConnectedEnvironmentsDeleteHeaders { location?: string; } +/** Defines headers for ConnectedEnvironmentsCertificates_delete operation. */ +export interface ConnectedEnvironmentsCertificatesDeleteHeaders { + location?: string; +} + +/** Defines headers for ConnectedEnvironmentsCertificates_update operation. */ +export interface ConnectedEnvironmentsCertificatesUpdateHeaders { + location?: string; +} + +/** Defines headers for ConnectedEnvironmentsDaprComponents_delete operation. */ +export interface ConnectedEnvironmentsDaprComponentsDeleteHeaders { + location?: string; +} + +/** Defines headers for ConnectedEnvironmentsStorages_delete operation. */ +export interface ConnectedEnvironmentsStoragesDeleteHeaders { + location?: string; +} + /** Defines headers for ContainerApps_delete operation. */ export interface ContainerAppsDeleteHeaders { location?: string; @@ -2489,6 +4173,27 @@ export interface ContainerAppsStopHeaders { location?: string; } +/** Defines headers for ContainerAppsBuilds_delete operation. */ +export interface ContainerAppsBuildsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerAppsPatches_delete operation. */ +export interface ContainerAppsPatchesDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerAppsPatches_skipConfigure operation. */ +export interface ContainerAppsPatchesSkipConfigureHeaders { + location?: string; +} + +/** Defines headers for ContainerAppsPatches_apply operation. */ +export interface ContainerAppsPatchesApplyHeaders { + azureAsyncOperation?: string; + location?: string; +} + /** Defines headers for Jobs_delete operation. */ export interface JobsDeleteHeaders { location?: string; @@ -2514,6 +4219,53 @@ export interface JobsStopMultipleExecutionsHeaders { location?: string; } +/** Defines headers for Jobs_resume operation. */ +export interface JobsResumeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for Jobs_suspend operation. */ +export interface JobsSuspendHeaders { + azureAsyncOperation?: string; + location?: string; +} + +/** Defines headers for DotNetComponents_update operation. */ +export interface DotNetComponentsUpdateHeaders { + location?: string; +} + +/** Defines headers for DotNetComponents_delete operation. */ +export interface DotNetComponentsDeleteHeaders { + location?: string; +} + +/** Defines headers for JavaComponents_update operation. */ +export interface JavaComponentsUpdateHeaders { + location?: string; +} + +/** Defines headers for JavaComponents_delete operation. */ +export interface JavaComponentsDeleteHeaders { + location?: string; +} + +/** Defines headers for ManagedEnvironmentPrivateEndpointConnections_delete operation. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders { + location?: string; +} + +/** Defines headers for ContainerAppsSessionPools_update operation. */ +export interface ContainerAppsSessionPoolsUpdateHeaders { + location?: string; +} + +/** Defines headers for ContainerAppsSessionPools_delete operation. */ +export interface ContainerAppsSessionPoolsDeleteHeaders { + location?: string; +} + /** Known values of {@link CreatedByType} that the service accepts. */ export enum KnownCreatedByType { /** User */ @@ -2554,7 +4306,118 @@ export enum KnownApplicability { * **LocationDefault** \ * **Custom** */ -export type Applicability = string; +export type Applicability = string; + +/** Known values of {@link BuilderProvisioningState} that the service accepts. */ +export enum KnownBuilderProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Defines values for BuilderProvisioningState. \ + * {@link KnownBuilderProvisioningState} can be used interchangeably with BuilderProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Creating** \ + * **Updating** \ + * **Deleting** + */ +export type BuilderProvisioningState = string; + +/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ +export enum KnownManagedServiceIdentityType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +} + +/** + * Defines values for ManagedServiceIdentityType. \ + * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** + */ +export type ManagedServiceIdentityType = string; + +/** Known values of {@link BuildProvisioningState} that the service accepts. */ +export enum KnownBuildProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Defines values for BuildProvisioningState. \ + * {@link KnownBuildProvisioningState} can be used interchangeably with BuildProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Creating** \ + * **Updating** \ + * **Deleting** + */ +export type BuildProvisioningState = string; + +/** Known values of {@link BuildStatus} that the service accepts. */ +export enum KnownBuildStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for BuildStatus. \ + * {@link KnownBuildStatus} can be used interchangeably with BuildStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **InProgress** \ + * **Succeeded** \ + * **Canceled** \ + * **Failed** + */ +export type BuildStatus = string; /** Known values of {@link ExtendedLocationTypes} that the service accepts. */ export enum KnownExtendedLocationTypes { @@ -2652,6 +4515,72 @@ export enum KnownCertificateProvisioningState { */ export type CertificateProvisioningState = string; +/** Known values of {@link CertificateType} that the service accepts. */ +export enum KnownCertificateType { + /** ServerSSLCertificate */ + ServerSSLCertificate = "ServerSSLCertificate", + /** ImagePullTrustedCA */ + ImagePullTrustedCA = "ImagePullTrustedCA", +} + +/** + * Defines values for CertificateType. \ + * {@link KnownCertificateType} can be used interchangeably with CertificateType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServerSSLCertificate** \ + * **ImagePullTrustedCA** + */ +export type CertificateType = string; + +/** Known values of {@link ConnectedEnvironmentDaprComponentProvisioningState} that the service accepts. */ +export enum KnownConnectedEnvironmentDaprComponentProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** InProgress */ + InProgress = "InProgress", +} + +/** + * Defines values for ConnectedEnvironmentDaprComponentProvisioningState. \ + * {@link KnownConnectedEnvironmentDaprComponentProvisioningState} can be used interchangeably with ConnectedEnvironmentDaprComponentProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **InProgress** + */ +export type ConnectedEnvironmentDaprComponentProvisioningState = string; + +/** Known values of {@link ConnectedEnvironmentStorageProvisioningState} that the service accepts. */ +export enum KnownConnectedEnvironmentStorageProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** InProgress */ + InProgress = "InProgress", +} + +/** + * Defines values for ConnectedEnvironmentStorageProvisioningState. \ + * {@link KnownConnectedEnvironmentStorageProvisioningState} can be used interchangeably with ConnectedEnvironmentStorageProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **InProgress** + */ +export type ConnectedEnvironmentStorageProvisioningState = string; + /** Known values of {@link AccessMode} that the service accepts. */ export enum KnownAccessMode { /** ReadOnly */ @@ -2670,29 +4599,20 @@ export enum KnownAccessMode { */ export type AccessMode = string; -/** Known values of {@link ManagedServiceIdentityType} that the service accepts. */ -export enum KnownManagedServiceIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned", +/** Known values of {@link Kind} that the service accepts. */ +export enum KnownKind { + /** Workflowapp */ + Workflowapp = "workflowapp", } /** - * Defines values for ManagedServiceIdentityType. \ - * {@link KnownManagedServiceIdentityType} can be used interchangeably with ManagedServiceIdentityType, + * Defines values for Kind. \ + * {@link KnownKind} can be used interchangeably with Kind, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** + * **workflowapp** */ -export type ManagedServiceIdentityType = string; +export type Kind = string; /** Known values of {@link ContainerAppProvisioningState} that the service accepts. */ export enum KnownContainerAppProvisioningState { @@ -2721,12 +4641,35 @@ export enum KnownContainerAppProvisioningState { */ export type ContainerAppProvisioningState = string; +/** Known values of {@link PatchingMode} that the service accepts. */ +export enum KnownPatchingMode { + /** Automatic */ + Automatic = "Automatic", + /** Manual */ + Manual = "Manual", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for PatchingMode. \ + * {@link KnownPatchingMode} can be used interchangeably with PatchingMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Automatic** \ + * **Manual** \ + * **Disabled** + */ +export type PatchingMode = string; + /** Known values of {@link ActiveRevisionsMode} that the service accepts. */ export enum KnownActiveRevisionsMode { /** Multiple */ Multiple = "Multiple", /** Single */ Single = "Single", + /** Labels */ + Labels = "Labels", } /** @@ -2735,7 +4678,8 @@ export enum KnownActiveRevisionsMode { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Multiple** \ - * **Single** + * **Single** \ + * **Labels** */ export type ActiveRevisionsMode = string; @@ -2769,6 +4713,8 @@ export enum KnownBindingType { Disabled = "Disabled", /** SniEnabled */ SniEnabled = "SniEnabled", + /** Auto */ + Auto = "Auto", } /** @@ -2777,7 +4723,8 @@ export enum KnownBindingType { * this enum contains the known values that the service supports. * ### Known values supported by the service * **Disabled** \ - * **SniEnabled** + * **SniEnabled** \ + * **Auto** */ export type BindingType = string; @@ -2838,6 +4785,24 @@ export enum KnownIngressClientCertificateMode { */ export type IngressClientCertificateMode = string; +/** Known values of {@link IngressTargetPortHttpScheme} that the service accepts. */ +export enum KnownIngressTargetPortHttpScheme { + /** Http */ + Http = "http", + /** Https */ + Https = "https", +} + +/** + * Defines values for IngressTargetPortHttpScheme. \ + * {@link KnownIngressTargetPortHttpScheme} can be used interchangeably with IngressTargetPortHttpScheme, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **http** \ + * **https** + */ +export type IngressTargetPortHttpScheme = string; + /** Known values of {@link AppProtocol} that the service accepts. */ export enum KnownAppProtocol { /** Http */ @@ -2880,6 +4845,78 @@ export enum KnownLogLevel { */ export type LogLevel = string; +/** Known values of {@link Level} that the service accepts. */ +export enum KnownLevel { + /** Off */ + Off = "off", + /** Error */ + Error = "error", + /** Info */ + Info = "info", + /** Debug */ + Debug = "debug", + /** Trace */ + Trace = "trace", + /** Warn */ + Warn = "warn", +} + +/** + * Defines values for Level. \ + * {@link KnownLevel} can be used interchangeably with Level, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **off** \ + * **error** \ + * **info** \ + * **debug** \ + * **trace** \ + * **warn** + */ +export type Level = string; + +/** Known values of {@link IdentitySettingsLifeCycle} that the service accepts. */ +export enum KnownIdentitySettingsLifeCycle { + /** Init */ + Init = "Init", + /** Main */ + Main = "Main", + /** None */ + None = "None", + /** All */ + All = "All", +} + +/** + * Defines values for IdentitySettingsLifeCycle. \ + * {@link KnownIdentitySettingsLifeCycle} can be used interchangeably with IdentitySettingsLifeCycle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Init** \ + * **Main** \ + * **None** \ + * **All** + */ +export type IdentitySettingsLifeCycle = string; + +/** Known values of {@link ImageType} that the service accepts. */ +export enum KnownImageType { + /** CloudBuild */ + CloudBuild = "CloudBuild", + /** ContainerImage */ + ContainerImage = "ContainerImage", +} + +/** + * Defines values for ImageType. \ + * {@link KnownImageType} can be used interchangeably with ImageType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CloudBuild** \ + * **ContainerImage** + */ +export type ImageType = string; + /** Known values of {@link Scheme} that the service accepts. */ export enum KnownScheme { /** Http */ @@ -2927,6 +4964,10 @@ export enum KnownStorageType { EmptyDir = "EmptyDir", /** Secret */ Secret = "Secret", + /** NfsAzureFile */ + NfsAzureFile = "NfsAzureFile", + /** Smb */ + Smb = "Smb", } /** @@ -2936,10 +4977,96 @@ export enum KnownStorageType { * ### Known values supported by the service * **AzureFile** \ * **EmptyDir** \ - * **Secret** + * **Secret** \ + * **NfsAzureFile** \ + * **Smb** */ export type StorageType = string; +/** Known values of {@link PatchApplyStatus} that the service accepts. */ +export enum KnownPatchApplyStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** RebaseInProgress */ + RebaseInProgress = "RebaseInProgress", + /** CreatingRevision */ + CreatingRevision = "CreatingRevision", + /** Succeeded */ + Succeeded = "Succeeded", + /** Canceled */ + Canceled = "Canceled", + /** RebaseFailed */ + RebaseFailed = "RebaseFailed", + /** RevisionCreationFailed */ + RevisionCreationFailed = "RevisionCreationFailed", + /** ImagePushPullFailed */ + ImagePushPullFailed = "ImagePushPullFailed", + /** ManuallySkipped */ + ManuallySkipped = "ManuallySkipped", +} + +/** + * Defines values for PatchApplyStatus. \ + * {@link KnownPatchApplyStatus} can be used interchangeably with PatchApplyStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **RebaseInProgress** \ + * **CreatingRevision** \ + * **Succeeded** \ + * **Canceled** \ + * **RebaseFailed** \ + * **RevisionCreationFailed** \ + * **ImagePushPullFailed** \ + * **ManuallySkipped** + */ +export type PatchApplyStatus = string; + +/** Known values of {@link DetectionStatus} that the service accepts. */ +export enum KnownDetectionStatus { + /** Succeeded */ + Succeeded = "Succeeded", + /** RegistryLoginFailed */ + RegistryLoginFailed = "RegistryLoginFailed", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for DetectionStatus. \ + * {@link KnownDetectionStatus} can be used interchangeably with DetectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **RegistryLoginFailed** \ + * **Failed** + */ +export type DetectionStatus = string; + +/** Known values of {@link PatchType} that the service accepts. */ +export enum KnownPatchType { + /** FrameworkSecurity */ + FrameworkSecurity = "FrameworkSecurity", + /** OSSecurity */ + OSSecurity = "OSSecurity", + /** FrameworkAndOSSecurity */ + FrameworkAndOSSecurity = "FrameworkAndOSSecurity", + /** Other */ + Other = "Other", +} + +/** + * Defines values for PatchType. \ + * {@link KnownPatchType} can be used interchangeably with PatchType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **FrameworkSecurity** \ + * **OSSecurity** \ + * **FrameworkAndOSSecurity** \ + * **Other** + */ +export type PatchType = string; + /** Known values of {@link RevisionHealthState} that the service accepts. */ export enum KnownRevisionHealthState { /** Healthy */ @@ -3100,12 +5227,169 @@ export enum KnownEnvironmentProvisioningState { * **UpgradeRequested** \ * **UpgradeFailed** */ -export type EnvironmentProvisioningState = string; +export type EnvironmentProvisioningState = string; + +/** Known values of {@link PrivateEndpointServiceConnectionStatus} that the service accepts. */ +export enum KnownPrivateEndpointServiceConnectionStatus { + /** Pending */ + Pending = "Pending", + /** Approved */ + Approved = "Approved", + /** Rejected */ + Rejected = "Rejected", + /** Disconnected */ + Disconnected = "Disconnected", +} + +/** + * Defines values for PrivateEndpointServiceConnectionStatus. \ + * {@link KnownPrivateEndpointServiceConnectionStatus} can be used interchangeably with PrivateEndpointServiceConnectionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **Approved** \ + * **Rejected** \ + * **Disconnected** + */ +export type PrivateEndpointServiceConnectionStatus = string; + +/** Known values of {@link PrivateEndpointConnectionProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointConnectionProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Waiting */ + Waiting = "Waiting", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Pending */ + Pending = "Pending", +} + +/** + * Defines values for PrivateEndpointConnectionProvisioningState. \ + * {@link KnownPrivateEndpointConnectionProvisioningState} can be used interchangeably with PrivateEndpointConnectionProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Waiting** \ + * **Updating** \ + * **Deleting** \ + * **Pending** + */ +export type PrivateEndpointConnectionProvisioningState = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + +/** Known values of {@link JobProvisioningState} that the service accepts. */ +export enum KnownJobProvisioningState { + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Defines values for JobProvisioningState. \ + * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Deleting** + */ +export type JobProvisioningState = string; + +/** Known values of {@link JobRunningState} that the service accepts. */ +export enum KnownJobRunningState { + /** Ready */ + Ready = "Ready", + /** Progressing */ + Progressing = "Progressing", + /** Suspended */ + Suspended = "Suspended", +} + +/** + * Defines values for JobRunningState. \ + * {@link KnownJobRunningState} can be used interchangeably with JobRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ready** \ + * **Progressing** \ + * **Suspended** + */ +export type JobRunningState = string; + +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + /** Schedule */ + Schedule = "Schedule", + /** Event */ + Event = "Event", + /** Manual */ + Manual = "Manual", +} + +/** + * Defines values for TriggerType. \ + * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Schedule** \ + * **Event** \ + * **Manual** + */ +export type TriggerType = string; + +/** Known values of {@link DotNetComponentType} that the service accepts. */ +export enum KnownDotNetComponentType { + /** AspireDashboard */ + AspireDashboard = "AspireDashboard", +} + +/** + * Defines values for DotNetComponentType. \ + * {@link KnownDotNetComponentType} can be used interchangeably with DotNetComponentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AspireDashboard** + */ +export type DotNetComponentType = string; -/** Known values of {@link JobProvisioningState} that the service accepts. */ -export enum KnownJobProvisioningState { - /** InProgress */ - InProgress = "InProgress", +/** Known values of {@link DotNetComponentProvisioningState} that the service accepts. */ +export enum KnownDotNetComponentProvisioningState { /** Succeeded */ Succeeded = "Succeeded", /** Failed */ @@ -3114,41 +5398,76 @@ export enum KnownJobProvisioningState { Canceled = "Canceled", /** Deleting */ Deleting = "Deleting", + /** InProgress */ + InProgress = "InProgress", } /** - * Defines values for JobProvisioningState. \ - * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, + * Defines values for DotNetComponentProvisioningState. \ + * {@link KnownDotNetComponentProvisioningState} can be used interchangeably with DotNetComponentProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **InProgress** \ * **Succeeded** \ * **Failed** \ * **Canceled** \ - * **Deleting** + * **Deleting** \ + * **InProgress** */ -export type JobProvisioningState = string; +export type DotNetComponentProvisioningState = string; + +/** Known values of {@link JavaComponentType} that the service accepts. */ +export enum KnownJavaComponentType { + /** SpringBootAdmin */ + SpringBootAdmin = "SpringBootAdmin", + /** SpringCloudEureka */ + SpringCloudEureka = "SpringCloudEureka", + /** SpringCloudConfig */ + SpringCloudConfig = "SpringCloudConfig", + /** SpringCloudGateway */ + SpringCloudGateway = "SpringCloudGateway", + /** Nacos */ + Nacos = "Nacos", +} -/** Known values of {@link TriggerType} that the service accepts. */ -export enum KnownTriggerType { - /** Schedule */ - Schedule = "Schedule", - /** Event */ - Event = "Event", - /** Manual */ - Manual = "Manual", +/** + * Defines values for JavaComponentType. \ + * {@link KnownJavaComponentType} can be used interchangeably with JavaComponentType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SpringBootAdmin** \ + * **SpringCloudEureka** \ + * **SpringCloudConfig** \ + * **SpringCloudGateway** \ + * **Nacos** + */ +export type JavaComponentType = string; + +/** Known values of {@link JavaComponentProvisioningState} that the service accepts. */ +export enum KnownJavaComponentProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting", + /** InProgress */ + InProgress = "InProgress", } /** - * Defines values for TriggerType. \ - * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * Defines values for JavaComponentProvisioningState. \ + * {@link KnownJavaComponentProvisioningState} can be used interchangeably with JavaComponentProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Schedule** \ - * **Event** \ - * **Manual** + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Deleting** \ + * **InProgress** */ -export type TriggerType = string; +export type JavaComponentProvisioningState = string; /** Known values of {@link JobExecutionRunningState} that the service accepts. */ export enum KnownJobExecutionRunningState { @@ -3183,6 +5502,54 @@ export enum KnownJobExecutionRunningState { */ export type JobExecutionRunningState = string; +/** Known values of {@link WorkflowState} that the service accepts. */ +export enum KnownWorkflowState { + /** NotSpecified */ + NotSpecified = "NotSpecified", + /** Completed */ + Completed = "Completed", + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled", + /** Deleted */ + Deleted = "Deleted", + /** Suspended */ + Suspended = "Suspended", +} + +/** + * Defines values for WorkflowState. \ + * {@link KnownWorkflowState} can be used interchangeably with WorkflowState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotSpecified** \ + * **Completed** \ + * **Enabled** \ + * **Disabled** \ + * **Deleted** \ + * **Suspended** + */ +export type WorkflowState = string; + +/** Known values of {@link LogicAppsProxyMethod} that the service accepts. */ +export enum KnownLogicAppsProxyMethod { + /** GET */ + GET = "GET", + /** Post */ + Post = "POST", +} + +/** + * Defines values for LogicAppsProxyMethod. \ + * {@link KnownLogicAppsProxyMethod} can be used interchangeably with LogicAppsProxyMethod, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GET** \ + * **POST** + */ +export type LogicAppsProxyMethod = string; + /** Known values of {@link ManagedCertificateDomainControlValidation} that the service accepts. */ export enum KnownManagedCertificateDomainControlValidation { /** Cname */ @@ -3204,6 +5571,135 @@ export enum KnownManagedCertificateDomainControlValidation { */ export type ManagedCertificateDomainControlValidation = string; +/** Known values of {@link HttpRouteProvisioningState} that the service accepts. */ +export enum KnownHttpRouteProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Waiting */ + Waiting = "Waiting", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Pending */ + Pending = "Pending", +} + +/** + * Defines values for HttpRouteProvisioningState. \ + * {@link KnownHttpRouteProvisioningState} can be used interchangeably with HttpRouteProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Waiting** \ + * **Updating** \ + * **Deleting** \ + * **Pending** + */ +export type HttpRouteProvisioningState = string; + +/** Known values of {@link ContainerType} that the service accepts. */ +export enum KnownContainerType { + /** CustomContainer */ + CustomContainer = "CustomContainer", + /** PythonLTS */ + PythonLTS = "PythonLTS", +} + +/** + * Defines values for ContainerType. \ + * {@link KnownContainerType} can be used interchangeably with ContainerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CustomContainer** \ + * **PythonLTS** + */ +export type ContainerType = string; + +/** Known values of {@link PoolManagementType} that the service accepts. */ +export enum KnownPoolManagementType { + /** Manual */ + Manual = "Manual", + /** Dynamic */ + Dynamic = "Dynamic", +} + +/** + * Defines values for PoolManagementType. \ + * {@link KnownPoolManagementType} can be used interchangeably with PoolManagementType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual** \ + * **Dynamic** + */ +export type PoolManagementType = string; + +/** Known values of {@link ExecutionType} that the service accepts. */ +export enum KnownExecutionType { + /** Timed */ + Timed = "Timed", +} + +/** + * Defines values for ExecutionType. \ + * {@link KnownExecutionType} can be used interchangeably with ExecutionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Timed** + */ +export type ExecutionType = string; + +/** Known values of {@link SessionNetworkStatus} that the service accepts. */ +export enum KnownSessionNetworkStatus { + /** EgressEnabled */ + EgressEnabled = "EgressEnabled", + /** EgressDisabled */ + EgressDisabled = "EgressDisabled", +} + +/** + * Defines values for SessionNetworkStatus. \ + * {@link KnownSessionNetworkStatus} can be used interchangeably with SessionNetworkStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **EgressEnabled** \ + * **EgressDisabled** + */ +export type SessionNetworkStatus = string; + +/** Known values of {@link SessionPoolProvisioningState} that the service accepts. */ +export enum KnownSessionPoolProvisioningState { + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Deleting */ + Deleting = "Deleting", +} + +/** + * Defines values for SessionPoolProvisioningState. \ + * {@link KnownSessionPoolProvisioningState} can be used interchangeably with SessionPoolProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Deleting** + */ +export type SessionPoolProvisioningState = string; + /** Known values of {@link SourceControlOperationState} that the service accepts. */ export enum KnownSourceControlOperationState { /** InProgress */ @@ -3241,6 +5737,62 @@ export type CookieExpirationConvention = export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; /** Defines values for DnsVerificationTestResult. */ export type DnsVerificationTestResult = "Passed" | "Failed" | "Skipped"; +/** Defines values for WorkflowHealthState. */ +export type WorkflowHealthState = + | "NotSpecified" + | "Healthy" + | "Unhealthy" + | "Unknown"; +/** Defines values for WeekDay. */ +export type WeekDay = + | "Monday" + | "Tuesday" + | "Wednesday" + | "Thursday" + | "Friday" + | "Saturday" + | "Sunday" + | "Everyday" + | "Weekend"; + +/** Optional parameters. */ +export interface AppResiliencyCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type AppResiliencyCreateOrUpdateResponse = AppResiliency; + +/** Optional parameters. */ +export interface AppResiliencyUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type AppResiliencyUpdateResponse = AppResiliency; + +/** Optional parameters. */ +export interface AppResiliencyDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface AppResiliencyGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type AppResiliencyGetResponse = AppResiliency; + +/** Optional parameters. */ +export interface AppResiliencyListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type AppResiliencyListResponse = AppResiliencyCollection; + +/** Optional parameters. */ +export interface AppResiliencyListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type AppResiliencyListNextResponse = AppResiliencyCollection; /** Optional parameters. */ export interface ContainerAppsAuthConfigsListByContainerAppOptionalParams @@ -3285,19 +5837,141 @@ export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; /** Optional parameters. */ -export interface AvailableWorkloadProfilesGetNextOptionalParams - extends coreClient.OperationOptions {} +export interface AvailableWorkloadProfilesGetNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getNext operation. */ +export type AvailableWorkloadProfilesGetNextResponse = + AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +export interface BillingMetersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BillingMetersGetResponse = BillingMeterCollection; + +/** Optional parameters. */ +export interface BuildersListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type BuildersListBySubscriptionResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type BuildersListByResourceGroupResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildersGetResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type BuildersCreateOrUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type BuildersUpdateResponse = BuilderResource; + +/** Optional parameters. */ +export interface BuildersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type BuildersDeleteResponse = BuildersDeleteHeaders; + +/** Optional parameters. */ +export interface BuildersListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type BuildersListBySubscriptionNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildersListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type BuildersListByResourceGroupNextResponse = BuilderCollection; + +/** Optional parameters. */ +export interface BuildsByBuilderResourceListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type BuildsByBuilderResourceListResponse = BuildCollection; + +/** Optional parameters. */ +export interface BuildsByBuilderResourceListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type BuildsByBuilderResourceListNextResponse = BuildCollection; + +/** Optional parameters. */ +export interface BuildsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BuildsGetResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type BuildsCreateOrUpdateResponse = BuildResource; + +/** Optional parameters. */ +export interface BuildsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the getNext operation. */ -export type AvailableWorkloadProfilesGetNextResponse = - AvailableWorkloadProfilesCollection; +/** Contains response data for the delete operation. */ +export type BuildsDeleteResponse = BuildsDeleteHeaders; /** Optional parameters. */ -export interface BillingMetersGetOptionalParams +export interface BuildAuthTokenListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type BillingMetersGetResponse = BillingMeterCollection; +/** Contains response data for the list operation. */ +export type BuildAuthTokenListResponse = BuildToken; /** Optional parameters. */ export interface ConnectedEnvironmentsListBySubscriptionOptionalParams @@ -3394,6 +6068,10 @@ export interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Certificate to be created or updated */ certificateEnvelope?: Certificate; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } /** Contains response data for the createOrUpdate operation. */ @@ -3402,11 +6080,25 @@ export type ConnectedEnvironmentsCertificatesCreateOrUpdateResponse = /** Optional parameters. */ export interface ConnectedEnvironmentsCertificatesDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ConnectedEnvironmentsCertificatesDeleteResponse = + ConnectedEnvironmentsCertificatesDeleteHeaders; /** Optional parameters. */ export interface ConnectedEnvironmentsCertificatesUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ export type ConnectedEnvironmentsCertificatesUpdateResponse = Certificate; @@ -3425,26 +6117,41 @@ export interface ConnectedEnvironmentsDaprComponentsListOptionalParams /** Contains response data for the list operation. */ export type ConnectedEnvironmentsDaprComponentsListResponse = - DaprComponentsCollection; + ConnectedEnvironmentDaprComponentsCollection; /** Optional parameters. */ export interface ConnectedEnvironmentsDaprComponentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ConnectedEnvironmentsDaprComponentsGetResponse = DaprComponent; +export type ConnectedEnvironmentsDaprComponentsGetResponse = + ConnectedEnvironmentDaprComponent; /** Optional parameters. */ export interface ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ export type ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse = - DaprComponent; + ConnectedEnvironmentDaprComponent; /** Optional parameters. */ export interface ConnectedEnvironmentsDaprComponentsDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ConnectedEnvironmentsDaprComponentsDeleteResponse = + ConnectedEnvironmentsDaprComponentsDeleteHeaders; /** Optional parameters. */ export interface ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams @@ -3460,7 +6167,7 @@ export interface ConnectedEnvironmentsDaprComponentsListNextOptionalParams /** Contains response data for the listNext operation. */ export type ConnectedEnvironmentsDaprComponentsListNextResponse = - DaprComponentsCollection; + ConnectedEnvironmentDaprComponentsCollection; /** Optional parameters. */ export interface ConnectedEnvironmentsStoragesListOptionalParams @@ -3480,7 +6187,12 @@ export type ConnectedEnvironmentsStoragesGetResponse = /** Optional parameters. */ export interface ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = @@ -3488,7 +6200,16 @@ export type ConnectedEnvironmentsStoragesCreateOrUpdateResponse = /** Optional parameters. */ export interface ConnectedEnvironmentsStoragesDeleteOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ConnectedEnvironmentsStoragesDeleteResponse = + ConnectedEnvironmentsStoragesDeleteHeaders; /** Optional parameters. */ export interface ContainerAppsListBySubscriptionOptionalParams @@ -3609,6 +6330,131 @@ export interface ContainerAppsListByResourceGroupNextOptionalParams export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; +/** Optional parameters. */ +export interface ContainerAppsBuildsByContainerAppListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ContainerAppsBuildsByContainerAppListResponse = + ContainerAppsBuildCollection; + +/** Optional parameters. */ +export interface ContainerAppsBuildsByContainerAppListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ContainerAppsBuildsByContainerAppListNextResponse = + ContainerAppsBuildCollection; + +/** Optional parameters. */ +export interface ContainerAppsBuildsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsBuildsGetResponse = ContainerAppsBuildResource; + +/** Optional parameters. */ +export interface ContainerAppsBuildsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ContainerAppsBuildsDeleteResponse = + ContainerAppsBuildsDeleteHeaders; + +/** Optional parameters. */ +export interface ContainerAppsPatchesListByContainerAppOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq 'Succeeded' */ + filter?: string; +} + +/** Contains response data for the listByContainerApp operation. */ +export type ContainerAppsPatchesListByContainerAppResponse = PatchCollection; + +/** Optional parameters. */ +export interface ContainerAppsPatchesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsPatchesGetResponse = ContainerAppsPatchResource; + +/** Optional parameters. */ +export interface ContainerAppsPatchesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ContainerAppsPatchesDeleteResponse = + ContainerAppsPatchesDeleteHeaders; + +/** Optional parameters. */ +export interface ContainerAppsPatchesSkipConfigureOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the skipConfigure operation. */ +export type ContainerAppsPatchesSkipConfigureResponse = + ContainerAppsPatchesSkipConfigureHeaders; + +/** Optional parameters. */ +export interface ContainerAppsPatchesApplyOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the apply operation. */ +export type ContainerAppsPatchesApplyResponse = ContainerAppsPatchResource; + +/** Optional parameters. */ +export interface ContainerAppsPatchesListByContainerAppNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByContainerAppNext operation. */ +export type ContainerAppsPatchesListByContainerAppNextResponse = + PatchCollection; + +/** Optional parameters. */ +export interface ContainerAppsLabelHistoryListLabelHistoryOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the listLabelHistory operation. */ +export type ContainerAppsLabelHistoryListLabelHistoryResponse = + LabelHistoryCollection; + +/** Optional parameters. */ +export interface ContainerAppsLabelHistoryGetLabelHistoryOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getLabelHistory operation. */ +export type ContainerAppsLabelHistoryGetLabelHistoryResponse = LabelHistory; + +/** Optional parameters. */ +export interface ContainerAppsLabelHistoryListLabelHistoryNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listLabelHistoryNext operation. */ +export type ContainerAppsLabelHistoryListLabelHistoryNextResponse = + LabelHistoryCollection; + /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsOptionalParams extends coreClient.OperationOptions { @@ -3851,6 +6697,28 @@ export interface JobsListSecretsOptionalParams /** Contains response data for the listSecrets operation. */ export type JobsListSecretsResponse = JobSecretsCollection; +/** Optional parameters. */ +export interface JobsResumeOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the resume operation. */ +export type JobsResumeResponse = Job; + +/** Optional parameters. */ +export interface JobsSuspendOptionalParams extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the suspend operation. */ +export type JobsSuspendResponse = Job; + /** Optional parameters. */ export interface JobsListDetectorsNextOptionalParams extends coreClient.OperationOptions {} @@ -3866,25 +6734,149 @@ export interface JobsListBySubscriptionNextOptionalParams export type JobsListBySubscriptionNextResponse = JobsCollection; /** Optional parameters. */ -export interface JobsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} +export interface JobsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface DotNetComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DotNetComponentsListResponse = DotNetComponentsCollection; + +/** Optional parameters. */ +export interface DotNetComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DotNetComponentsGetResponse = DotNetComponent; + +/** Optional parameters. */ +export interface DotNetComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DotNetComponentsCreateOrUpdateResponse = DotNetComponent; + +/** Optional parameters. */ +export interface DotNetComponentsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DotNetComponentsUpdateResponse = DotNetComponent; + +/** Optional parameters. */ +export interface DotNetComponentsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type DotNetComponentsDeleteResponse = DotNetComponentsDeleteHeaders; + +/** Optional parameters. */ +export interface DotNetComponentsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DotNetComponentsListNextResponse = DotNetComponentsCollection; + +/** Optional parameters. */ +export interface FunctionsExtensionInvokeFunctionsHostOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the invokeFunctionsHost operation. */ +export type FunctionsExtensionInvokeFunctionsHostResponse = { + /** The parsed response body. */ + body: string; +}; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = AvailableOperations; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = AvailableOperations; + +/** Optional parameters. */ +export interface JavaComponentsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type JavaComponentsListResponse = JavaComponentsCollection; + +/** Optional parameters. */ +export interface JavaComponentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JavaComponentsGetResponse = JavaComponent; + +/** Optional parameters. */ +export interface JavaComponentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type JavaComponentsCreateOrUpdateResponse = JavaComponent; + +/** Optional parameters. */ +export interface JavaComponentsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByResourceGroupNext operation. */ -export type JobsListByResourceGroupNextResponse = JobsCollection; +/** Contains response data for the update operation. */ +export type JavaComponentsUpdateResponse = JavaComponent; /** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} +export interface JavaComponentsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the list operation. */ -export type OperationsListResponse = AvailableOperations; +/** Contains response data for the delete operation. */ +export type JavaComponentsDeleteResponse = JavaComponentsDeleteHeaders; /** Optional parameters. */ -export interface OperationsListNextOptionalParams +export interface JavaComponentsListNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = AvailableOperations; +export type JavaComponentsListNextResponse = JavaComponentsCollection; /** Optional parameters. */ export interface JobsExecutionsListOptionalParams @@ -3920,6 +6912,66 @@ export type GetCustomDomainVerificationIdResponse = { body: string; }; +/** Optional parameters. */ +export interface LogicAppsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type LogicAppsGetResponse = LogicApp; + +/** Optional parameters. */ +export interface LogicAppsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type LogicAppsCreateOrUpdateResponse = LogicApp; + +/** Optional parameters. */ +export interface LogicAppsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface LogicAppsListWorkflowsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listWorkflows operation. */ +export type LogicAppsListWorkflowsResponse = WorkflowEnvelopeCollection; + +/** Optional parameters. */ +export interface LogicAppsGetWorkflowOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getWorkflow operation. */ +export type LogicAppsGetWorkflowResponse = WorkflowEnvelope; + +/** Optional parameters. */ +export interface LogicAppsDeployWorkflowArtifactsOptionalParams + extends coreClient.OperationOptions { + /** Application settings and files of the workflow. */ + workflowArtifacts?: WorkflowArtifacts; +} + +/** Optional parameters. */ +export interface LogicAppsListWorkflowsConnectionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listWorkflowsConnections operation. */ +export type LogicAppsListWorkflowsConnectionsResponse = WorkflowEnvelope; + +/** Optional parameters. */ +export interface LogicAppsInvokeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the invoke operation. */ +export type LogicAppsInvokeResponse = Record; + +/** Optional parameters. */ +export interface LogicAppsListWorkflowsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listWorkflowsNext operation. */ +export type LogicAppsListWorkflowsNextResponse = WorkflowEnvelopeCollection; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} @@ -4111,6 +7163,108 @@ export interface NamespacesCheckNameAvailabilityOptionalParams export type NamespacesCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ManagedEnvironmentPrivateEndpointConnectionsListResponse = + PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedEnvironmentPrivateEndpointConnectionsGetResponse = + PrivateEndpointConnection; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse = + PrivateEndpointConnection; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse = + ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateEndpointConnectionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ManagedEnvironmentPrivateEndpointConnectionsListNextResponse = + PrivateEndpointConnectionListResult; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateLinkResourcesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ManagedEnvironmentPrivateLinkResourcesListResponse = + PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface ManagedEnvironmentPrivateLinkResourcesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ManagedEnvironmentPrivateLinkResourcesListNextResponse = + PrivateLinkResourceListResult; + +/** Optional parameters. */ +export interface DaprComponentResiliencyPoliciesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DaprComponentResiliencyPoliciesListResponse = + DaprComponentResiliencyPoliciesCollection; + +/** Optional parameters. */ +export interface DaprComponentResiliencyPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DaprComponentResiliencyPoliciesGetResponse = + DaprComponentResiliencyPolicy; + +/** Optional parameters. */ +export interface DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DaprComponentResiliencyPoliciesCreateOrUpdateResponse = + DaprComponentResiliencyPolicy; + +/** Optional parameters. */ +export interface DaprComponentResiliencyPoliciesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DaprComponentResiliencyPoliciesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DaprComponentResiliencyPoliciesListNextResponse = + DaprComponentResiliencyPoliciesCollection; + /** Optional parameters. */ export interface DaprComponentsListOptionalParams extends coreClient.OperationOptions {} @@ -4150,6 +7304,116 @@ export interface DaprComponentsListNextOptionalParams /** Contains response data for the listNext operation. */ export type DaprComponentsListNextResponse = DaprComponentsCollection; +/** Optional parameters. */ +export interface DaprSubscriptionsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DaprSubscriptionsListResponse = DaprSubscriptionsCollection; + +/** Optional parameters. */ +export interface DaprSubscriptionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DaprSubscriptionsGetResponse = DaprSubscription; + +/** Optional parameters. */ +export interface DaprSubscriptionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type DaprSubscriptionsCreateOrUpdateResponse = DaprSubscription; + +/** Optional parameters. */ +export interface DaprSubscriptionsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DaprSubscriptionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type DaprSubscriptionsListNextResponse = DaprSubscriptionsCollection; + +/** Optional parameters. */ +export interface HttpRouteConfigGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type HttpRouteConfigGetResponse = HttpRouteConfig; + +/** Optional parameters. */ +export interface HttpRouteConfigCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Http Route config to be created or updated */ + httpRouteConfigEnvelope?: HttpRouteConfig; +} + +/** Contains response data for the createOrUpdate operation. */ +export type HttpRouteConfigCreateOrUpdateResponse = HttpRouteConfig; + +/** Optional parameters. */ +export interface HttpRouteConfigUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type HttpRouteConfigUpdateResponse = HttpRouteConfig; + +/** Optional parameters. */ +export interface HttpRouteConfigDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface HttpRouteConfigListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type HttpRouteConfigListResponse = HttpRouteConfigCollection; + +/** Optional parameters. */ +export interface HttpRouteConfigListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type HttpRouteConfigListNextResponse = HttpRouteConfigCollection; + +/** Optional parameters. */ +export interface MaintenanceConfigurationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type MaintenanceConfigurationsListResponse = + MaintenanceConfigurationCollection; + +/** Optional parameters. */ +export interface MaintenanceConfigurationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type MaintenanceConfigurationsCreateOrUpdateResponse = + MaintenanceConfigurationResource; + +/** Optional parameters. */ +export interface MaintenanceConfigurationsDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface MaintenanceConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type MaintenanceConfigurationsGetResponse = + MaintenanceConfigurationResource; + +/** Optional parameters. */ +export interface MaintenanceConfigurationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type MaintenanceConfigurationsListNextResponse = + MaintenanceConfigurationCollection; + /** Optional parameters. */ export interface ManagedEnvironmentsStoragesListOptionalParams extends coreClient.OperationOptions {} @@ -4177,6 +7441,82 @@ export type ManagedEnvironmentsStoragesCreateOrUpdateResponse = export interface ManagedEnvironmentsStoragesDeleteOptionalParams extends coreClient.OperationOptions {} +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type ContainerAppsSessionPoolsListBySubscriptionResponse = + SessionPoolCollection; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ContainerAppsSessionPoolsListByResourceGroupResponse = + SessionPoolCollection; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ContainerAppsSessionPoolsGetResponse = SessionPool; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ContainerAppsSessionPoolsCreateOrUpdateResponse = SessionPool; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ContainerAppsSessionPoolsUpdateResponse = SessionPool; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the delete operation. */ +export type ContainerAppsSessionPoolsDeleteResponse = + ContainerAppsSessionPoolsDeleteHeaders; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type ContainerAppsSessionPoolsListBySubscriptionNextResponse = + SessionPoolCollection; + +/** Optional parameters. */ +export interface ContainerAppsSessionPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ContainerAppsSessionPoolsListByResourceGroupNextResponse = + SessionPoolCollection; + /** Optional parameters. */ export interface ContainerAppsSourceControlsListByContainerAppOptionalParams extends coreClient.OperationOptions {} @@ -4195,6 +7535,8 @@ export type ContainerAppsSourceControlsGetResponse = SourceControl; /** Optional parameters. */ export interface ContainerAppsSourceControlsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Github personal access token used for SourceControl. */ + xMsGithubAuxiliary?: string; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -4207,6 +7549,12 @@ export type ContainerAppsSourceControlsCreateOrUpdateResponse = SourceControl; /** Optional parameters. */ export interface ContainerAppsSourceControlsDeleteOptionalParams extends coreClient.OperationOptions { + /** Github personal access token used for SourceControl. */ + xMsGithubAuxiliary?: string; + /** Ignore Workflow Deletion Failure. */ + ignoreWorkflowDeletionFailure?: boolean; + /** Delete workflow. */ + deleteWorkflow?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index 6251ab5c6ea7..a8c08244e4b8 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -8,81 +8,63 @@ import * as coreClient from "@azure/core-client"; -export const AuthConfigCollection: coreClient.CompositeMapper = { +export const TimeoutPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfigCollection", + className: "TimeoutPolicy", modelProperties: { - value: { - serializedName: "value", - required: true, + responseTimeoutInSeconds: { + serializedName: "responseTimeoutInSeconds", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AuthConfig", - }, - }, + name: "Number", }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + connectionTimeoutInSeconds: { + serializedName: "connectionTimeoutInSeconds", type: { - name: "String", + name: "Number", }, }, }, }, }; -export const AuthPlatform: coreClient.CompositeMapper = { +export const HttpRetryPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthPlatform", + className: "HttpRetryPolicy", modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - runtimeVersion: { - serializedName: "runtimeVersion", + maxRetries: { + serializedName: "maxRetries", type: { - name: "String", + name: "Number", }, }, - }, - }, -}; - -export const GlobalValidation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GlobalValidation", - modelProperties: { - unauthenticatedClientAction: { - serializedName: "unauthenticatedClientAction", + headers: { + serializedName: "matches.headers", type: { - name: "Enum", - allowedValues: [ - "RedirectToLoginPage", - "AllowAnonymous", - "Return401", - "Return403", - ], + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HeaderMatch", + }, + }, }, }, - redirectToProvider: { - serializedName: "redirectToProvider", + httpStatusCodes: { + serializedName: "matches.httpStatusCodes", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Number", + }, + }, }, }, - excludedPaths: { - serializedName: "excludedPaths", + errors: { + serializedName: "matches.errors", type: { name: "Sequence", element: { @@ -92,303 +74,421 @@ export const GlobalValidation: coreClient.CompositeMapper = { }, }, }, + initialDelayInMilliseconds: { + serializedName: "retryBackOff.initialDelayInMilliseconds", + type: { + name: "Number", + }, + }, + maxIntervalInMilliseconds: { + serializedName: "retryBackOff.maxIntervalInMilliseconds", + type: { + name: "Number", + }, + }, }, }, }; -export const IdentityProviders: coreClient.CompositeMapper = { +export const HeaderMatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IdentityProviders", + className: "HeaderMatch", modelProperties: { - azureActiveDirectory: { - serializedName: "azureActiveDirectory", + header: { + serializedName: "header", type: { - name: "Composite", - className: "AzureActiveDirectory", + name: "String", }, }, - facebook: { - serializedName: "facebook", + exactMatch: { + serializedName: "match.exactMatch", type: { - name: "Composite", - className: "Facebook", + name: "String", }, }, - gitHub: { - serializedName: "gitHub", + prefixMatch: { + serializedName: "match.prefixMatch", type: { - name: "Composite", - className: "GitHub", + name: "String", }, }, - google: { - serializedName: "google", + suffixMatch: { + serializedName: "match.suffixMatch", type: { - name: "Composite", - className: "Google", + name: "String", }, }, - twitter: { - serializedName: "twitter", + regexMatch: { + serializedName: "match.regexMatch", type: { - name: "Composite", - className: "Twitter", + name: "String", }, }, - apple: { - serializedName: "apple", + }, + }, +}; + +export const TcpRetryPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TcpRetryPolicy", + modelProperties: { + maxConnectAttempts: { + serializedName: "maxConnectAttempts", type: { - name: "Composite", - className: "Apple", + name: "Number", }, }, - azureStaticWebApps: { - serializedName: "azureStaticWebApps", + }, + }, +}; + +export const CircuitBreakerPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CircuitBreakerPolicy", + modelProperties: { + consecutiveErrors: { + serializedName: "consecutiveErrors", type: { - name: "Composite", - className: "AzureStaticWebApps", + name: "Number", }, }, - customOpenIdConnectProviders: { - serializedName: "customOpenIdConnectProviders", + intervalInSeconds: { + serializedName: "intervalInSeconds", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "CustomOpenIdConnectProvider", - }, - }, + name: "Number", + }, + }, + maxEjectionPercent: { + serializedName: "maxEjectionPercent", + type: { + name: "Number", }, }, }, }, }; -export const AzureActiveDirectory: coreClient.CompositeMapper = { +export const HttpConnectionPool: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectory", + className: "HttpConnectionPool", modelProperties: { - enabled: { - serializedName: "enabled", + http1MaxPendingRequests: { + serializedName: "http1MaxPendingRequests", type: { - name: "Boolean", + name: "Number", }, }, - registration: { - serializedName: "registration", + http2MaxRequests: { + serializedName: "http2MaxRequests", type: { - name: "Composite", - className: "AzureActiveDirectoryRegistration", + name: "Number", }, }, - login: { - serializedName: "login", + }, + }, +}; + +export const TcpConnectionPool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TcpConnectionPool", + modelProperties: { + maxConnections: { + serializedName: "maxConnections", type: { - name: "Composite", - className: "AzureActiveDirectoryLogin", + name: "Number", }, }, - validation: { - serializedName: "validation", + }, + }, +}; + +export const Resource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { - name: "Composite", - className: "AzureActiveDirectoryValidation", + name: "String", }, }, - isAutoProvisioned: { - serializedName: "isAutoProvisioned", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Boolean", + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", }, }, }, }, }; -export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryRegistration", + className: "SystemData", modelProperties: { - openIdIssuer: { - serializedName: "openIdIssuer", + createdBy: { + serializedName: "createdBy", type: { name: "String", }, }, - clientId: { - serializedName: "clientId", + createdByType: { + serializedName: "createdByType", type: { name: "String", }, }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + createdAt: { + serializedName: "createdAt", type: { - name: "String", + name: "DateTime", }, }, - clientSecretCertificateThumbprint: { - serializedName: "clientSecretCertificateThumbprint", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String", }, }, - clientSecretCertificateSubjectAlternativeName: { - serializedName: "clientSecretCertificateSubjectAlternativeName", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String", }, }, - clientSecretCertificateIssuer: { - serializedName: "clientSecretCertificateIssuer", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "String", + name: "DateTime", }, }, }, }, }; -export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { +export const DefaultErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryLogin", + className: "DefaultErrorResponse", modelProperties: { - loginParameters: { - serializedName: "loginParameters", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - disableWWWAuthenticate: { - serializedName: "disableWWWAuthenticate", + error: { + serializedName: "error", type: { - name: "Boolean", + name: "Composite", + className: "DefaultErrorResponseError", }, }, }, }, }; -export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { +export const DefaultErrorResponseError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureActiveDirectoryValidation", + className: "DefaultErrorResponseError", modelProperties: { - jwtClaimChecks: { - serializedName: "jwtClaimChecks", + code: { + serializedName: "code", + readOnly: true, type: { - name: "Composite", - className: "JwtClaimChecks", + name: "String", }, }, - allowedAudiences: { - serializedName: "allowedAudiences", + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "DefaultErrorResponseErrorDetailsItem", }, }, }, }, - defaultAuthorizationPolicy: { - serializedName: "defaultAuthorizationPolicy", + innererror: { + serializedName: "innererror", + readOnly: true, type: { - name: "Composite", - className: "DefaultAuthorizationPolicy", + name: "String", }, }, }, }, }; -export const JwtClaimChecks: coreClient.CompositeMapper = { +export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DefaultErrorResponseErrorDetailsItem", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const AppResiliencyCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JwtClaimChecks", + className: "AppResiliencyCollection", modelProperties: { - allowedGroups: { - serializedName: "allowedGroups", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "AppResiliency", }, }, }, }, - allowedClientApplications: { - serializedName: "allowedClientApplications", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AuthConfigCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthConfigCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "AuthConfig", }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { +export const AuthPlatform: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DefaultAuthorizationPolicy", + className: "AuthPlatform", modelProperties: { - allowedPrincipals: { - serializedName: "allowedPrincipals", + enabled: { + serializedName: "enabled", type: { - name: "Composite", - className: "AllowedPrincipals", + name: "Boolean", }, }, - allowedApplications: { - serializedName: "allowedApplications", + runtimeVersion: { + serializedName: "runtimeVersion", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, }, }, }; -export const AllowedPrincipals: coreClient.CompositeMapper = { +export const GlobalValidation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedPrincipals", + className: "GlobalValidation", modelProperties: { - groups: { - serializedName: "groups", + unauthenticatedClientAction: { + serializedName: "unauthenticatedClientAction", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Enum", + allowedValues: [ + "RedirectToLoginPage", + "AllowAnonymous", + "Return401", + "Return403", + ], }, }, - identities: { - serializedName: "identities", + redirectToProvider: { + serializedName: "redirectToProvider", + type: { + name: "String", + }, + }, + excludedPaths: { + serializedName: "excludedPaths", type: { name: "Sequence", element: { @@ -402,74 +502,68 @@ export const AllowedPrincipals: coreClient.CompositeMapper = { }, }; -export const Facebook: coreClient.CompositeMapper = { +export const IdentityProviders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Facebook", + className: "IdentityProviders", modelProperties: { - enabled: { - serializedName: "enabled", + azureActiveDirectory: { + serializedName: "azureActiveDirectory", type: { - name: "Boolean", + name: "Composite", + className: "AzureActiveDirectory", }, }, - registration: { - serializedName: "registration", + facebook: { + serializedName: "facebook", type: { name: "Composite", - className: "AppRegistration", + className: "Facebook", }, }, - graphApiVersion: { - serializedName: "graphApiVersion", + gitHub: { + serializedName: "gitHub", type: { - name: "String", + name: "Composite", + className: "GitHub", }, }, - login: { - serializedName: "login", + google: { + serializedName: "google", type: { name: "Composite", - className: "LoginScopes", + className: "Google", }, }, - }, - }, -}; - -export const AppRegistration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AppRegistration", - modelProperties: { - appId: { - serializedName: "appId", + twitter: { + serializedName: "twitter", type: { - name: "String", + name: "Composite", + className: "Twitter", }, }, - appSecretSettingName: { - serializedName: "appSecretSettingName", + apple: { + serializedName: "apple", type: { - name: "String", + name: "Composite", + className: "Apple", }, }, - }, - }, -}; - -export const LoginScopes: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LoginScopes", - modelProperties: { - scopes: { - serializedName: "scopes", + azureStaticWebApps: { + serializedName: "azureStaticWebApps", type: { - name: "Sequence", - element: { + name: "Composite", + className: "AzureStaticWebApps", + }, + }, + customOpenIdConnectProviders: { + serializedName: "customOpenIdConnectProviders", + type: { + name: "Dictionary", + value: { type: { - name: "String", + name: "Composite", + className: "CustomOpenIdConnectProvider", }, }, }, @@ -478,10 +572,10 @@ export const LoginScopes: coreClient.CompositeMapper = { }, }; -export const GitHub: coreClient.CompositeMapper = { +export const AzureActiveDirectory: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GitHub", + className: "AzureActiveDirectory", modelProperties: { enabled: { serializedName: "enabled", @@ -493,25 +587,44 @@ export const GitHub: coreClient.CompositeMapper = { serializedName: "registration", type: { name: "Composite", - className: "ClientRegistration", + className: "AzureActiveDirectoryRegistration", }, }, login: { serializedName: "login", type: { name: "Composite", - className: "LoginScopes", + className: "AzureActiveDirectoryLogin", }, }, - }, - }, -}; - -export const ClientRegistration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClientRegistration", + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AzureActiveDirectoryValidation", + }, + }, + isAutoProvisioned: { + serializedName: "isAutoProvisioned", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const AzureActiveDirectoryRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryRegistration", modelProperties: { + openIdIssuer: { + serializedName: "openIdIssuer", + type: { + name: "String", + }, + }, clientId: { serializedName: "clientId", type: { @@ -524,53 +637,106 @@ export const ClientRegistration: coreClient.CompositeMapper = { name: "String", }, }, + clientSecretCertificateThumbprint: { + serializedName: "clientSecretCertificateThumbprint", + type: { + name: "String", + }, + }, + clientSecretCertificateSubjectAlternativeName: { + serializedName: "clientSecretCertificateSubjectAlternativeName", + type: { + name: "String", + }, + }, + clientSecretCertificateIssuer: { + serializedName: "clientSecretCertificateIssuer", + type: { + name: "String", + }, + }, }, }, }; -export const Google: coreClient.CompositeMapper = { +export const AzureActiveDirectoryLogin: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Google", + className: "AzureActiveDirectoryLogin", modelProperties: { - enabled: { - serializedName: "enabled", + loginParameters: { + serializedName: "loginParameters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + disableWWWAuthenticate: { + serializedName: "disableWWWAuthenticate", type: { name: "Boolean", }, }, - registration: { - serializedName: "registration", + }, + }, +}; + +export const AzureActiveDirectoryValidation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureActiveDirectoryValidation", + modelProperties: { + jwtClaimChecks: { + serializedName: "jwtClaimChecks", type: { name: "Composite", - className: "ClientRegistration", + className: "JwtClaimChecks", }, }, - login: { - serializedName: "login", + allowedAudiences: { + serializedName: "allowedAudiences", type: { - name: "Composite", - className: "LoginScopes", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - validation: { - serializedName: "validation", + defaultAuthorizationPolicy: { + serializedName: "defaultAuthorizationPolicy", type: { name: "Composite", - className: "AllowedAudiencesValidation", + className: "DefaultAuthorizationPolicy", }, }, }, }, }; -export const AllowedAudiencesValidation: coreClient.CompositeMapper = { +export const JwtClaimChecks: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AllowedAudiencesValidation", + className: "JwtClaimChecks", modelProperties: { - allowedAudiences: { - serializedName: "allowedAudiences", + allowedGroups: { + serializedName: "allowedGroups", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + allowedClientApplications: { + serializedName: "allowedClientApplications", type: { name: "Sequence", element: { @@ -584,53 +750,68 @@ export const AllowedAudiencesValidation: coreClient.CompositeMapper = { }, }; -export const Twitter: coreClient.CompositeMapper = { +export const DefaultAuthorizationPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Twitter", + className: "DefaultAuthorizationPolicy", modelProperties: { - enabled: { - serializedName: "enabled", + allowedPrincipals: { + serializedName: "allowedPrincipals", type: { - name: "Boolean", + name: "Composite", + className: "AllowedPrincipals", }, }, - registration: { - serializedName: "registration", + allowedApplications: { + serializedName: "allowedApplications", type: { - name: "Composite", - className: "TwitterRegistration", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const TwitterRegistration: coreClient.CompositeMapper = { +export const AllowedPrincipals: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TwitterRegistration", + className: "AllowedPrincipals", modelProperties: { - consumerKey: { - serializedName: "consumerKey", + groups: { + serializedName: "groups", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - consumerSecretSettingName: { - serializedName: "consumerSecretSettingName", + identities: { + serializedName: "identities", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const Apple: coreClient.CompositeMapper = { +export const Facebook: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Apple", + className: "Facebook", modelProperties: { enabled: { serializedName: "enabled", @@ -642,7 +823,13 @@ export const Apple: coreClient.CompositeMapper = { serializedName: "registration", type: { name: "Composite", - className: "AppleRegistration", + className: "AppRegistration", + }, + }, + graphApiVersion: { + serializedName: "graphApiVersion", + type: { + name: "String", }, }, login: { @@ -656,19 +843,19 @@ export const Apple: coreClient.CompositeMapper = { }, }; -export const AppleRegistration: coreClient.CompositeMapper = { +export const AppRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppleRegistration", + className: "AppRegistration", modelProperties: { - clientId: { - serializedName: "clientId", + appId: { + serializedName: "appId", type: { name: "String", }, }, - clientSecretSettingName: { - serializedName: "clientSecretSettingName", + appSecretSettingName: { + serializedName: "appSecretSettingName", type: { name: "String", }, @@ -677,10 +864,30 @@ export const AppleRegistration: coreClient.CompositeMapper = { }, }; -export const AzureStaticWebApps: coreClient.CompositeMapper = { +export const LoginScopes: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureStaticWebApps", + className: "LoginScopes", + modelProperties: { + scopes: { + serializedName: "scopes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const GitHub: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GitHub", modelProperties: { enabled: { serializedName: "enabled", @@ -692,17 +899,24 @@ export const AzureStaticWebApps: coreClient.CompositeMapper = { serializedName: "registration", type: { name: "Composite", - className: "AzureStaticWebAppsRegistration", + className: "ClientRegistration", + }, + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes", }, }, }, }, }; -export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { +export const ClientRegistration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureStaticWebAppsRegistration", + className: "ClientRegistration", modelProperties: { clientId: { serializedName: "clientId", @@ -710,14 +924,20 @@ export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { name: "String", }, }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String", + }, + }, }, }, }; -export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { +export const Google: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomOpenIdConnectProvider", + className: "Google", modelProperties: { enabled: { serializedName: "enabled", @@ -729,27 +949,213 @@ export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { serializedName: "registration", type: { name: "Composite", - className: "OpenIdConnectRegistration", + className: "ClientRegistration", }, }, login: { serializedName: "login", type: { name: "Composite", - className: "OpenIdConnectLogin", + className: "LoginScopes", + }, + }, + validation: { + serializedName: "validation", + type: { + name: "Composite", + className: "AllowedAudiencesValidation", }, }, }, }, }; -export const OpenIdConnectRegistration: coreClient.CompositeMapper = { +export const AllowedAudiencesValidation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OpenIdConnectRegistration", + className: "AllowedAudiencesValidation", modelProperties: { - clientId: { - serializedName: "clientId", + allowedAudiences: { + serializedName: "allowedAudiences", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const Twitter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Twitter", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "TwitterRegistration", + }, + }, + }, + }, +}; + +export const TwitterRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TwitterRegistration", + modelProperties: { + consumerKey: { + serializedName: "consumerKey", + type: { + name: "String", + }, + }, + consumerSecretSettingName: { + serializedName: "consumerSecretSettingName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const Apple: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Apple", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AppleRegistration", + }, + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "LoginScopes", + }, + }, + }, + }, +}; + +export const AppleRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppleRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String", + }, + }, + clientSecretSettingName: { + serializedName: "clientSecretSettingName", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AzureStaticWebApps: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebApps", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "AzureStaticWebAppsRegistration", + }, + }, + }, + }, +}; + +export const AzureStaticWebAppsRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureStaticWebAppsRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CustomOpenIdConnectProvider: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CustomOpenIdConnectProvider", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + registration: { + serializedName: "registration", + type: { + name: "Composite", + className: "OpenIdConnectRegistration", + }, + }, + login: { + serializedName: "login", + type: { + name: "Composite", + className: "OpenIdConnectLogin", + }, + }, + }, + }, +}; + +export const OpenIdConnectRegistration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenIdConnectRegistration", + modelProperties: { + clientId: { + serializedName: "clientId", type: { name: "String", }, @@ -964,7 +1370,24 @@ export const BlobStorageTokenStore: coreClient.CompositeMapper = { modelProperties: { sasUrlSettingName: { serializedName: "sasUrlSettingName", - required: true, + type: { + name: "String", + }, + }, + blobContainerUri: { + serializedName: "blobContainerUri", + type: { + name: "String", + }, + }, + clientId: { + serializedName: "clientId", + type: { + name: "String", + }, + }, + managedIdentityResourceId: { + serializedName: "managedIdentityResourceId", type: { name: "String", }, @@ -1109,240 +1532,62 @@ export const EncryptionSettings: coreClient.CompositeMapper = { }, }; -export const Resource: coreClient.CompositeMapper = { +export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "AvailableWorkloadProfilesCollection", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableWorkloadProfile", + }, + }, }, }, - type: { - serializedName: "type", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String", }, }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData", - }, - }, }, }, }; -export const SystemData: coreClient.CompositeMapper = { +export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "AvailableWorkloadProfileProperties", modelProperties: { - createdBy: { - serializedName: "createdBy", + category: { + serializedName: "category", type: { name: "String", }, }, - createdByType: { - serializedName: "createdByType", + applicability: { + serializedName: "applicability", type: { name: "String", }, }, - createdAt: { - serializedName: "createdAt", + cores: { + serializedName: "cores", type: { - name: "DateTime", + name: "Number", }, }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + memoryGiB: { + serializedName: "memoryGiB", type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - -export const DefaultErrorResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DefaultErrorResponse", - modelProperties: { - error: { - serializedName: "error", - type: { - name: "Composite", - className: "DefaultErrorResponseError", - }, - }, - }, - }, -}; - -export const DefaultErrorResponseError: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DefaultErrorResponseError", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DefaultErrorResponseErrorDetailsItem", - }, - }, - }, - }, - innererror: { - serializedName: "innererror", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const DefaultErrorResponseErrorDetailsItem: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "DefaultErrorResponseErrorDetailsItem", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", - }, - }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const AvailableWorkloadProfilesCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableWorkloadProfilesCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AvailableWorkloadProfile", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, -}; - -export const AvailableWorkloadProfileProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableWorkloadProfileProperties", - modelProperties: { - category: { - serializedName: "category", - type: { - name: "String", - }, - }, - applicability: { - serializedName: "applicability", - type: { - name: "String", - }, - }, - cores: { - serializedName: "cores", - type: { - name: "Number", - }, - }, - memoryGiB: { - serializedName: "memoryGiB", - type: { - name: "Number", + name: "Number", }, }, gpus: { @@ -1479,6 +1724,56 @@ export const BillingMeterCollection: coreClient.CompositeMapper = { }, }; +export const BillingMeter: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BillingMeter", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BillingMeterProperties", + }, + }, + }, + }, +}; + export const BillingMeterProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1506,26 +1801,26 @@ export const BillingMeterProperties: coreClient.CompositeMapper = { }, }; -export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { +export const BuilderCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentCollection", + className: "BuilderCollection", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectedEnvironment", + className: "BuilderResource", }, }, }, }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String", }, @@ -1534,19 +1829,21 @@ export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { }, }; -export const ExtendedLocation: coreClient.CompositeMapper = { +export const ContainerRegistry: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedLocation", + className: "ContainerRegistry", modelProperties: { - name: { - serializedName: "name", + containerRegistryServer: { + serializedName: "containerRegistryServer", + required: true, type: { name: "String", }, }, - type: { - serializedName: "type", + identityResourceId: { + serializedName: "identityResourceId", + required: true, type: { name: "String", }, @@ -1555,101 +1852,89 @@ export const ExtendedLocation: coreClient.CompositeMapper = { }, }; -export const CustomDomainConfiguration: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomainConfiguration", + className: "ManagedServiceIdentity", modelProperties: { - customDomainVerificationId: { - serializedName: "customDomainVerificationId", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "String", + name: "Uuid", }, }, - dnsSuffix: { - serializedName: "dnsSuffix", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "String", + name: "Uuid", }, }, - certificateValue: { - serializedName: "certificateValue", + type: { + serializedName: "type", + required: true, type: { - name: "ByteArray", + name: "String", }, }, - certificatePassword: { - serializedName: "certificatePassword", - type: { - name: "String", - }, - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, - type: { - name: "DateTime", - }, - }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, - type: { - name: "String", - }, - }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "String", + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" }, + }, }, }, }, }, }; -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { +export const UserAssignedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityRequest", + className: "UserAssignedIdentity", modelProperties: { - name: { - serializedName: "name", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "String", + name: "Uuid", }, }, - type: { - serializedName: "type", + clientId: { + serializedName: "clientId", + readOnly: true, type: { - name: "String", + name: "Uuid", }, }, }, }, }; -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { +export const BuilderResourceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityResponse", + className: "BuilderResourceUpdate", modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", + identity: { + serializedName: "identity", type: { - name: "Boolean", + name: "Composite", + className: "ManagedServiceIdentity", }, }, - reason: { - serializedName: "reason", + tags: { + serializedName: "tags", type: { - name: "String", + name: "Dictionary", + value: { type: { name: "String" } }, }, }, - message: { - serializedName: "message", + environmentId: { + serializedName: "properties.environmentId", type: { name: "String", }, @@ -1658,10 +1943,10 @@ export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { }, }; -export const CertificateCollection: coreClient.CompositeMapper = { +export const BuildCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateCollection", + className: "BuildCollection", modelProperties: { value: { serializedName: "value", @@ -1671,14 +1956,13 @@ export const CertificateCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Certificate", + className: "BuildResource", }, }, }, }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String", }, @@ -1687,237 +1971,232 @@ export const CertificateCollection: coreClient.CompositeMapper = { }, }; -export const CertificateProperties: coreClient.CompositeMapper = { +export const ContainerRegistryWithCustomImage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificateProperties", + className: "ContainerRegistryWithCustomImage", modelProperties: { - provisioningState: { - serializedName: "provisioningState", - readOnly: true, + server: { + serializedName: "server", + required: true, type: { name: "String", }, }, - password: { - serializedName: "password", + image: { + serializedName: "image", type: { name: "String", }, }, - subjectName: { - serializedName: "subjectName", - readOnly: true, + }, + }, +}; + +export const BuildConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildConfiguration", + modelProperties: { + baseOs: { + serializedName: "baseOs", type: { name: "String", }, }, - subjectAlternativeNames: { - serializedName: "subjectAlternativeNames", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - value: { - serializedName: "value", - type: { - name: "ByteArray", - }, - }, - issuer: { - serializedName: "issuer", - readOnly: true, + platform: { + serializedName: "platform", type: { name: "String", }, }, - issueDate: { - serializedName: "issueDate", - readOnly: true, - type: { - name: "DateTime", - }, - }, - expirationDate: { - serializedName: "expirationDate", - readOnly: true, - type: { - name: "DateTime", - }, - }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + platformVersion: { + serializedName: "platformVersion", type: { name: "String", }, }, - valid: { - serializedName: "valid", - readOnly: true, + environmentVariables: { + serializedName: "environmentVariables", type: { - name: "Boolean", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVariable", + }, + }, }, }, - publicKeyHash: { - serializedName: "publicKeyHash", - readOnly: true, + preBuildSteps: { + serializedName: "preBuildSteps", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreBuildStep", + }, + }, }, }, }, }, }; -export const CertificatePatch: coreClient.CompositeMapper = { +export const EnvironmentVariable: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CertificatePatch", + className: "EnvironmentVariable", modelProperties: { - tags: { - serializedName: "tags", + name: { + serializedName: "name", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } }, + name: "String", + }, + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String", }, }, }, }, }; -export const DaprComponentsCollection: coreClient.CompositeMapper = { +export const PreBuildStep: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponentsCollection", + className: "PreBuildStep", modelProperties: { - value: { - serializedName: "value", - required: true, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + scripts: { + serializedName: "scripts", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DaprComponent", + name: "String", }, }, }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + httpGet: { + serializedName: "httpGet", type: { - name: "String", + name: "Composite", + className: "HttpGet", }, }, }, }, }; -export const Secret: coreClient.CompositeMapper = { +export const HttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Secret", + className: "HttpGet", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", + url: { + serializedName: "url", + required: true, type: { name: "String", }, }, - identity: { - serializedName: "identity", + fileName: { + serializedName: "fileName", type: { name: "String", }, }, - keyVaultUrl: { - serializedName: "keyVaultUrl", + headers: { + serializedName: "headers", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const BuildToken: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "BuildToken", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", + token: { + serializedName: "token", + readOnly: true, type: { name: "String", }, }, - secretRef: { - serializedName: "secretRef", + expires: { + serializedName: "expires", + readOnly: true, type: { - name: "String", + name: "DateTime", }, }, }, }, }; -export const DaprSecretsCollection: coreClient.CompositeMapper = { +export const ConnectedEnvironmentCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecretsCollection", + className: "ConnectedEnvironmentCollection", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DaprSecret", + className: "ConnectedEnvironment", }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const DaprSecret: coreClient.CompositeMapper = { +export const ExtendedLocation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprSecret", + className: "ExtendedLocation", modelProperties: { name: { serializedName: "name", - readOnly: true, type: { name: "String", }, }, - value: { - serializedName: "value", - readOnly: true, + type: { + serializedName: "type", type: { name: "String", }, @@ -1926,99 +2205,59 @@ export const DaprSecret: coreClient.CompositeMapper = { }, }; -export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ConnectedEnvironmentStoragesCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedEnvironmentStorage", - }, - }, - }, - }, - }, - }, - }; - -export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ConnectedEnvironmentStorageProperties", - modelProperties: { - azureFile: { - serializedName: "azureFile", - type: { - name: "Composite", - className: "AzureFileProperties", - }, - }, - }, - }, - }; - -export const AzureFileProperties: coreClient.CompositeMapper = { +export const CustomDomainConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureFileProperties", + className: "CustomDomainConfiguration", modelProperties: { - accountName: { - serializedName: "accountName", + customDomainVerificationId: { + serializedName: "customDomainVerificationId", + readOnly: true, type: { name: "String", }, }, - accountKey: { - serializedName: "accountKey", + dnsSuffix: { + serializedName: "dnsSuffix", type: { name: "String", }, }, - accessMode: { - serializedName: "accessMode", + certificateKeyVaultProperties: { + serializedName: "certificateKeyVaultProperties", type: { - name: "String", + name: "Composite", + className: "CertificateKeyVaultProperties", }, }, - shareName: { - serializedName: "shareName", + certificateValue: { + serializedName: "certificateValue", + type: { + name: "ByteArray", + }, + }, + certificatePassword: { + serializedName: "certificatePassword", type: { name: "String", }, }, - }, - }, -}; - -export const ContainerAppCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContainerAppCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerApp", - }, - }, + name: "DateTime", }, }, - nextLink: { - serializedName: "nextLink", + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String", + }, + }, + subjectName: { + serializedName: "subjectName", readOnly: true, type: { name: "String", @@ -2028,244 +2267,338 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { }, }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const CertificateKeyVaultProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "CertificateKeyVaultProperties", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "Uuid", - }, - }, - type: { - serializedName: "type", - required: true, + identity: { + serializedName: "identity", type: { name: "String", }, }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + keyVaultUrl: { + serializedName: "keyVaultUrl", type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" }, - }, + name: "String", }, }, }, }, }; -export const UserAssignedIdentity: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserAssignedIdentity", + className: "CheckNameAvailabilityRequest", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + name: { + serializedName: "name", type: { - name: "Uuid", + name: "String", }, }, - clientId: { - serializedName: "clientId", - readOnly: true, + type: { + serializedName: "type", type: { - name: "Uuid", + name: "String", }, }, }, }, }; -export const Configuration: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Configuration", + className: "CheckNameAvailabilityResponse", modelProperties: { - secrets: { - serializedName: "secrets", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret", - }, - }, + name: "Boolean", }, }, - activeRevisionsMode: { - defaultValue: "Single", - serializedName: "activeRevisionsMode", + reason: { + serializedName: "reason", type: { name: "String", }, }, - ingress: { - serializedName: "ingress", + message: { + serializedName: "message", type: { - name: "Composite", - className: "Ingress", + name: "String", }, }, - registries: { - serializedName: "registries", + }, + }, +}; + +export const CertificateCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificateCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegistryCredentials", + className: "Certificate", }, }, }, }, - dapr: { - serializedName: "dapr", - type: { - name: "Composite", - className: "Dapr", - }, - }, - maxInactiveRevisions: { - serializedName: "maxInactiveRevisions", - type: { - name: "Number", - }, - }, - service: { - serializedName: "service", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "Service", + name: "String", }, }, }, }, }; -export const Ingress: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Ingress", + className: "CertificateProperties", modelProperties: { - fqdn: { - serializedName: "fqdn", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { name: "String", }, }, - external: { - defaultValue: false, - serializedName: "external", + deploymentErrors: { + serializedName: "deploymentErrors", + readOnly: true, type: { - name: "Boolean", + name: "String", }, }, - targetPort: { - serializedName: "targetPort", + certificateKeyVaultProperties: { + serializedName: "certificateKeyVaultProperties", type: { - name: "Number", + name: "Composite", + className: "CertificateKeyVaultProperties", }, }, - exposedPort: { - serializedName: "exposedPort", + password: { + serializedName: "password", type: { - name: "Number", + name: "String", }, }, - transport: { - defaultValue: "auto", - serializedName: "transport", + subjectName: { + serializedName: "subjectName", + readOnly: true, type: { name: "String", }, }, - traffic: { - serializedName: "traffic", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "TrafficWeight", + name: "String", }, }, }, }, - customDomains: { - serializedName: "customDomains", + value: { + serializedName: "value", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "CustomDomain", + name: "ByteArray", + }, + }, + issuer: { + serializedName: "issuer", + readOnly: true, + type: { + name: "String", + }, + }, + issueDate: { + serializedName: "issueDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + expirationDate: { + serializedName: "expirationDate", + readOnly: true, + type: { + name: "DateTime", + }, + }, + thumbprint: { + serializedName: "thumbprint", + readOnly: true, + type: { + name: "String", + }, + }, + valid: { + serializedName: "valid", + readOnly: true, + type: { + name: "Boolean", + }, + }, + publicKeyHash: { + serializedName: "publicKeyHash", + readOnly: true, + type: { + name: "String", + }, + }, + certificateType: { + serializedName: "certificateType", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const ConnectedEnvironmentDaprComponentsCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentDaprComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironmentDaprComponent", + }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, - allowInsecure: { + }, + }; + +export const DaprComponentProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponentProperties", + modelProperties: { + componentType: { + serializedName: "componentType", + type: { + name: "String", + }, + }, + version: { + serializedName: "version", + type: { + name: "String", + }, + }, + ignoreErrors: { defaultValue: false, - serializedName: "allowInsecure", + serializedName: "ignoreErrors", type: { name: "Boolean", }, }, - ipSecurityRestrictions: { - serializedName: "ipSecurityRestrictions", + initTimeout: { + serializedName: "initTimeout", + type: { + name: "String", + }, + }, + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IpSecurityRestrictionRule", + className: "Secret", }, }, }, }, - stickySessions: { - serializedName: "stickySessions", + secretStoreComponent: { + serializedName: "secretStoreComponent", type: { - name: "Composite", - className: "IngressStickySessions", + name: "String", }, }, - clientCertificateMode: { - serializedName: "clientCertificateMode", + metadata: { + serializedName: "metadata", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprMetadata", + }, + }, }, }, - corsPolicy: { - serializedName: "corsPolicy", + scopes: { + serializedName: "scopes", type: { - name: "Composite", - className: "CorsPolicy", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - additionalPortMappings: { - serializedName: "additionalPortMappings", + serviceComponentBind: { + serializedName: "serviceComponentBind", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IngressPortMapping", + className: "DaprComponentServiceBinding", }, }, }, @@ -2274,32 +2607,31 @@ export const Ingress: coreClient.CompositeMapper = { }, }; -export const TrafficWeight: coreClient.CompositeMapper = { +export const Secret: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrafficWeight", + className: "Secret", modelProperties: { - revisionName: { - serializedName: "revisionName", + name: { + serializedName: "name", type: { name: "String", }, }, - weight: { - serializedName: "weight", + value: { + serializedName: "value", type: { - name: "Number", + name: "String", }, }, - latestRevision: { - defaultValue: false, - serializedName: "latestRevision", + identity: { + serializedName: "identity", type: { - name: "Boolean", + name: "String", }, }, - label: { - serializedName: "label", + keyVaultUrl: { + serializedName: "keyVaultUrl", type: { name: "String", }, @@ -2308,26 +2640,25 @@ export const TrafficWeight: coreClient.CompositeMapper = { }, }; -export const CustomDomain: coreClient.CompositeMapper = { +export const DaprMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomDomain", + className: "DaprMetadata", modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String", }, }, - bindingType: { - serializedName: "bindingType", + value: { + serializedName: "value", type: { name: "String", }, }, - certificateId: { - serializedName: "certificateId", + secretRef: { + serializedName: "secretRef", type: { name: "String", }, @@ -2336,49 +2667,47 @@ export const CustomDomain: coreClient.CompositeMapper = { }, }; -export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { +export const DaprComponentServiceBinding: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IpSecurityRestrictionRule", + className: "DaprComponentServiceBinding", modelProperties: { name: { serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", type: { name: "String", }, }, - ipAddressRange: { - serializedName: "ipAddressRange", - required: true, + serviceId: { + serializedName: "serviceId", type: { name: "String", }, }, - action: { - serializedName: "action", - required: true, + metadata: { + serializedName: "metadata", type: { - name: "String", + name: "Composite", + className: "DaprServiceBindMetadata", }, }, }, }, }; -export const IngressStickySessions: coreClient.CompositeMapper = { +export const DaprServiceBindMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IngressStickySessions", + className: "DaprServiceBindMetadata", modelProperties: { - affinity: { - serializedName: "affinity", + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", type: { name: "String", }, @@ -2387,126 +2716,137 @@ export const IngressStickySessions: coreClient.CompositeMapper = { }, }; -export const CorsPolicy: coreClient.CompositeMapper = { +export const DaprSecretsCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CorsPolicy", + className: "DaprSecretsCollection", modelProperties: { - allowedOrigins: { - serializedName: "allowedOrigins", + value: { + serializedName: "value", required: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "DaprSecret", }, }, }, }, - allowedMethods: { - serializedName: "allowedMethods", + }, + }, +}; + +export const DaprSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, - allowedHeaders: { - serializedName: "allowedHeaders", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, - exposeHeaders: { - serializedName: "exposeHeaders", - type: { - name: "Sequence", - element: { - type: { - name: "String", + }, + }, +}; + +export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorage", + }, }, }, }, }, - maxAge: { - serializedName: "maxAge", - type: { - name: "Number", - }, - }, - allowCredentials: { - serializedName: "allowCredentials", - type: { - name: "Boolean", - }, - }, }, - }, -}; + }; -export const IngressPortMapping: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "IngressPortMapping", - modelProperties: { - external: { - serializedName: "external", - required: true, - type: { - name: "Boolean", +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorageProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, }, - }, - targetPort: { - serializedName: "targetPort", - required: true, - type: { - name: "Number", + deploymentErrors: { + serializedName: "deploymentErrors", + readOnly: true, + type: { + name: "String", + }, }, - }, - exposedPort: { - serializedName: "exposedPort", - type: { - name: "Number", + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties", + }, + }, + smb: { + serializedName: "smb", + type: { + name: "Composite", + className: "SmbStorage", + }, }, }, }, - }, -}; + }; -export const RegistryCredentials: coreClient.CompositeMapper = { +export const AzureFileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryCredentials", + className: "AzureFileProperties", modelProperties: { - server: { - serializedName: "server", + accountName: { + serializedName: "accountName", type: { name: "String", }, }, - username: { - serializedName: "username", + accountKey: { + serializedName: "accountKey", type: { name: "String", }, }, - passwordSecretRef: { - serializedName: "passwordSecretRef", + accessMode: { + serializedName: "accessMode", type: { name: "String", }, }, - identity: { - serializedName: "identity", + shareName: { + serializedName: "shareName", type: { name: "String", }, @@ -2515,73 +2855,72 @@ export const RegistryCredentials: coreClient.CompositeMapper = { }, }; -export const Dapr: coreClient.CompositeMapper = { +export const SmbStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Dapr", + className: "SmbStorage", modelProperties: { - enabled: { - defaultValue: false, - serializedName: "enabled", - type: { - name: "Boolean", - }, - }, - appId: { - serializedName: "appId", + host: { + serializedName: "host", type: { name: "String", }, }, - appProtocol: { - defaultValue: "http", - serializedName: "appProtocol", + shareName: { + serializedName: "shareName", type: { name: "String", }, }, - appPort: { - serializedName: "appPort", - type: { - name: "Number", - }, - }, - httpReadBufferSize: { - serializedName: "httpReadBufferSize", + username: { + serializedName: "username", type: { - name: "Number", + name: "String", }, }, - httpMaxRequestSize: { - serializedName: "httpMaxRequestSize", + domain: { + serializedName: "domain", type: { - name: "Number", + name: "String", }, }, - logLevel: { - serializedName: "logLevel", + password: { + serializedName: "password", type: { name: "String", }, }, - enableApiLogging: { - serializedName: "enableApiLogging", + accessMode: { + serializedName: "accessMode", type: { - name: "Boolean", + name: "String", }, }, }, }, }; -export const Service: coreClient.CompositeMapper = { +export const ContainerAppCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Service", + className: "ContainerAppCollection", modelProperties: { - type: { - serializedName: "type", + value: { + serializedName: "value", required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerApp", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String", }, @@ -2590,74 +2929,116 @@ export const Service: coreClient.CompositeMapper = { }, }; -export const Template: coreClient.CompositeMapper = { +export const ContainerAppPropertiesPatchingConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerAppPropertiesPatchingConfiguration", + modelProperties: { + patchingMode: { + serializedName: "patchingMode", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const Configuration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Template", + className: "Configuration", modelProperties: { - revisionSuffix: { - serializedName: "revisionSuffix", - type: { - name: "String", - }, - }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", - type: { - name: "Number", - }, - }, - initContainers: { - serializedName: "initContainers", + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "InitContainer", + className: "Secret", }, }, }, }, - containers: { - serializedName: "containers", + activeRevisionsMode: { + defaultValue: "Single", + serializedName: "activeRevisionsMode", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Container", - }, - }, + name: "String", }, }, - scale: { - serializedName: "scale", + targetLabel: { + serializedName: "targetLabel", + type: { + name: "String", + }, + }, + ingress: { + serializedName: "ingress", type: { name: "Composite", - className: "Scale", + className: "Ingress", }, }, - volumes: { - serializedName: "volumes", + registries: { + serializedName: "registries", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Volume", + className: "RegistryCredentials", }, }, }, }, - serviceBinds: { - serializedName: "serviceBinds", + dapr: { + serializedName: "dapr", + type: { + name: "Composite", + className: "Dapr", + }, + }, + runtime: { + serializedName: "runtime", + type: { + name: "Composite", + className: "Runtime", + }, + }, + maxInactiveRevisions: { + serializedName: "maxInactiveRevisions", + type: { + name: "Number", + }, + }, + revisionTransitionThreshold: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 1, + }, + serializedName: "revisionTransitionThreshold", + type: { + name: "Number", + }, + }, + service: { + serializedName: "service", + type: { + name: "Composite", + className: "Service", + }, + }, + identitySettings: { + serializedName: "identitySettings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServiceBind", + className: "IdentitySettings", }, }, }, @@ -2666,99 +3047,155 @@ export const Template: coreClient.CompositeMapper = { }, }; -export const BaseContainer: coreClient.CompositeMapper = { +export const Ingress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaseContainer", + className: "Ingress", modelProperties: { - image: { - serializedName: "image", + fqdn: { + serializedName: "fqdn", + readOnly: true, type: { name: "String", }, }, - name: { - serializedName: "name", + external: { + defaultValue: false, + serializedName: "external", + type: { + name: "Boolean", + }, + }, + targetPort: { + serializedName: "targetPort", + type: { + name: "Number", + }, + }, + exposedPort: { + serializedName: "exposedPort", + type: { + name: "Number", + }, + }, + transport: { + defaultValue: "auto", + serializedName: "transport", type: { name: "String", }, }, - command: { - serializedName: "command", + traffic: { + serializedName: "traffic", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "TrafficWeight", }, }, }, }, - args: { - serializedName: "args", + customDomains: { + serializedName: "customDomains", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "CustomDomain", }, }, }, }, - env: { - serializedName: "env", + allowInsecure: { + defaultValue: false, + serializedName: "allowInsecure", + type: { + name: "Boolean", + }, + }, + ipSecurityRestrictions: { + serializedName: "ipSecurityRestrictions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "EnvironmentVar", + className: "IpSecurityRestrictionRule", }, }, }, }, - resources: { - serializedName: "resources", + stickySessions: { + serializedName: "stickySessions", type: { name: "Composite", - className: "ContainerResources", + className: "IngressStickySessions", }, }, - volumeMounts: { - serializedName: "volumeMounts", + clientCertificateMode: { + serializedName: "clientCertificateMode", + type: { + name: "String", + }, + }, + corsPolicy: { + serializedName: "corsPolicy", + type: { + name: "Composite", + className: "CorsPolicy", + }, + }, + additionalPortMappings: { + serializedName: "additionalPortMappings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "VolumeMount", + className: "IngressPortMapping", }, }, }, }, + targetPortHttpScheme: { + serializedName: "targetPortHttpScheme", + type: { + name: "String", + }, + }, }, }, }; -export const EnvironmentVar: coreClient.CompositeMapper = { +export const TrafficWeight: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentVar", + className: "TrafficWeight", modelProperties: { - name: { - serializedName: "name", + revisionName: { + serializedName: "revisionName", type: { name: "String", }, }, - value: { - serializedName: "value", + weight: { + serializedName: "weight", type: { - name: "String", + name: "Number", }, }, - secretRef: { - serializedName: "secretRef", + latestRevision: { + defaultValue: false, + serializedName: "latestRevision", + type: { + name: "Boolean", + }, + }, + label: { + serializedName: "label", type: { name: "String", }, @@ -2767,26 +3204,26 @@ export const EnvironmentVar: coreClient.CompositeMapper = { }, }; -export const ContainerResources: coreClient.CompositeMapper = { +export const CustomDomain: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerResources", + className: "CustomDomain", modelProperties: { - cpu: { - serializedName: "cpu", + name: { + serializedName: "name", + required: true, type: { - name: "Number", + name: "String", }, }, - memory: { - serializedName: "memory", + bindingType: { + serializedName: "bindingType", type: { name: "String", }, }, - ephemeralStorage: { - serializedName: "ephemeralStorage", - readOnly: true, + certificateId: { + serializedName: "certificateId", type: { name: "String", }, @@ -2795,25 +3232,34 @@ export const ContainerResources: coreClient.CompositeMapper = { }, }; -export const VolumeMount: coreClient.CompositeMapper = { +export const IpSecurityRestrictionRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VolumeMount", + className: "IpSecurityRestrictionRule", modelProperties: { - volumeName: { - serializedName: "volumeName", + name: { + serializedName: "name", + required: true, type: { name: "String", }, }, - mountPath: { - serializedName: "mountPath", + description: { + serializedName: "description", type: { name: "String", }, }, - subPath: { - serializedName: "subPath", + ipAddressRange: { + serializedName: "ipAddressRange", + required: true, + type: { + name: "String", + }, + }, + action: { + serializedName: "action", + required: true, type: { name: "String", }, @@ -2822,109 +3268,141 @@ export const VolumeMount: coreClient.CompositeMapper = { }, }; -export const ContainerAppProbe: coreClient.CompositeMapper = { +export const IngressStickySessions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbe", + className: "IngressStickySessions", modelProperties: { - failureThreshold: { - serializedName: "failureThreshold", + affinity: { + serializedName: "affinity", type: { - name: "Number", + name: "String", }, }, - httpGet: { - serializedName: "httpGet", + }, + }, +}; + +export const CorsPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CorsPolicy", + modelProperties: { + allowedOrigins: { + serializedName: "allowedOrigins", + required: true, type: { - name: "Composite", - className: "ContainerAppProbeHttpGet", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - initialDelaySeconds: { - serializedName: "initialDelaySeconds", + allowedMethods: { + serializedName: "allowedMethods", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - periodSeconds: { - serializedName: "periodSeconds", + allowedHeaders: { + serializedName: "allowedHeaders", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - successThreshold: { - serializedName: "successThreshold", + exposeHeaders: { + serializedName: "exposeHeaders", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - tcpSocket: { - serializedName: "tcpSocket", + maxAge: { + serializedName: "maxAge", type: { - name: "Composite", - className: "ContainerAppProbeTcpSocket", + name: "Number", }, }, - terminationGracePeriodSeconds: { - serializedName: "terminationGracePeriodSeconds", + allowCredentials: { + serializedName: "allowCredentials", type: { - name: "Number", + name: "Boolean", }, }, - timeoutSeconds: { - serializedName: "timeoutSeconds", + }, + }, +}; + +export const IngressPortMapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IngressPortMapping", + modelProperties: { + external: { + serializedName: "external", + required: true, + type: { + name: "Boolean", + }, + }, + targetPort: { + serializedName: "targetPort", + required: true, type: { name: "Number", }, }, - type: { - serializedName: "type", + exposedPort: { + serializedName: "exposedPort", type: { - name: "String", + name: "Number", }, }, }, }, }; -export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { +export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeHttpGet", + className: "RegistryCredentials", modelProperties: { - host: { - serializedName: "host", + server: { + serializedName: "server", type: { name: "String", }, }, - httpHeaders: { - serializedName: "httpHeaders", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", - }, - }, - }, - }, - path: { - serializedName: "path", + username: { + serializedName: "username", type: { name: "String", }, }, - port: { - serializedName: "port", - required: true, + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { - name: "Number", + name: "String", }, }, - scheme: { - serializedName: "scheme", + identity: { + serializedName: "identity", type: { name: "String", }, @@ -2933,154 +3411,145 @@ export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { }, }; -export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ContainerAppProbeHttpGetHttpHeadersItem", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String", - }, - }, - }, - }, - }; - -export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { +export const Dapr: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppProbeTcpSocket", + className: "Dapr", modelProperties: { - host: { - serializedName: "host", + enabled: { + defaultValue: false, + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + appId: { + serializedName: "appId", type: { name: "String", }, }, - port: { - serializedName: "port", - required: true, + appProtocol: { + defaultValue: "http", + serializedName: "appProtocol", + type: { + name: "String", + }, + }, + appPort: { + serializedName: "appPort", type: { name: "Number", }, }, - }, - }, -}; - -export const Scale: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Scale", - modelProperties: { - minReplicas: { - serializedName: "minReplicas", + httpReadBufferSize: { + serializedName: "httpReadBufferSize", type: { name: "Number", }, }, - maxReplicas: { - defaultValue: 10, - serializedName: "maxReplicas", + httpMaxRequestSize: { + serializedName: "httpMaxRequestSize", type: { name: "Number", }, }, - rules: { - serializedName: "rules", + logLevel: { + serializedName: "logLevel", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRule", - }, - }, + name: "String", + }, + }, + enableApiLogging: { + serializedName: "enableApiLogging", + type: { + name: "Boolean", }, }, }, }, }; -export const ScaleRule: coreClient.CompositeMapper = { +export const Runtime: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRule", + className: "Runtime", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - azureQueue: { - serializedName: "azureQueue", + java: { + serializedName: "java", type: { name: "Composite", - className: "QueueScaleRule", + className: "RuntimeJava", }, }, - custom: { - serializedName: "custom", + dotnet: { + serializedName: "dotnet", type: { name: "Composite", - className: "CustomScaleRule", + className: "RuntimeDotnet", }, }, - http: { - serializedName: "http", + }, + }, +}; + +export const RuntimeJava: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuntimeJava", + modelProperties: { + enableMetrics: { + serializedName: "enableMetrics", type: { - name: "Composite", - className: "HttpScaleRule", + name: "Boolean", }, }, - tcp: { - serializedName: "tcp", + javaAgent: { + serializedName: "javaAgent", type: { name: "Composite", - className: "TcpScaleRule", + className: "RuntimeJavaAgent", }, }, }, }, }; -export const QueueScaleRule: coreClient.CompositeMapper = { +export const RuntimeJavaAgent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueueScaleRule", + className: "RuntimeJavaAgent", modelProperties: { - queueName: { - serializedName: "queueName", + enabled: { + serializedName: "enabled", type: { - name: "String", + name: "Boolean", }, }, - queueLength: { - serializedName: "queueLength", + logging: { + serializedName: "logging", type: { - name: "Number", + name: "Composite", + className: "RuntimeJavaAgentLogging", }, }, - auth: { - serializedName: "auth", + }, + }, +}; + +export const RuntimeJavaAgentLogging: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RuntimeJavaAgentLogging", + modelProperties: { + loggerSettings: { + serializedName: "loggerSettings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "LoggerSetting", }, }, }, @@ -3089,19 +3558,21 @@ export const QueueScaleRule: coreClient.CompositeMapper = { }, }; -export const ScaleRuleAuth: coreClient.CompositeMapper = { +export const LoggerSetting: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "LoggerSetting", modelProperties: { - secretRef: { - serializedName: "secretRef", + logger: { + serializedName: "logger", + required: true, type: { name: "String", }, }, - triggerParameter: { - serializedName: "triggerParameter", + level: { + serializedName: "level", + required: true, type: { name: "String", }, @@ -3110,88 +3581,127 @@ export const ScaleRuleAuth: coreClient.CompositeMapper = { }, }; -export const CustomScaleRule: coreClient.CompositeMapper = { +export const RuntimeDotnet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomScaleRule", + className: "RuntimeDotnet", modelProperties: { - type: { - serializedName: "type", - type: { - name: "String", - }, - }, - metadata: { - serializedName: "metadata", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, - }, - }, - auth: { - serializedName: "auth", + autoConfigureDataProtection: { + serializedName: "autoConfigureDataProtection", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth", - }, - }, + name: "Boolean", }, }, }, }, }; -export const HttpScaleRule: coreClient.CompositeMapper = { +export const Service: coreClient.CompositeMapper = { type: { name: "Composite", - className: "HttpScaleRule", + className: "Service", modelProperties: { - metadata: { - serializedName: "metadata", + type: { + serializedName: "type", + required: true, type: { - name: "Dictionary", - value: { type: { name: "String" } }, + name: "String", }, }, - auth: { - serializedName: "auth", + }, + }, +}; + +export const IdentitySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IdentitySettings", + modelProperties: { + identity: { + serializedName: "identity", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ScaleRuleAuth", - }, - }, + name: "String", + }, + }, + lifecycle: { + serializedName: "lifecycle", + type: { + name: "String", }, }, }, }, }; -export const TcpScaleRule: coreClient.CompositeMapper = { +export const Template: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TcpScaleRule", + className: "Template", modelProperties: { - metadata: { - serializedName: "metadata", + revisionSuffix: { + serializedName: "revisionSuffix", type: { - name: "Dictionary", - value: { type: { name: "String" } }, + name: "String", }, }, - auth: { - serializedName: "auth", + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number", + }, + }, + initContainers: { + serializedName: "initContainers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ScaleRuleAuth", + className: "InitContainer", + }, + }, + }, + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container", + }, + }, + }, + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "Scale", + }, + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume", + }, + }, + }, + }, + serviceBinds: { + serializedName: "serviceBinds", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceBind", }, }, }, @@ -3200,64 +3710,105 @@ export const TcpScaleRule: coreClient.CompositeMapper = { }, }; -export const Volume: coreClient.CompositeMapper = { +export const BaseContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Volume", + className: "BaseContainer", modelProperties: { - name: { - serializedName: "name", + image: { + serializedName: "image", type: { name: "String", }, }, - storageType: { - serializedName: "storageType", + imageType: { + serializedName: "imageType", type: { name: "String", }, }, - storageName: { - serializedName: "storageName", + name: { + serializedName: "name", type: { name: "String", }, }, - secrets: { - serializedName: "secrets", + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + env: { + serializedName: "env", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SecretVolumeItem", + className: "EnvironmentVar", }, }, }, }, - mountOptions: { - serializedName: "mountOptions", + resources: { + serializedName: "resources", type: { - name: "String", + name: "Composite", + className: "ContainerResources", + }, + }, + volumeMounts: { + serializedName: "volumeMounts", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VolumeMount", + }, + }, }, }, }, }, }; -export const SecretVolumeItem: coreClient.CompositeMapper = { +export const EnvironmentVar: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretVolumeItem", + className: "EnvironmentVar", modelProperties: { - secretRef: { - serializedName: "secretRef", + name: { + serializedName: "name", type: { name: "String", }, }, - path: { - serializedName: "path", + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + secretRef: { + serializedName: "secretRef", type: { name: "String", }, @@ -3266,211 +3817,194 @@ export const SecretVolumeItem: coreClient.CompositeMapper = { }, }; -export const ServiceBind: coreClient.CompositeMapper = { +export const ContainerResources: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceBind", + className: "ContainerResources", modelProperties: { - serviceId: { - serializedName: "serviceId", + cpu: { + serializedName: "cpu", + type: { + name: "Number", + }, + }, + memory: { + serializedName: "memory", type: { name: "String", }, }, - name: { - serializedName: "name", + ephemeralStorage: { + serializedName: "ephemeralStorage", + readOnly: true, type: { name: "String", }, }, + gpu: { + serializedName: "gpu", + type: { + name: "Number", + }, + }, }, }, }; -export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { +export const VolumeMount: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CustomHostnameAnalysisResult", + className: "VolumeMount", modelProperties: { - hostName: { - serializedName: "hostName", - readOnly: true, + volumeName: { + serializedName: "volumeName", type: { name: "String", }, }, - isHostnameAlreadyVerified: { - serializedName: "isHostnameAlreadyVerified", - readOnly: true, + mountPath: { + serializedName: "mountPath", type: { - name: "Boolean", + name: "String", }, }, - customDomainVerificationTest: { - serializedName: "customDomainVerificationTest", - readOnly: true, + subPath: { + serializedName: "subPath", type: { - name: "Enum", - allowedValues: ["Passed", "Failed", "Skipped"], + name: "String", }, }, - customDomainVerificationFailureInfo: { - serializedName: "customDomainVerificationFailureInfo", + }, + }, +}; + +export const ContainerAppProbe: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbe", + modelProperties: { + failureThreshold: { + serializedName: "failureThreshold", type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + name: "Number", }, }, - hasConflictOnManagedEnvironment: { - serializedName: "hasConflictOnManagedEnvironment", - readOnly: true, + httpGet: { + serializedName: "httpGet", type: { - name: "Boolean", + name: "Composite", + className: "ContainerAppProbeHttpGet", }, }, - conflictWithEnvironmentCustomDomain: { - serializedName: "conflictWithEnvironmentCustomDomain", - readOnly: true, + initialDelaySeconds: { + serializedName: "initialDelaySeconds", type: { - name: "Boolean", + name: "Number", }, }, - conflictingContainerAppResourceId: { - serializedName: "conflictingContainerAppResourceId", - readOnly: true, + periodSeconds: { + serializedName: "periodSeconds", type: { - name: "String", + name: "Number", }, }, - cNameRecords: { - serializedName: "cNameRecords", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + successThreshold: { + serializedName: "successThreshold", + type: { + name: "Number", }, }, - txtRecords: { - serializedName: "txtRecords", + tcpSocket: { + serializedName: "tcpSocket", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "ContainerAppProbeTcpSocket", }, }, - aRecords: { - serializedName: "aRecords", + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Number", }, }, - alternateCNameRecords: { - serializedName: "alternateCNameRecords", + timeoutSeconds: { + serializedName: "timeoutSeconds", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Number", }, }, - alternateTxtRecords: { - serializedName: "alternateTxtRecords", + type: { + serializedName: "type", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, }, }, }; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", - modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, +export const ContainerAppProbeHttpGet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGet", + modelProperties: { + host: { + serializedName: "host", + type: { + name: "String", }, - message: { - serializedName: "message", - readOnly: true, - type: { - name: "String", + }, + httpHeaders: { + serializedName: "httpHeaders", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbeHttpGetHttpHeadersItem", + }, }, }, - target: { - serializedName: "target", - readOnly: true, - type: { - name: "String", - }, + }, + path: { + serializedName: "path", + type: { + name: "String", }, - details: { - serializedName: "details", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", - }, - }, - }, + }, + port: { + serializedName: "port", + required: true, + type: { + name: "Number", + }, + }, + scheme: { + serializedName: "scheme", + type: { + name: "String", }, }, }, - }; + }, +}; -export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = +export const ContainerAppProbeHttpGetHttpHeadersItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + className: "ContainerAppProbeHttpGetHttpHeadersItem", modelProperties: { - code: { - serializedName: "code", - readOnly: true, - type: { - name: "String", - }, - }, - message: { - serializedName: "message", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { name: "String", }, }, - target: { - serializedName: "target", - readOnly: true, + value: { + serializedName: "value", + required: true, type: { name: "String", }, @@ -3479,98 +4013,78 @@ export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDeta }, }; -export const SecretsCollection: coreClient.CompositeMapper = { +export const ContainerAppProbeTcpSocket: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecretsCollection", + className: "ContainerAppProbeTcpSocket", modelProperties: { - value: { - serializedName: "value", + host: { + serializedName: "host", + type: { + name: "String", + }, + }, + port: { + serializedName: "port", required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ContainerAppSecret", - }, - }, + name: "Number", }, }, }, }, }; -export const ContainerAppSecret: coreClient.CompositeMapper = { +export const Scale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppSecret", + className: "Scale", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + minReplicas: { + serializedName: "minReplicas", type: { - name: "String", + name: "Number", }, }, - value: { - serializedName: "value", - readOnly: true, + maxReplicas: { + defaultValue: 10, + serializedName: "maxReplicas", type: { - name: "String", + name: "Number", }, }, - identity: { - serializedName: "identity", - readOnly: true, + cooldownPeriod: { + serializedName: "cooldownPeriod", type: { - name: "String", + name: "Number", }, }, - keyVaultUrl: { - serializedName: "keyVaultUrl", - readOnly: true, + pollingInterval: { + serializedName: "pollingInterval", type: { - name: "String", + name: "Number", }, }, - }, - }, -}; - -export const RevisionCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RevisionCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + rules: { + serializedName: "rules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Revision", + className: "ScaleRule", }, }, }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String", - }, - }, }, }, }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const ScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "ScaleRule", modelProperties: { name: { serializedName: "name", @@ -3578,54 +4092,96 @@ export const ReplicaContainer: coreClient.CompositeMapper = { name: "String", }, }, - containerId: { - serializedName: "containerId", + azureQueue: { + serializedName: "azureQueue", type: { - name: "String", + name: "Composite", + className: "QueueScaleRule", }, }, - ready: { - serializedName: "ready", + custom: { + serializedName: "custom", type: { - name: "Boolean", + name: "Composite", + className: "CustomScaleRule", }, }, - started: { - serializedName: "started", + http: { + serializedName: "http", type: { - name: "Boolean", + name: "Composite", + className: "HttpScaleRule", }, }, - restartCount: { - serializedName: "restartCount", + tcp: { + serializedName: "tcp", type: { - name: "Number", + name: "Composite", + className: "TcpScaleRule", }, }, - runningState: { - serializedName: "runningState", - readOnly: true, + }, + }, +}; + +export const QueueScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "QueueScaleRule", + modelProperties: { + accountName: { + serializedName: "accountName", type: { name: "String", }, }, - runningStateDetails: { - serializedName: "runningStateDetails", - readOnly: true, + queueName: { + serializedName: "queueName", type: { name: "String", }, }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", - readOnly: true, + queueLength: { + serializedName: "queueLength", + type: { + name: "Number", + }, + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth", + }, + }, + }, + }, + identity: { + serializedName: "identity", type: { name: "String", }, }, - execEndpoint: { - serializedName: "execEndpoint", - readOnly: true, + }, + }, +}; + +export const ScaleRuleAuth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleRuleAuth", + modelProperties: { + secretRef: { + serializedName: "secretRef", + type: { + name: "String", + }, + }, + triggerParameter: { + serializedName: "triggerParameter", type: { name: "String", }, @@ -3634,49 +4190,72 @@ export const ReplicaContainer: coreClient.CompositeMapper = { }, }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const CustomScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "CustomScaleRule", modelProperties: { - value: { - serializedName: "value", - required: true, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Replica", + className: "ScaleRuleAuth", }, }, }, }, + identity: { + serializedName: "identity", + type: { + name: "String", + }, + }, }, }, }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const HttpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "HttpScaleRule", modelProperties: { - value: { - serializedName: "value", - required: true, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Diagnostics", + className: "ScaleRuleAuth", }, }, }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + identity: { + serializedName: "identity", type: { name: "String", }, @@ -3685,144 +4264,98 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { }, }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const TcpScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "TcpScaleRule", modelProperties: { metadata: { serializedName: "metadata", type: { - name: "Composite", - className: "DiagnosticsDefinition", + name: "Dictionary", + value: { type: { name: "String" } }, }, }, - dataset: { - serializedName: "dataset", + auth: { + serializedName: "auth", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "ScaleRuleAuth", }, }, }, }, - status: { - serializedName: "status", - type: { - name: "Composite", - className: "DiagnosticsStatus", - }, - }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + identity: { + serializedName: "identity", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata", + name: "String", }, }, }, }, }; -export const DiagnosticsDefinition: coreClient.CompositeMapper = { +export const Volume: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDefinition", + className: "Volume", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, name: { serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - description: { - serializedName: "description", - readOnly: true, type: { name: "String", }, }, - author: { - serializedName: "author", - readOnly: true, + storageType: { + serializedName: "storageType", type: { name: "String", }, }, - category: { - serializedName: "category", - readOnly: true, + storageName: { + serializedName: "storageName", type: { name: "String", }, }, - supportTopicList: { - serializedName: "supportTopicList", + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticSupportTopic", - }, - }, - }, - }, - analysisTypes: { - serializedName: "analysisTypes", - type: { - name: "Sequence", - element: { - type: { - name: "String", + className: "SecretVolumeItem", }, }, }, }, - type: { - serializedName: "type", - readOnly: true, + mountOptions: { + serializedName: "mountOptions", type: { name: "String", }, }, - score: { - serializedName: "score", - readOnly: true, - type: { - name: "Number", - }, - }, }, }, }; -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { +export const SecretVolumeItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticSupportTopic", + className: "SecretVolumeItem", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + secretRef: { + serializedName: "secretRef", type: { name: "String", }, }, - pesId: { - serializedName: "pesId", - readOnly: true, + path: { + serializedName: "path", type: { name: "String", }, @@ -3831,87 +4364,3864 @@ export const DiagnosticSupportTopic: coreClient.CompositeMapper = { }, }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const ServiceBind: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "ServiceBind", modelProperties: { - table: { - serializedName: "table", + serviceId: { + serializedName: "serviceId", type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject", + name: "String", }, }, - renderingProperties: { - serializedName: "renderingProperties", + name: { + serializedName: "name", type: { - name: "Composite", - className: "DiagnosticRendering", + name: "String", + }, + }, + clientType: { + serializedName: "clientType", + type: { + name: "String", + }, + }, + customizedKeys: { + serializedName: "customizedKeys", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, }, }, }, }, }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "CustomHostnameAnalysisResult", modelProperties: { - tableName: { - serializedName: "tableName", - type: { - name: "String", + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String", + }, + }, + isHostnameAlreadyVerified: { + serializedName: "isHostnameAlreadyVerified", + readOnly: true, + type: { + name: "Boolean", + }, + }, + customDomainVerificationTest: { + serializedName: "customDomainVerificationTest", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Passed", "Failed", "Skipped"], + }, + }, + customDomainVerificationFailureInfo: { + serializedName: "customDomainVerificationFailureInfo", + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + }, + }, + hasConflictOnManagedEnvironment: { + serializedName: "hasConflictOnManagedEnvironment", + readOnly: true, + type: { + name: "Boolean", + }, + }, + conflictWithEnvironmentCustomDomain: { + serializedName: "conflictWithEnvironmentCustomDomain", + readOnly: true, + type: { + name: "Boolean", + }, + }, + conflictingContainerAppResourceId: { + serializedName: "conflictingContainerAppResourceId", + readOnly: true, + type: { + name: "String", + }, + }, + cNameRecords: { + serializedName: "cNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + txtRecords: { + serializedName: "txtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + aRecords: { + serializedName: "aRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + alternateCNameRecords: { + serializedName: "alternateCNameRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + alternateTxtRecords: { + serializedName: "alternateTxtRecords", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + }, + }, + }, + }, + }, + }, + }; + +export const CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + modelProperties: { + code: { + serializedName: "code", + readOnly: true, + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + target: { + serializedName: "target", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppSecret", + }, + }, + }, + }, + }, + }, +}; + +export const ContainerAppSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String", + }, + }, + identity: { + serializedName: "identity", + readOnly: true, + type: { + name: "String", + }, + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ContainerAppsBuildCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsBuildCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppsBuildResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ContainerAppsBuildConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsBuildConfiguration", + modelProperties: { + baseOs: { + serializedName: "baseOs", + readOnly: true, + type: { + name: "String", + }, + }, + platform: { + serializedName: "platform", + readOnly: true, + type: { + name: "String", + }, + }, + platformVersion: { + serializedName: "platformVersion", + readOnly: true, + type: { + name: "String", + }, + }, + environmentVariables: { + serializedName: "environmentVariables", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVariable", + }, + }, + }, + }, + preBuildSteps: { + serializedName: "preBuildSteps", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreBuildStep", + }, + }, + }, + }, + }, + }, +}; + +export const PatchCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppsPatchResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchProperties", + modelProperties: { + targetEnvironmentId: { + serializedName: "targetEnvironmentId", + type: { + name: "String", + }, + }, + targetContainerAppId: { + serializedName: "targetContainerAppId", + type: { + name: "String", + }, + }, + targetRevisionId: { + serializedName: "targetRevisionId", + type: { + name: "String", + }, + }, + patchApplyStatus: { + serializedName: "patchApplyStatus", + readOnly: true, + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + readOnly: true, + type: { + name: "DateTime", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + readOnly: true, + type: { + name: "DateTime", + }, + }, + patchDetails: { + serializedName: "patchDetails", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PatchDetails", + }, + }, + }, + }, + }, + }, +}; + +export const PatchDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchDetails", + modelProperties: { + targetContainerName: { + serializedName: "targetContainerName", + required: true, + readOnly: true, + type: { + name: "String", + }, + }, + targetImage: { + serializedName: "targetImage", + required: true, + readOnly: true, + type: { + name: "String", + }, + }, + lastDetectionTime: { + serializedName: "lastDetectionTime", + required: true, + readOnly: true, + type: { + name: "DateTime", + }, + }, + detectionStatus: { + serializedName: "detectionStatus", + required: true, + readOnly: true, + type: { + name: "String", + }, + }, + newImageName: { + serializedName: "newImageName", + readOnly: true, + type: { + name: "String", + }, + }, + newLayer: { + serializedName: "newLayer", + type: { + name: "Composite", + className: "PatchDetailsNewLayer", + }, + }, + oldLayer: { + serializedName: "oldLayer", + type: { + name: "Composite", + className: "PatchDetailsOldLayer", + }, + }, + patchType: { + serializedName: "patchType", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PatchDetailsNewLayer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchDetailsNewLayer", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + frameworkAndVersion: { + serializedName: "frameworkAndVersion", + type: { + name: "String", + }, + }, + osAndVersion: { + serializedName: "osAndVersion", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PatchDetailsOldLayer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchDetailsOldLayer", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + frameworkAndVersion: { + serializedName: "frameworkAndVersion", + type: { + name: "String", + }, + }, + osAndVersion: { + serializedName: "osAndVersion", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PatchSkipConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PatchSkipConfig", + modelProperties: { + skip: { + serializedName: "skip", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const LabelHistoryCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelHistoryCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LabelHistory", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const LabelHistoryProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelHistoryProperties", + modelProperties: { + records: { + serializedName: "records", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LabelHistoryRecordItem", + }, + }, + }, + }, + }, + }, +}; + +export const LabelHistoryRecordItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LabelHistoryRecordItem", + modelProperties: { + revision: { + serializedName: "revision", + readOnly: true, + type: { + name: "String", + }, + }, + start: { + serializedName: "start", + readOnly: true, + type: { + name: "DateTime", + }, + }, + stop: { + serializedName: "stop", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const RevisionCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RevisionCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Revision", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ReplicaContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaContainer", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + containerId: { + serializedName: "containerId", + type: { + name: "String", + }, + }, + ready: { + serializedName: "ready", + type: { + name: "Boolean", + }, + }, + started: { + serializedName: "started", + type: { + name: "Boolean", + }, + }, + restartCount: { + serializedName: "restartCount", + type: { + name: "Number", + }, + }, + runningState: { + serializedName: "runningState", + readOnly: true, + type: { + name: "String", + }, + }, + runningStateDetails: { + serializedName: "runningStateDetails", + readOnly: true, + type: { + name: "String", + }, + }, + logStreamEndpoint: { + serializedName: "logStreamEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + execEndpoint: { + serializedName: "execEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + debugEndpoint: { + serializedName: "debugEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ReplicaCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replica", + }, + }, + }, + }, + }, + }, +}; + +export const DiagnosticsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Diagnostics", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DiagnosticsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsProperties", + modelProperties: { + metadata: { + serializedName: "metadata", + type: { + name: "Composite", + className: "DiagnosticsDefinition", + }, + }, + dataset: { + serializedName: "dataset", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse", + }, + }, + }, + }, + status: { + serializedName: "status", + type: { + name: "Composite", + className: "DiagnosticsStatus", + }, + }, + dataProviderMetadata: { + serializedName: "dataProviderMetadata", + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata", + }, + }, + }, + }, +}; + +export const DiagnosticsDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDefinition", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + author: { + serializedName: "author", + readOnly: true, + type: { + name: "String", + }, + }, + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String", + }, + }, + supportTopicList: { + serializedName: "supportTopicList", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticSupportTopic", + }, + }, + }, + }, + analysisTypes: { + serializedName: "analysisTypes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticSupportTopic", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + pesId: { + serializedName: "pesId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsDataApiResponse", + modelProperties: { + table: { + serializedName: "table", + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject", + }, + }, + renderingProperties: { + serializedName: "renderingProperties", + type: { + name: "Composite", + className: "DiagnosticRendering", + }, + }, + }, + }, +}; + +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseObject", + modelProperties: { + tableName: { + serializedName: "tableName", + type: { + name: "String", + }, + }, + columns: { + serializedName: "columns", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseColumn", + }, + }, + }, + }, + rows: { + serializedName: "rows", + type: { + name: "Sequence", + element: { + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + }, + }, + }, + }, +}; + +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataTableResponseColumn", + modelProperties: { + columnName: { + serializedName: "columnName", + type: { + name: "String", + }, + }, + dataType: { + serializedName: "dataType", + type: { + name: "String", + }, + }, + columnType: { + serializedName: "columnType", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DiagnosticRendering: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticRendering", + modelProperties: { + type: { + serializedName: "type", + type: { + name: "Number", + }, + }, + title: { + serializedName: "title", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + isVisible: { + serializedName: "isVisible", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const DiagnosticsStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticsStatus", + modelProperties: { + message: { + serializedName: "message", + type: { + name: "String", + }, + }, + statusId: { + serializedName: "statusId", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadata", + modelProperties: { + providerName: { + serializedName: "providerName", + type: { + name: "String", + }, + }, + propertyBag: { + serializedName: "propertyBag", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem", + }, + }, + }, + }, + }, + }, +}; + +export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DiagnosticDataProviderMetadataPropertyBagItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const VnetConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VnetConfiguration", + modelProperties: { + internal: { + serializedName: "internal", + type: { + name: "Boolean", + }, + }, + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", + type: { + name: "String", + }, + }, + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", + type: { + name: "String", + }, + }, + platformReservedCidr: { + serializedName: "platformReservedCidr", + type: { + name: "String", + }, + }, + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AppLogsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppLogsConfiguration", + modelProperties: { + destination: { + serializedName: "destination", + type: { + name: "String", + }, + }, + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", + type: { + name: "Composite", + className: "LogAnalyticsConfiguration", + }, + }, + }, + }, +}; + +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsConfiguration", + modelProperties: { + customerId: { + serializedName: "customerId", + type: { + name: "String", + }, + }, + sharedKey: { + serializedName: "sharedKey", + type: { + name: "String", + }, + }, + dynamicJsonColumns: { + serializedName: "dynamicJsonColumns", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const AppInsightsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppInsightsConfiguration", + modelProperties: { + connectionString: { + serializedName: "connectionString", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OpenTelemetryConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OpenTelemetryConfiguration", + modelProperties: { + destinationsConfiguration: { + serializedName: "destinationsConfiguration", + type: { + name: "Composite", + className: "DestinationsConfiguration", + }, + }, + tracesConfiguration: { + serializedName: "tracesConfiguration", + type: { + name: "Composite", + className: "TracesConfiguration", + }, + }, + logsConfiguration: { + serializedName: "logsConfiguration", + type: { + name: "Composite", + className: "LogsConfiguration", + }, + }, + metricsConfiguration: { + serializedName: "metricsConfiguration", + type: { + name: "Composite", + className: "MetricsConfiguration", + }, + }, + }, + }, +}; + +export const DestinationsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DestinationsConfiguration", + modelProperties: { + dataDogConfiguration: { + serializedName: "dataDogConfiguration", + type: { + name: "Composite", + className: "DataDogConfiguration", + }, + }, + otlpConfigurations: { + serializedName: "otlpConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OtlpConfiguration", + }, + }, + }, + }, + }, + }, +}; + +export const DataDogConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataDogConfiguration", + modelProperties: { + site: { + serializedName: "site", + type: { + name: "String", + }, + }, + key: { + serializedName: "key", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OtlpConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OtlpConfiguration", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + endpoint: { + serializedName: "endpoint", + type: { + name: "String", + }, + }, + insecure: { + serializedName: "insecure", + type: { + name: "Boolean", + }, + }, + headers: { + serializedName: "headers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Header", + }, + }, + }, + }, + }, + }, +}; + +export const Header: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Header", + modelProperties: { + key: { + serializedName: "key", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TracesConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TracesConfiguration", + modelProperties: { + includeDapr: { + serializedName: "includeDapr", + type: { + name: "Boolean", + }, + }, + destinations: { + serializedName: "destinations", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const LogsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogsConfiguration", + modelProperties: { + destinations: { + serializedName: "destinations", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const MetricsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetricsConfiguration", + modelProperties: { + includeKeda: { + serializedName: "includeKeda", + type: { + name: "Boolean", + }, + }, + destinations: { + serializedName: "destinations", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const WorkloadProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfile", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, + enableFips: { + defaultValue: false, + serializedName: "enableFips", + type: { + name: "Boolean", + }, + }, + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, + type: { + name: "String", + }, + }, + minimumCount: { + serializedName: "minimumCount", + type: { + name: "Number", + }, + }, + maximumCount: { + serializedName: "maximumCount", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const KedaConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KedaConfiguration", + modelProperties: { + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprConfiguration", + modelProperties: { + version: { + serializedName: "version", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedEnvironmentPropertiesPeerAuthentication: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication", + modelProperties: { + mtls: { + serializedName: "mtls", + type: { + name: "Composite", + className: "Mtls", + }, + }, + }, + }, + }; + +export const Mtls: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Mtls", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const ManagedEnvironmentPropertiesPeerTrafficConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerTrafficConfiguration", + modelProperties: { + encryption: { + serializedName: "encryption", + type: { + name: "Composite", + className: + "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", + }, + }, + }, + }, + }; + +export const ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const PrivateEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpoint", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfiguration", + modelProperties: { + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret", + }, + }, + }, + }, + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, + type: { + name: "String", + }, + }, + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, + type: { + name: "Number", + }, + }, + replicaRetryLimit: { + serializedName: "replicaRetryLimit", + type: { + name: "Number", + }, + }, + manualTriggerConfig: { + serializedName: "manualTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationManualTriggerConfig", + }, + }, + scheduleTriggerConfig: { + serializedName: "scheduleTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig", + }, + }, + eventTriggerConfig: { + serializedName: "eventTriggerConfig", + type: { + name: "Composite", + className: "JobConfigurationEventTriggerConfig", + }, + }, + registries: { + serializedName: "registries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryCredentials", + }, + }, + }, + }, + identitySettings: { + serializedName: "identitySettings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IdentitySettings", + }, + }, + }, + }, + }, + }, +}; + +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfigurationManualTriggerConfig", + modelProperties: { + replicaCompletionCount: { + serializedName: "replicaCompletionCount", + type: { + name: "Number", + }, + }, + parallelism: { + serializedName: "parallelism", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "JobConfigurationScheduleTriggerConfig", + modelProperties: { + replicaCompletionCount: { + serializedName: "replicaCompletionCount", + type: { + name: "Number", + }, + }, + cronExpression: { + serializedName: "cronExpression", + required: true, + type: { + name: "String", + }, + }, + parallelism: { + serializedName: "parallelism", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const JobConfigurationEventTriggerConfig: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfigurationEventTriggerConfig", + modelProperties: { + replicaCompletionCount: { + serializedName: "replicaCompletionCount", + type: { + name: "Number", + }, + }, + parallelism: { + serializedName: "parallelism", + type: { + name: "Number", + }, + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "JobScale", + }, + }, + }, + }, +}; + +export const JobScale: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobScale", + modelProperties: { + pollingInterval: { + serializedName: "pollingInterval", + type: { + name: "Number", + }, + }, + minExecutions: { + defaultValue: 0, + serializedName: "minExecutions", + type: { + name: "Number", + }, + }, + maxExecutions: { + defaultValue: 100, + serializedName: "maxExecutions", + type: { + name: "Number", + }, + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobScaleRule", + }, + }, + }, + }, + }, + }, +}; + +export const JobScaleRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobScaleRule", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth", + }, + }, + }, + }, + identity: { + serializedName: "identity", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobTemplate", + modelProperties: { + initContainers: { + serializedName: "initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainer", + }, + }, + }, + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Container", + }, + }, + }, + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume", + }, + }, + }, + }, + }, + }, +}; + +export const DotNetComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DotNetComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DotNetComponent", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DotNetComponentConfigurationProperty: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DotNetComponentConfigurationProperty", + modelProperties: { + propertyName: { + serializedName: "propertyName", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DotNetComponentServiceBind: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DotNetComponentServiceBind", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + serviceId: { + serializedName: "serviceId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const AvailableOperations: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AvailableOperations", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDetail", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDetail", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + isDataAction: { + serializedName: "isDataAction", + type: { + name: "Boolean", + }, + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay", + }, + }, + origin: { + serializedName: "origin", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String", + }, + }, + resource: { + serializedName: "resource", + type: { + name: "String", + }, + }, + operation: { + serializedName: "operation", + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JavaComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JavaComponent", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JavaComponentProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentProperties", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: { + serializedName: "componentType", + clientName: "componentType", + }, + modelProperties: { + componentType: { + serializedName: "componentType", + required: true, + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + configurations: { + serializedName: "configurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JavaComponentConfigurationProperty", + }, + }, + }, + }, + scale: { + serializedName: "scale", + type: { + name: "Composite", + className: "JavaComponentPropertiesScale", + }, + }, + serviceBinds: { + serializedName: "serviceBinds", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JavaComponentServiceBind", + }, + }, + }, + }, + }, + }, +}; + +export const JavaComponentConfigurationProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentConfigurationProperty", + modelProperties: { + propertyName: { + serializedName: "propertyName", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JavaComponentPropertiesScale: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentPropertiesScale", + modelProperties: { + minReplicas: { + serializedName: "minReplicas", + type: { + name: "Number", + }, + }, + maxReplicas: { + serializedName: "maxReplicas", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const JavaComponentServiceBind: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentServiceBind", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + serviceId: { + serializedName: "serviceId", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Job", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobPatchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobPatchProperties", + modelProperties: { + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "JobPatchPropertiesProperties", + }, + }, + }, + }, +}; + +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobPatchPropertiesProperties", + modelProperties: { + environmentId: { + serializedName: "environmentId", + type: { + name: "String", + }, + }, + configuration: { + serializedName: "configuration", + type: { + name: "Composite", + className: "JobConfiguration", + }, + }, + template: { + serializedName: "template", + type: { + name: "Composite", + className: "JobTemplate", + }, + }, + outboundIpAddresses: { + serializedName: "outboundIpAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobExecutionTemplate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionTemplate", + modelProperties: { + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer", + }, + }, + }, + }, + initContainers: { + serializedName: "initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer", + }, + }, + }, + }, + }, + }, +}; + +export const JobExecutionContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionContainer", + modelProperties: { + image: { + serializedName: "image", + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar", + }, + }, + }, + }, + resources: { + serializedName: "resources", + type: { + name: "Composite", + className: "ContainerResources", + }, + }, + }, + }, +}; + +export const JobExecutionBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionBase", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppJobExecutions", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecution", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobExecution: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecution", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + id: { + serializedName: "id", + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String", + }, + }, + startTime: { + serializedName: "properties.startTime", + type: { + name: "DateTime", + }, + }, + endTime: { + serializedName: "properties.endTime", + type: { + name: "DateTime", + }, + }, + template: { + serializedName: "properties.template", + type: { + name: "Composite", + className: "JobExecutionTemplate", + }, + }, + detailedStatus: { + serializedName: "properties.detailedStatus", + type: { + name: "Composite", + className: "ExecutionStatus", + }, + }, + }, + }, +}; + +export const ExecutionStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExecutionStatus", + modelProperties: { + replicas: { + serializedName: "replicas", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaExecutionStatus", + }, + }, + }, + }, + }, + }, +}; + +export const ReplicaExecutionStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaExecutionStatus", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + containers: { + serializedName: "containers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerExecutionStatus", + }, + }, + }, + }, + }, + }, +}; + +export const ContainerExecutionStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerExecutionStatus", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + code: { + serializedName: "code", + type: { + name: "Number", + }, + }, + additionalInformation: { + serializedName: "additionalInformation", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret", + }, + }, + }, + }, + }, + }, +}; + +export const WorkflowEnvelopeCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowEnvelopeCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkflowEnvelope", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const WorkflowEnvelope: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowEnvelope", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "WorkflowEnvelopeProperties", + }, + }, + }, + }, +}; + +export const WorkflowEnvelopeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowEnvelopeProperties", + modelProperties: { + files: { + serializedName: "files", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + flowState: { + serializedName: "flowState", + type: { + name: "String", + }, + }, + health: { + serializedName: "health", + type: { + name: "Composite", + className: "WorkflowHealth", + }, + }, + }, + }, +}; + +export const WorkflowHealth: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowHealth", + modelProperties: { + state: { + serializedName: "state", + required: true, + type: { + name: "Enum", + allowedValues: ["NotSpecified", "Healthy", "Unhealthy", "Unknown"], + }, + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorEntity", + }, + }, + }, + }, +}; + +export const ErrorEntity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorEntity", + modelProperties: { + extendedCode: { + serializedName: "extendedCode", + type: { + name: "String", + }, + }, + messageTemplate: { + serializedName: "messageTemplate", + type: { + name: "String", + }, + }, + parameters: { + serializedName: "parameters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + innerErrors: { + serializedName: "innerErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorEntity", + }, + }, + }, + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorEntity", + }, + }, + }, + }, + target: { + serializedName: "target", + type: { + name: "String", + }, + }, + code: { + serializedName: "code", + type: { + name: "String", + }, + }, + message: { + serializedName: "message", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const WorkflowArtifacts: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkflowArtifacts", + modelProperties: { + appSettings: { + serializedName: "appSettings", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + files: { + serializedName: "files", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + filesToDelete: { + serializedName: "filesToDelete", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + +export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironment", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedCertificateProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificateProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + subjectName: { + serializedName: "subjectName", + type: { + name: "String", + }, + }, + error: { + serializedName: "error", + readOnly: true, + type: { + name: "String", + }, + }, + domainControlValidation: { + serializedName: "domainControlValidation", + type: { + name: "String", + }, + }, + validationToken: { + serializedName: "validationToken", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedCertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + }, + }, +}; + +export const ManagedCertificateCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCertificateCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedCertificate", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfileStatesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadProfileStates", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const WorkloadProfileStatesProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfileStatesProperties", + modelProperties: { + minimumCount: { + serializedName: "minimumCount", + type: { + name: "Number", + }, + }, + maximumCount: { + serializedName: "maximumCount", + type: { + name: "Number", + }, + }, + currentCount: { + serializedName: "currentCount", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprComponentResiliencyPoliciesCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprComponentResiliencyPoliciesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprComponentResiliencyPolicy", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DaprComponentResiliencyPolicyConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprComponentResiliencyPolicyConfiguration", + modelProperties: { + httpRetryPolicy: { + serializedName: "httpRetryPolicy", + type: { + name: "Composite", + className: + "DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration", + }, + }, + timeoutPolicy: { + serializedName: "timeoutPolicy", + type: { + name: "Composite", + className: + "DaprComponentResiliencyPolicyTimeoutPolicyConfiguration", + }, + }, + circuitBreakerPolicy: { + serializedName: "circuitBreakerPolicy", + type: { + name: "Composite", + className: + "DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration", + }, + }, + }, + }, + }; + +export const DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration", + modelProperties: { + maxRetries: { + serializedName: "maxRetries", + type: { + name: "Number", + }, + }, + retryBackOff: { + serializedName: "retryBackOff", + type: { + name: "Composite", + className: + "DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration", + }, + }, + }, + }, + }; + +export const DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration", + modelProperties: { + initialDelayInMilliseconds: { + serializedName: "initialDelayInMilliseconds", + type: { + name: "Number", + }, + }, + maxIntervalInMilliseconds: { + serializedName: "maxIntervalInMilliseconds", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const DaprComponentResiliencyPolicyTimeoutPolicyConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprComponentResiliencyPolicyTimeoutPolicyConfiguration", + modelProperties: { + responseTimeoutInSeconds: { + serializedName: "responseTimeoutInSeconds", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration", + modelProperties: { + consecutiveErrors: { + serializedName: "consecutiveErrors", + type: { + name: "Number", + }, + }, + timeoutInSeconds: { + serializedName: "timeoutInSeconds", + type: { + name: "Number", + }, + }, + intervalInSeconds: { + serializedName: "intervalInSeconds", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const DaprComponentsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponentsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprComponent", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprSubscriptionsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSubscriptionsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprSubscription", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprSubscriptionRoutes: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSubscriptionRoutes", + modelProperties: { + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprSubscriptionRouteRule", + }, + }, + }, + }, + default: { + serializedName: "default", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprSubscriptionRouteRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSubscriptionRouteRule", + modelProperties: { + match: { + serializedName: "match", + type: { + name: "String", + }, + }, + path: { + serializedName: "path", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DaprSubscriptionBulkSubscribeOptions: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DaprSubscriptionBulkSubscribeOptions", + modelProperties: { + enabled: { + defaultValue: false, + serializedName: "enabled", + type: { + name: "Boolean", + }, + }, + maxMessagesCount: { + serializedName: "maxMessagesCount", + type: { + name: "Number", + }, + }, + maxAwaitDurationMs: { + serializedName: "maxAwaitDurationMs", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const HttpRouteConfigProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteConfigProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningErrors: { + serializedName: "provisioningErrors", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpRouteProvisioningErrors", + }, + }, + }, + }, + fqdn: { + serializedName: "fqdn", + readOnly: true, + type: { + name: "String", + }, + }, + customDomains: { + serializedName: "customDomains", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CustomDomain", + }, + }, + }, + }, + rules: { + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpRouteRule", + }, + }, + }, + }, + }, + }, +}; + +export const HttpRouteProvisioningErrors: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteProvisioningErrors", + modelProperties: { + timestamp: { + serializedName: "timestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + message: { + serializedName: "message", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const HttpRouteRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteRule", + modelProperties: { + targets: { + serializedName: "targets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpRouteTarget", + }, + }, + }, + }, + routes: { + serializedName: "routes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "HttpRoute", + }, + }, + }, + }, + description: { + serializedName: "description", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const HttpRouteTarget: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteTarget", + modelProperties: { + containerApp: { + serializedName: "containerApp", + required: true, + type: { + name: "String", + }, + }, + revision: { + serializedName: "revision", + type: { + name: "String", + }, + }, + label: { + serializedName: "label", + type: { + name: "String", + }, + }, + weight: { + constraints: { + InclusiveMaximum: 100, + InclusiveMinimum: 0, + }, + serializedName: "weight", + type: { + name: "Number", }, }, - columns: { - serializedName: "columns", + }, + }, +}; + +export const HttpRoute: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRoute", + modelProperties: { + match: { + serializedName: "match", + type: { + name: "Composite", + className: "HttpRouteMatch", + }, + }, + action: { + serializedName: "action", + type: { + name: "Composite", + className: "HttpRouteAction", + }, + }, + }, + }, +}; + +export const HttpRouteMatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteMatch", + modelProperties: { + prefix: { + serializedName: "prefix", + type: { + name: "String", + }, + }, + path: { + serializedName: "path", + type: { + name: "String", + }, + }, + pathSeparatedPrefix: { + serializedName: "pathSeparatedPrefix", + type: { + name: "String", + }, + }, + caseSensitive: { + serializedName: "caseSensitive", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const HttpRouteAction: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteAction", + modelProperties: { + prefixRewrite: { + serializedName: "prefixRewrite", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const HttpRouteConfigCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "HttpRouteConfigCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "HttpRouteConfig", }, }, }, }, - rows: { - serializedName: "rows", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MaintenanceConfigurationCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaintenanceConfigurationCollection", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "Dictionary", - value: { type: { name: "any" } }, + name: "Composite", + className: "MaintenanceConfigurationResource", }, }, }, }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const ScheduledEntry: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "ScheduledEntry", modelProperties: { - columnName: { - serializedName: "columnName", + weekDay: { + serializedName: "weekDay", + required: true, + type: { + name: "Enum", + allowedValues: [ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + "Everyday", + "Weekend", + ], + }, + }, + startHourUtc: { + serializedName: "startHourUtc", + required: true, + type: { + name: "Number", + }, + }, + durationHours: { + serializedName: "durationHours", + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedEnvironmentStoragesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedEnvironmentStorage", + }, + }, + }, + }, + }, + }, + }; + +export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentStorageProperties", + modelProperties: { + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties", + }, + }, + nfsAzureFile: { + serializedName: "nfsAzureFile", + type: { + name: "Composite", + className: "NfsAzureFileProperties", + }, + }, + }, + }, +}; + +export const NfsAzureFileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NfsAzureFileProperties", + modelProperties: { + server: { + serializedName: "server", type: { name: "String", }, }, - dataType: { - serializedName: "dataType", + accessMode: { + serializedName: "accessMode", type: { name: "String", }, }, - columnType: { - serializedName: "columnType", + shareName: { + serializedName: "shareName", type: { name: "String", }, @@ -3920,52 +8230,129 @@ export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { }, }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const SessionPoolCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "SessionPoolCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionPool", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ManagedServiceIdentityAutoGenerated: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentityAutoGenerated", modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid", + }, + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid", + }, + }, type: { serializedName: "type", + required: true, + type: { + name: "String", + }, + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserAssignedIdentity" }, + }, + }, + }, + }, + }, +}; + +export const ScaleConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScaleConfiguration", + modelProperties: { + maxConcurrentSessions: { + serializedName: "maxConcurrentSessions", type: { name: "Number", }, }, - title: { - serializedName: "title", + readySessionInstances: { + serializedName: "readySessionInstances", type: { - name: "String", + name: "Number", }, }, - description: { - serializedName: "description", + }, + }, +}; + +export const SessionPoolSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SessionPoolSecret", + modelProperties: { + name: { + serializedName: "name", type: { name: "String", }, }, - isVisible: { - serializedName: "isVisible", + value: { + serializedName: "value", type: { - name: "Boolean", + name: "String", }, }, }, }, }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const DynamicPoolConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "DynamicPoolConfiguration", modelProperties: { - message: { - serializedName: "message", + executionType: { + serializedName: "executionType", type: { name: "String", }, }, - statusId: { - serializedName: "statusId", + cooldownPeriodInSeconds: { + serializedName: "cooldownPeriodInSeconds", type: { name: "Number", }, @@ -3974,86 +8361,66 @@ export const DiagnosticsStatus: coreClient.CompositeMapper = { }, }; -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { +export const CustomContainerTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadata", + className: "CustomContainerTemplate", modelProperties: { - providerName: { - serializedName: "providerName", + registryCredentials: { + serializedName: "registryCredentials", type: { - name: "String", + name: "Composite", + className: "SessionRegistryCredentials", }, }, - propertyBag: { - serializedName: "propertyBag", + containers: { + serializedName: "containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", + className: "SessionContainer", }, }, }, }, - }, - }, -}; - -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "String", - }, + ingress: { + serializedName: "ingress", + type: { + name: "Composite", + className: "SessionIngress", }, }, }, - }; + }, +}; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const SessionRegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "SessionRegistryCredentials", modelProperties: { - internal: { - serializedName: "internal", - type: { - name: "Boolean", - }, - }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + server: { + serializedName: "server", type: { name: "String", }, }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + username: { + serializedName: "username", type: { name: "String", }, }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + passwordSecretRef: { + serializedName: "passwordSecretRef", type: { name: "String", }, }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + identity: { + serializedName: "identity", type: { name: "String", }, @@ -4062,41 +8429,81 @@ export const VnetConfiguration: coreClient.CompositeMapper = { }, }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const SessionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "SessionContainer", modelProperties: { - destination: { - serializedName: "destination", + image: { + serializedName: "image", type: { name: "String", }, }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + command: { + serializedName: "command", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + args: { + serializedName: "args", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar", + }, + }, + }, + }, + resources: { + serializedName: "resources", type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "SessionContainerResources", }, }, }, }, }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const SessionContainerResources: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "SessionContainerResources", modelProperties: { - customerId: { - serializedName: "customerId", + cpu: { + serializedName: "cpu", type: { - name: "String", + name: "Number", }, }, - sharedKey: { - serializedName: "sharedKey", + memory: { + serializedName: "memory", type: { name: "String", }, @@ -4105,33 +8512,13 @@ export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { }, }; -export const WorkloadProfile: coreClient.CompositeMapper = { +export const SessionIngress: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfile", + className: "SessionIngress", modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String", - }, - }, - workloadProfileType: { - serializedName: "workloadProfileType", - required: true, - type: { - name: "String", - }, - }, - minimumCount: { - serializedName: "minimumCount", - type: { - name: "Number", - }, - }, - maximumCount: { - serializedName: "maximumCount", + targetPort: { + serializedName: "targetPort", type: { name: "Number", }, @@ -4140,14 +8527,13 @@ export const WorkloadProfile: coreClient.CompositeMapper = { }, }; -export const KedaConfiguration: coreClient.CompositeMapper = { +export const SessionNetworkConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KedaConfiguration", + className: "SessionNetworkConfiguration", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + status: { + serializedName: "status", type: { name: "String", }, @@ -4156,156 +8542,188 @@ export const KedaConfiguration: coreClient.CompositeMapper = { }, }; -export const DaprConfiguration: coreClient.CompositeMapper = { +export const ManagedIdentitySetting: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprConfiguration", + className: "ManagedIdentitySetting", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + identity: { + serializedName: "identity", + required: true, type: { name: "String", }, }, - }, - }, -}; - -export const ManagedEnvironmentPropertiesPeerAuthentication: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedEnvironmentPropertiesPeerAuthentication", - modelProperties: { - mtls: { - serializedName: "mtls", - type: { - name: "Composite", - className: "Mtls", - }, + lifecycle: { + serializedName: "lifecycle", + type: { + name: "String", }, }, }, - }; + }, +}; -export const Mtls: coreClient.CompositeMapper = { +export const SessionPoolUpdatableProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Mtls", + className: "SessionPoolUpdatableProperties", modelProperties: { - enabled: { - serializedName: "enabled", + identity: { + serializedName: "identity", type: { - name: "Boolean", + name: "Composite", + className: "ManagedServiceIdentityAutoGenerated", }, }, - }, - }, -}; - -export const ManagedEnvironmentPropertiesPeerTrafficConfiguration: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedEnvironmentPropertiesPeerTrafficConfiguration", - modelProperties: { - encryption: { - serializedName: "encryption", - type: { - name: "Composite", - className: - "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", - }, + scaleConfiguration: { + serializedName: "properties.scaleConfiguration", + type: { + name: "Composite", + className: "ScaleConfiguration", }, }, - }, - }; - -export const ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: - "ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean", + secrets: { + serializedName: "properties.secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionPoolSecret", + }, }, }, }, + dynamicPoolConfiguration: { + serializedName: "properties.dynamicPoolConfiguration", + type: { + name: "Composite", + className: "DynamicPoolConfiguration", + }, + }, + customContainerTemplate: { + serializedName: "properties.customContainerTemplate", + type: { + name: "Composite", + className: "CustomContainerTemplate", + }, + }, + sessionNetworkConfiguration: { + serializedName: "properties.sessionNetworkConfiguration", + type: { + name: "Composite", + className: "SessionNetworkConfiguration", + }, + }, }, - }; + }, +}; -export const JobConfiguration: coreClient.CompositeMapper = { +export const SourceControlCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfiguration", + className: "SourceControlCollection", modelProperties: { - secrets: { - serializedName: "secrets", + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Secret", + className: "SourceControl", }, }, }, }, - triggerType: { - defaultValue: "Manual", - serializedName: "triggerType", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String", }, }, - replicaTimeout: { - serializedName: "replicaTimeout", - required: true, + }, + }, +}; + +export const GithubActionConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GithubActionConfiguration", + modelProperties: { + registryInfo: { + serializedName: "registryInfo", type: { - name: "Number", + name: "Composite", + className: "RegistryInfo", }, }, - replicaRetryLimit: { - serializedName: "replicaRetryLimit", + azureCredentials: { + serializedName: "azureCredentials", type: { - name: "Number", + name: "Composite", + className: "AzureCredentials", }, }, - manualTriggerConfig: { - serializedName: "manualTriggerConfig", + contextPath: { + serializedName: "contextPath", type: { - name: "Composite", - className: "JobConfigurationManualTriggerConfig", + name: "String", }, }, - scheduleTriggerConfig: { - serializedName: "scheduleTriggerConfig", + dockerfilePath: { + serializedName: "dockerfilePath", type: { - name: "Composite", - className: "JobConfigurationScheduleTriggerConfig", + name: "String", }, }, - eventTriggerConfig: { - serializedName: "eventTriggerConfig", + githubPersonalAccessToken: { + serializedName: "githubPersonalAccessToken", type: { - name: "Composite", - className: "JobConfigurationEventTriggerConfig", + name: "String", }, }, - registries: { - serializedName: "registries", + image: { + serializedName: "image", + type: { + name: "String", + }, + }, + publishType: { + serializedName: "publishType", + type: { + name: "String", + }, + }, + os: { + serializedName: "os", + type: { + name: "String", + }, + }, + runtimeStack: { + serializedName: "runtimeStack", + type: { + name: "String", + }, + }, + runtimeVersion: { + serializedName: "runtimeVersion", + type: { + name: "String", + }, + }, + buildEnvironmentVariables: { + serializedName: "buildEnvironmentVariables", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RegistryCredentials", + className: "EnvironmentVariable", }, }, }, @@ -4314,263 +8732,273 @@ export const JobConfiguration: coreClient.CompositeMapper = { }, }; -export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { +export const RegistryInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationManualTriggerConfig", + className: "RegistryInfo", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", + registryUrl: { + serializedName: "registryUrl", type: { - name: "Number", + name: "String", }, }, - parallelism: { - serializedName: "parallelism", + registryUserName: { + serializedName: "registryUserName", type: { - name: "Number", + name: "String", + }, + }, + registryPassword: { + serializedName: "registryPassword", + type: { + name: "String", }, }, }, }, }; -export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "JobConfigurationScheduleTriggerConfig", - modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", - type: { - name: "Number", - }, +export const AzureCredentials: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureCredentials", + modelProperties: { + clientId: { + serializedName: "clientId", + type: { + name: "String", }, - cronExpression: { - serializedName: "cronExpression", - required: true, - type: { - name: "String", - }, + }, + clientSecret: { + serializedName: "clientSecret", + type: { + name: "String", }, - parallelism: { - serializedName: "parallelism", - type: { - name: "Number", - }, + }, + tenantId: { + serializedName: "tenantId", + type: { + name: "String", + }, + }, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "String", }, }, }, - }; + }, +}; -export const JobConfigurationEventTriggerConfig: coreClient.CompositeMapper = { +export const ListUsagesResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationEventTriggerConfig", + className: "ListUsagesResult", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", - type: { - name: "Number", - }, - }, - parallelism: { - serializedName: "parallelism", + value: { + serializedName: "value", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage", + }, + }, }, }, - scale: { - serializedName: "scale", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "JobScale", + name: "String", }, }, }, }, }; -export const JobScale: coreClient.CompositeMapper = { +export const Usage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobScale", + className: "Usage", modelProperties: { - pollingInterval: { - serializedName: "pollingInterval", + unit: { + defaultValue: "Count", + isConstant: true, + serializedName: "unit", type: { - name: "Number", + name: "String", }, }, - minExecutions: { - defaultValue: 0, - serializedName: "minExecutions", + currentValue: { + serializedName: "currentValue", + required: true, type: { name: "Number", }, }, - maxExecutions: { - defaultValue: 100, - serializedName: "maxExecutions", + limit: { + serializedName: "limit", + required: true, type: { name: "Number", }, }, - rules: { - serializedName: "rules", + name: { + serializedName: "name", + type: { + name: "Composite", + className: "UsageName", + }, + }, + }, + }, +}; + +export const UsageName: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UsageName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + localizedValue: { + serializedName: "localizedValue", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobScaleRule", - }, - }, + name: "String", }, }, }, }, }; -export const JobScaleRule: coreClient.CompositeMapper = { +export const ScgRoute: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobScaleRule", + className: "ScgRoute", modelProperties: { - name: { - serializedName: "name", + id: { + serializedName: "id", + required: true, type: { name: "String", }, }, - type: { - serializedName: "type", + uri: { + serializedName: "uri", + required: true, type: { name: "String", }, }, - metadata: { - serializedName: "metadata", - type: { - name: "Dictionary", - value: { type: { name: "any" } }, - }, - }, - auth: { - serializedName: "auth", + predicates: { + serializedName: "predicates", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ScaleRuleAuth", + name: "String", }, }, }, }, - }, - }, -}; - -export const JobTemplate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobTemplate", - modelProperties: { - initContainers: { - serializedName: "initContainers", + filters: { + serializedName: "filters", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "InitContainer", + name: "String", }, }, }, }, - containers: { - serializedName: "containers", + order: { + serializedName: "order", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Container", - }, - }, + name: "Number", }, }, - volumes: { - serializedName: "volumes", + }, + }, +}; + +export const JavaComponentIngress: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JavaComponentIngress", + modelProperties: { + fqdn: { + serializedName: "fqdn", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Volume", - }, - }, + name: "String", }, }, }, }, }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "JobExecutionNamesCollection", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail", + className: "JobExecutionBase", }, }, }, }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, }, }, }; -export const OperationDetail: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "ProxyResource", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - isDataAction: { - serializedName: "isDataAction", - type: { - name: "Boolean", - }, - }, - display: { - serializedName: "display", + ...Resource.type.modelProperties, + }, + }, +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "OperationDisplay", + name: "Dictionary", + value: { type: { name: "String" } }, }, }, - origin: { - serializedName: "origin", + location: { + serializedName: "location", + required: true, type: { name: "String", }, @@ -4579,31 +9007,41 @@ export const OperationDetail: coreClient.CompositeMapper = { }, }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "PrivateEndpointConnection", modelProperties: { - provider: { - serializedName: "provider", + ...Resource.type.modelProperties, + groupIds: { + serializedName: "properties.groupIds", + readOnly: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - resource: { - serializedName: "resource", + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "String", + name: "Composite", + className: "PrivateEndpoint", }, }, - operation: { - serializedName: "operation", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String", + name: "Composite", + className: "PrivateLinkServiceConnectionState", }, }, - description: { - serializedName: "description", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, @@ -4612,393 +9050,469 @@ export const OperationDisplay: coreClient.CompositeMapper = { }, }; -export const JobsCollection: coreClient.CompositeMapper = { +export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsCollection", + className: "PrivateLinkResource", modelProperties: { - value: { - serializedName: "value", - required: true, + ...Resource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + type: { + name: "String", + }, + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Job", + name: "String", }, }, }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const JobPatchProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobPatchProperties", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } }, +export const ConnectedEnvironmentDaprComponentProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentDaprComponentProperties", + modelProperties: { + ...DaprComponentProperties.type.modelProperties, + provisioningState: { + serializedName: "provisioningState", + readOnly: true, + type: { + name: "String", + }, }, - }, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "JobPatchPropertiesProperties", + deploymentErrors: { + serializedName: "deploymentErrors", + readOnly: true, + type: { + name: "String", + }, }, }, }, + }; + +export const InitContainer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InitContainer", + modelProperties: { + ...BaseContainer.type.modelProperties, + }, }, }; -export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { +export const Container: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchPropertiesProperties", + className: "Container", modelProperties: { - environmentId: { - serializedName: "environmentId", - type: { - name: "String", - }, - }, - configuration: { - serializedName: "configuration", + ...BaseContainer.type.modelProperties, + probes: { + serializedName: "probes", type: { - name: "Composite", - className: "JobConfiguration", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerAppProbe", + }, + }, }, }, - template: { - serializedName: "template", + }, + }, +}; + +export const SpringCloudGatewayComponent: coreClient.CompositeMapper = { + serializedName: "SpringCloudGateway", + type: { + name: "Composite", + className: "SpringCloudGatewayComponent", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: + JavaComponentProperties.type.polymorphicDiscriminator, + modelProperties: { + ...JavaComponentProperties.type.modelProperties, + ingress: { + serializedName: "ingress", type: { name: "Composite", - className: "JobTemplate", + className: "JavaComponentIngress", }, }, - outboundIpAddresses: { - serializedName: "outboundIpAddresses", + springCloudGatewayRoutes: { + serializedName: "springCloudGatewayRoutes", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "ScgRoute", }, }, }, }, - eventStreamEndpoint: { - serializedName: "eventStreamEndpoint", + }, + }, +}; + +export const SpringBootAdminComponent: coreClient.CompositeMapper = { + serializedName: "SpringBootAdmin", + type: { + name: "Composite", + className: "SpringBootAdminComponent", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: + JavaComponentProperties.type.polymorphicDiscriminator, + modelProperties: { + ...JavaComponentProperties.type.modelProperties, + ingress: { + serializedName: "ingress", type: { - name: "String", + name: "Composite", + className: "JavaComponentIngress", }, }, }, }, }; -export const JobExecutionTemplate: coreClient.CompositeMapper = { +export const NacosComponent: coreClient.CompositeMapper = { + serializedName: "Nacos", type: { name: "Composite", - className: "JobExecutionTemplate", + className: "NacosComponent", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: + JavaComponentProperties.type.polymorphicDiscriminator, modelProperties: { - containers: { - serializedName: "containers", + ...JavaComponentProperties.type.modelProperties, + ingress: { + serializedName: "ingress", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionContainer", - }, - }, + name: "Composite", + className: "JavaComponentIngress", }, }, - initContainers: { - serializedName: "initContainers", + }, + }, +}; + +export const SpringCloudEurekaComponent: coreClient.CompositeMapper = { + serializedName: "SpringCloudEureka", + type: { + name: "Composite", + className: "SpringCloudEurekaComponent", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: + JavaComponentProperties.type.polymorphicDiscriminator, + modelProperties: { + ...JavaComponentProperties.type.modelProperties, + ingress: { + serializedName: "ingress", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionContainer", - }, - }, + name: "Composite", + className: "JavaComponentIngress", }, }, }, }, }; -export const JobExecutionContainer: coreClient.CompositeMapper = { +export const SpringCloudConfigComponent: coreClient.CompositeMapper = { + serializedName: "SpringCloudConfig", type: { name: "Composite", - className: "JobExecutionContainer", + className: "SpringCloudConfigComponent", + uberParent: "JavaComponentProperties", + polymorphicDiscriminator: + JavaComponentProperties.type.polymorphicDiscriminator, modelProperties: { - image: { - serializedName: "image", + ...JavaComponentProperties.type.modelProperties, + }, + }, +}; + +export const AppResiliency: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AppResiliency", + modelProperties: { + ...ProxyResource.type.modelProperties, + timeoutPolicy: { + serializedName: "properties.timeoutPolicy", type: { - name: "String", + name: "Composite", + className: "TimeoutPolicy", }, }, - name: { - serializedName: "name", + httpRetryPolicy: { + serializedName: "properties.httpRetryPolicy", type: { - name: "String", + name: "Composite", + className: "HttpRetryPolicy", }, }, - command: { - serializedName: "command", + tcpRetryPolicy: { + serializedName: "properties.tcpRetryPolicy", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "TcpRetryPolicy", }, }, - args: { - serializedName: "args", + circuitBreakerPolicy: { + serializedName: "properties.circuitBreakerPolicy", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "CircuitBreakerPolicy", }, }, - env: { - serializedName: "env", + httpConnectionPool: { + serializedName: "properties.httpConnectionPool", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar", - }, - }, + name: "Composite", + className: "HttpConnectionPool", }, }, - resources: { - serializedName: "resources", + tcpConnectionPool: { + serializedName: "properties.tcpConnectionPool", type: { name: "Composite", - className: "ContainerResources", + className: "TcpConnectionPool", }, }, }, }, }; -export const JobExecutionBase: coreClient.CompositeMapper = { +export const AuthConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionBase", + className: "AuthConfig", modelProperties: { - name: { - serializedName: "name", + ...ProxyResource.type.modelProperties, + platform: { + serializedName: "properties.platform", type: { - name: "String", + name: "Composite", + className: "AuthPlatform", }, }, - id: { - serializedName: "id", + globalValidation: { + serializedName: "properties.globalValidation", type: { - name: "String", + name: "Composite", + className: "GlobalValidation", + }, + }, + identityProviders: { + serializedName: "properties.identityProviders", + type: { + name: "Composite", + className: "IdentityProviders", + }, + }, + login: { + serializedName: "properties.login", + type: { + name: "Composite", + className: "Login", + }, + }, + httpSettings: { + serializedName: "properties.httpSettings", + type: { + name: "Composite", + className: "HttpSettings", + }, + }, + encryptionSettings: { + serializedName: "properties.encryptionSettings", + type: { + name: "Composite", + className: "EncryptionSettings", }, }, }, }, }; -export const ContainerAppJobExecutions: coreClient.CompositeMapper = { +export const AvailableWorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppJobExecutions", + className: "AvailableWorkloadProfile", modelProperties: { - value: { - serializedName: "value", - required: true, + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecution", - }, - }, + name: "String", }, }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "AvailableWorkloadProfileProperties", }, }, }, }, }; -export const JobExecution: coreClient.CompositeMapper = { +export const BuildResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecution", + className: "BuildResource", modelProperties: { - name: { - serializedName: "name", + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, }, - id: { - serializedName: "id", + buildStatus: { + serializedName: "properties.buildStatus", + readOnly: true, type: { name: "String", }, }, - type: { - serializedName: "type", + destinationContainerRegistry: { + serializedName: "properties.destinationContainerRegistry", type: { - name: "String", + name: "Composite", + className: "ContainerRegistryWithCustomImage", }, }, - status: { - serializedName: "properties.status", - readOnly: true, + configuration: { + serializedName: "properties.configuration", type: { - name: "String", + name: "Composite", + className: "BuildConfiguration", }, }, - startTime: { - serializedName: "properties.startTime", + uploadEndpoint: { + serializedName: "properties.uploadEndpoint", + readOnly: true, type: { - name: "DateTime", + name: "String", }, }, - endTime: { - serializedName: "properties.endTime", + logStreamEndpoint: { + serializedName: "properties.logStreamEndpoint", + readOnly: true, type: { - name: "DateTime", + name: "String", }, }, - template: { - serializedName: "properties.template", + tokenEndpoint: { + serializedName: "properties.tokenEndpoint", + readOnly: true, type: { - name: "Composite", - className: "JobExecutionTemplate", + name: "String", }, }, }, }, }; -export const JobSecretsCollection: coreClient.CompositeMapper = { +export const ConnectedEnvironmentDaprComponent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobSecretsCollection", + className: "ConnectedEnvironmentDaprComponent", modelProperties: { - value: { - serializedName: "value", - required: true, + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret", - }, - }, + name: "Composite", + className: "ConnectedEnvironmentDaprComponentProperties", }, }, }, }, }; -export const ManagedEnvironmentsCollection: coreClient.CompositeMapper = { +export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironmentsCollection", + className: "ConnectedEnvironmentStorage", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedEnvironment", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "ConnectedEnvironmentStorageProperties", }, }, }, }, }; -export const ManagedCertificateProperties: coreClient.CompositeMapper = { +export const ContainerAppsBuildResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCertificateProperties", + className: "ContainerAppsBuildResource", modelProperties: { + ...ProxyResource.type.modelProperties, provisioningState: { - serializedName: "provisioningState", + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String", }, }, - subjectName: { - serializedName: "subjectName", + buildStatus: { + serializedName: "properties.buildStatus", + readOnly: true, type: { name: "String", }, }, - error: { - serializedName: "error", - readOnly: true, + destinationContainerRegistry: { + serializedName: "properties.destinationContainerRegistry", type: { - name: "String", + name: "Composite", + className: "ContainerRegistryWithCustomImage", }, }, - domainControlValidation: { - serializedName: "domainControlValidation", + configuration: { + serializedName: "properties.configuration", type: { - name: "String", + name: "Composite", + className: "ContainerAppsBuildConfiguration", }, }, - validationToken: { - serializedName: "validationToken", + logStreamEndpoint: { + serializedName: "properties.logStreamEndpoint", readOnly: true, type: { name: "String", @@ -5008,166 +9522,130 @@ export const ManagedCertificateProperties: coreClient.CompositeMapper = { }, }; -export const ManagedCertificatePatch: coreClient.CompositeMapper = { +export const ContainerAppsPatchResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCertificatePatch", + className: "ContainerAppsPatchResource", modelProperties: { - tags: { - serializedName: "tags", + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "Dictionary", - value: { type: { name: "String" } }, + name: "Composite", + className: "PatchProperties", }, }, }, }, }; -export const ManagedCertificateCollection: coreClient.CompositeMapper = { +export const LabelHistory: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCertificateCollection", + className: "LabelHistory", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedCertificate", - }, - }, - }, - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "LabelHistoryProperties", }, }, }, }, }; -export const WorkloadProfileStatesCollection: coreClient.CompositeMapper = { +export const Revision: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStatesCollection", + className: "Revision", modelProperties: { - value: { - serializedName: "value", - required: true, + ...ProxyResource.type.modelProperties, + createdTime: { + serializedName: "properties.createdTime", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkloadProfileStates", - }, - }, + name: "DateTime", }, }, - nextLink: { - serializedName: "nextLink", + lastActiveTime: { + serializedName: "properties.lastActiveTime", readOnly: true, type: { - name: "String", + name: "DateTime", }, }, - }, - }, -}; - -export const WorkloadProfileStatesProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadProfileStatesProperties", - modelProperties: { - minimumCount: { - serializedName: "minimumCount", + fqdn: { + serializedName: "properties.fqdn", + readOnly: true, type: { - name: "Number", + name: "String", }, }, - maximumCount: { - serializedName: "maximumCount", + template: { + serializedName: "properties.template", type: { - name: "Number", + name: "Composite", + className: "Template", }, }, - currentCount: { - serializedName: "currentCount", + active: { + serializedName: "properties.active", + readOnly: true, type: { - name: "Number", + name: "Boolean", }, }, - }, - }, -}; - -export const ManagedEnvironmentStoragesCollection: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ManagedEnvironmentStoragesCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedEnvironmentStorage", - }, - }, - }, + replicas: { + serializedName: "properties.replicas", + readOnly: true, + type: { + name: "Number", }, }, - }, - }; - -export const ManagedEnvironmentStorageProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentStorageProperties", - modelProperties: { - azureFile: { - serializedName: "azureFile", + trafficWeight: { + serializedName: "properties.trafficWeight", + readOnly: true, type: { - name: "Composite", - className: "AzureFileProperties", + name: "Number", }, }, - }, - }, -}; - -export const SourceControlCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SourceControlCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + labels: { + serializedName: "properties.labels", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SourceControl", + name: "String", }, }, }, }, - nextLink: { - serializedName: "nextLink", + provisioningError: { + serializedName: "properties.provisioningError", + readOnly: true, + type: { + name: "String", + }, + }, + healthState: { + serializedName: "properties.healthState", + readOnly: true, + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String", + }, + }, + runningState: { + serializedName: "properties.runningState", readOnly: true, type: { name: "String", @@ -5177,303 +9655,379 @@ export const SourceControlCollection: coreClient.CompositeMapper = { }, }; -export const GithubActionConfiguration: coreClient.CompositeMapper = { +export const Replica: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GithubActionConfiguration", + className: "Replica", modelProperties: { - registryInfo: { - serializedName: "registryInfo", + ...ProxyResource.type.modelProperties, + createdTime: { + serializedName: "properties.createdTime", + readOnly: true, type: { - name: "Composite", - className: "RegistryInfo", + name: "DateTime", }, }, - azureCredentials: { - serializedName: "azureCredentials", + runningState: { + serializedName: "properties.runningState", + readOnly: true, type: { - name: "Composite", - className: "AzureCredentials", + name: "String", }, }, - contextPath: { - serializedName: "contextPath", + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, type: { name: "String", }, }, - githubPersonalAccessToken: { - serializedName: "githubPersonalAccessToken", + containers: { + serializedName: "properties.containers", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer", + }, + }, }, }, - image: { - serializedName: "image", + initContainers: { + serializedName: "properties.initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer", + }, + }, + }, + }, + }, + }, +}; + +export const Diagnostics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Diagnostics", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "DiagnosticsProperties", }, }, - publishType: { - serializedName: "publishType", + }, + }, +}; + +export const DotNetComponent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DotNetComponent", + modelProperties: { + ...ProxyResource.type.modelProperties, + componentType: { + serializedName: "properties.componentType", type: { name: "String", }, }, - os: { - serializedName: "os", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, }, - runtimeStack: { - serializedName: "runtimeStack", + configurations: { + serializedName: "properties.configurations", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DotNetComponentConfigurationProperty", + }, + }, }, }, - runtimeVersion: { - serializedName: "runtimeVersion", + serviceBinds: { + serializedName: "properties.serviceBinds", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DotNetComponentServiceBind", + }, + }, }, }, }, }, }; -export const RegistryInfo: coreClient.CompositeMapper = { +export const JavaComponent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryInfo", + className: "JavaComponent", modelProperties: { - registryUrl: { - serializedName: "registryUrl", + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "JavaComponentProperties", }, }, - registryUserName: { - serializedName: "registryUserName", + }, + }, +}; + +export const LogicApp: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicApp", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Dictionary", + value: { type: { name: "any" } }, }, }, - registryPassword: { - serializedName: "registryPassword", + }, + }, +}; + +export const WorkloadProfileStates: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadProfileStates", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "WorkloadProfileStatesProperties", }, }, }, }, }; -export const AzureCredentials: coreClient.CompositeMapper = { +export const DaprComponentResiliencyPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureCredentials", + className: "DaprComponentResiliencyPolicy", modelProperties: { - clientId: { - serializedName: "clientId", + ...ProxyResource.type.modelProperties, + inboundPolicy: { + serializedName: "properties.inboundPolicy", type: { - name: "String", + name: "Composite", + className: "DaprComponentResiliencyPolicyConfiguration", }, }, - clientSecret: { - serializedName: "clientSecret", + outboundPolicy: { + serializedName: "properties.outboundPolicy", type: { - name: "String", + name: "Composite", + className: "DaprComponentResiliencyPolicyConfiguration", }, }, - tenantId: { - serializedName: "tenantId", + }, + }, +}; + +export const DaprComponent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprComponent", + modelProperties: { + ...ProxyResource.type.modelProperties, + componentType: { + serializedName: "properties.componentType", type: { name: "String", }, }, - kind: { - serializedName: "kind", + version: { + serializedName: "properties.version", type: { name: "String", }, }, - subscriptionId: { - serializedName: "subscriptionId", + ignoreErrors: { + defaultValue: false, + serializedName: "properties.ignoreErrors", + type: { + name: "Boolean", + }, + }, + initTimeout: { + serializedName: "properties.initTimeout", type: { name: "String", }, }, - }, - }, -}; - -export const ListUsagesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ListUsagesResult", - modelProperties: { - value: { - serializedName: "value", + secrets: { + serializedName: "properties.secrets", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Usage", + className: "Secret", }, }, }, }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const Usage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Usage", - modelProperties: { - unit: { - defaultValue: "Count", - isConstant: true, - serializedName: "unit", + secretStoreComponent: { + serializedName: "properties.secretStoreComponent", type: { name: "String", }, }, - currentValue: { - serializedName: "currentValue", - required: true, + metadata: { + serializedName: "properties.metadata", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprMetadata", + }, + }, }, }, - limit: { - serializedName: "limit", - required: true, + scopes: { + serializedName: "properties.scopes", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - name: { - serializedName: "name", + serviceComponentBind: { + serializedName: "properties.serviceComponentBind", type: { - name: "Composite", - className: "UsageName", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprComponentServiceBinding", + }, + }, }, }, }, }, }; -export const UsageName: coreClient.CompositeMapper = { +export const DaprSubscription: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UsageName", + className: "DaprSubscription", modelProperties: { - value: { - serializedName: "value", + ...ProxyResource.type.modelProperties, + pubsubName: { + serializedName: "properties.pubsubName", type: { name: "String", }, }, - localizedValue: { - serializedName: "localizedValue", + topic: { + serializedName: "properties.topic", type: { name: "String", }, }, - }, - }, -}; - -export const JobExecutionNamesCollection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobExecutionNamesCollection", - modelProperties: { - value: { - serializedName: "value", - required: true, + deadLetterTopic: { + serializedName: "properties.deadLetterTopic", + type: { + name: "String", + }, + }, + routes: { + serializedName: "properties.routes", + type: { + name: "Composite", + className: "DaprSubscriptionRoutes", + }, + }, + scopes: { + serializedName: "properties.scopes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "JobExecutionBase", + name: "String", }, }, }, }, - }, - }, -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, - }, -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", + metadata: { + serializedName: "properties.metadata", type: { name: "Dictionary", value: { type: { name: "String" } }, }, }, - location: { - serializedName: "location", - required: true, + bulkSubscribe: { + serializedName: "properties.bulkSubscribe", type: { - name: "String", + name: "Composite", + className: "DaprSubscriptionBulkSubscribeOptions", }, }, }, }, }; -export const InitContainer: coreClient.CompositeMapper = { +export const HttpRouteConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InitContainer", + className: "HttpRouteConfig", modelProperties: { - ...BaseContainer.type.modelProperties, + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "HttpRouteConfigProperties", + }, + }, }, }, }; -export const Container: coreClient.CompositeMapper = { +export const MaintenanceConfigurationResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Container", + className: "MaintenanceConfigurationResource", modelProperties: { - ...BaseContainer.type.modelProperties, - probes: { - serializedName: "probes", + ...ProxyResource.type.modelProperties, + scheduledEntries: { + serializedName: "properties.scheduledEntries", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ContainerAppProbe", + className: "ScheduledEntry", }, }, }, @@ -5482,444 +10036,378 @@ export const Container: coreClient.CompositeMapper = { }, }; -export const AuthConfig: coreClient.CompositeMapper = { +export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthConfig", + className: "ManagedEnvironmentStorage", modelProperties: { ...ProxyResource.type.modelProperties, - platform: { - serializedName: "properties.platform", - type: { - name: "Composite", - className: "AuthPlatform", - }, - }, - globalValidation: { - serializedName: "properties.globalValidation", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "GlobalValidation", + className: "ManagedEnvironmentStorageProperties", }, }, - identityProviders: { - serializedName: "properties.identityProviders", + }, + }, +}; + +export const SourceControl: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceControl", + modelProperties: { + ...ProxyResource.type.modelProperties, + operationState: { + serializedName: "properties.operationState", + readOnly: true, type: { - name: "Composite", - className: "IdentityProviders", + name: "String", }, }, - login: { - serializedName: "properties.login", + repoUrl: { + serializedName: "properties.repoUrl", type: { - name: "Composite", - className: "Login", + name: "String", }, }, - httpSettings: { - serializedName: "properties.httpSettings", + branch: { + serializedName: "properties.branch", type: { - name: "Composite", - className: "HttpSettings", + name: "String", }, }, - encryptionSettings: { - serializedName: "properties.encryptionSettings", + githubActionConfiguration: { + serializedName: "properties.githubActionConfiguration", type: { name: "Composite", - className: "EncryptionSettings", + className: "GithubActionConfiguration", }, }, }, }, }; -export const AvailableWorkloadProfile: coreClient.CompositeMapper = { +export const BuilderResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableWorkloadProfile", + className: "BuilderResource", modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", type: { - name: "String", + name: "Composite", + className: "ManagedServiceIdentity", }, }, - properties: { - serializedName: "properties", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "AvailableWorkloadProfileProperties", + name: "String", }, }, - }, - }, -}; - -export const BillingMeter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BillingMeter", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + environmentId: { + serializedName: "properties.environmentId", type: { name: "String", }, }, - properties: { - serializedName: "properties", + containerRegistries: { + serializedName: "properties.containerRegistries", type: { - name: "Composite", - className: "BillingMeterProperties", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerRegistry", + }, + }, }, }, }, }, }; -export const DaprComponent: coreClient.CompositeMapper = { +export const ConnectedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprComponent", + className: "ConnectedEnvironment", modelProperties: { - ...ProxyResource.type.modelProperties, - componentType: { - serializedName: "properties.componentType", + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "String", + name: "Composite", + className: "ExtendedLocation", }, }, - version: { - serializedName: "properties.version", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, }, - ignoreErrors: { - defaultValue: false, - serializedName: "properties.ignoreErrors", - type: { - name: "Boolean", - }, - }, - initTimeout: { - serializedName: "properties.initTimeout", + deploymentErrors: { + serializedName: "properties.deploymentErrors", + readOnly: true, type: { name: "String", }, }, - secrets: { - serializedName: "properties.secrets", + defaultDomain: { + serializedName: "properties.defaultDomain", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Secret", - }, - }, + name: "String", }, }, - secretStoreComponent: { - serializedName: "properties.secretStoreComponent", + staticIp: { + serializedName: "properties.staticIp", type: { name: "String", }, }, - metadata: { - serializedName: "properties.metadata", + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DaprMetadata", - }, - }, + name: "String", }, }, - scopes: { - serializedName: "properties.scopes", + customDomainConfiguration: { + serializedName: "properties.customDomainConfiguration", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "CustomDomainConfiguration", }, }, }, }, }; -export const ConnectedEnvironmentStorage: coreClient.CompositeMapper = { +export const Certificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorage", + className: "Certificate", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties", + className: "CertificateProperties", }, }, }, }, }; -export const Revision: coreClient.CompositeMapper = { +export const ContainerApp: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Revision", + className: "ContainerApp", modelProperties: { - ...ProxyResource.type.modelProperties, - createdTime: { - serializedName: "properties.createdTime", - readOnly: true, + ...TrackedResource.type.modelProperties, + extendedLocation: { + serializedName: "extendedLocation", type: { - name: "DateTime", + name: "Composite", + className: "ExtendedLocation", }, }, - lastActiveTime: { - serializedName: "properties.lastActiveTime", - readOnly: true, + identity: { + serializedName: "identity", type: { - name: "DateTime", + name: "Composite", + className: "ManagedServiceIdentity", }, }, - fqdn: { - serializedName: "properties.fqdn", - readOnly: true, + managedBy: { + serializedName: "managedBy", type: { name: "String", }, }, - template: { - serializedName: "properties.template", + kind: { + serializedName: "kind", type: { - name: "Composite", - className: "Template", + name: "String", }, }, - active: { - serializedName: "properties.active", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "Boolean", + name: "String", }, }, - replicas: { - serializedName: "properties.replicas", + deploymentErrors: { + serializedName: "properties.deploymentErrors", readOnly: true, type: { - name: "Number", + name: "String", }, }, - trafficWeight: { - serializedName: "properties.trafficWeight", - readOnly: true, + managedEnvironmentId: { + serializedName: "properties.managedEnvironmentId", type: { - name: "Number", + name: "String", }, }, - provisioningError: { - serializedName: "properties.provisioningError", - readOnly: true, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String", + }, + }, + workloadProfileName: { + serializedName: "properties.workloadProfileName", type: { name: "String", }, }, - healthState: { - serializedName: "properties.healthState", - readOnly: true, + patchingConfiguration: { + serializedName: "properties.patchingConfiguration", type: { - name: "String", + name: "Composite", + className: "ContainerAppPropertiesPatchingConfiguration", }, }, - provisioningState: { - serializedName: "properties.provisioningState", + latestRevisionName: { + serializedName: "properties.latestRevisionName", readOnly: true, type: { name: "String", }, }, - runningState: { - serializedName: "properties.runningState", + latestReadyRevisionName: { + serializedName: "properties.latestReadyRevisionName", readOnly: true, type: { name: "String", }, }, - }, - }, -}; - -export const Replica: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Replica", - modelProperties: { - ...ProxyResource.type.modelProperties, - createdTime: { - serializedName: "properties.createdTime", + latestRevisionFqdn: { + serializedName: "properties.latestRevisionFqdn", readOnly: true, type: { - name: "DateTime", + name: "String", }, }, - runningState: { - serializedName: "properties.runningState", + customDomainVerificationId: { + serializedName: "properties.customDomainVerificationId", readOnly: true, type: { name: "String", }, }, - runningStateDetails: { - serializedName: "properties.runningStateDetails", - readOnly: true, + configuration: { + serializedName: "properties.configuration", type: { - name: "String", + name: "Composite", + className: "Configuration", }, }, - containers: { - serializedName: "properties.containers", + template: { + serializedName: "properties.template", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ReplicaContainer", - }, - }, + name: "Composite", + className: "Template", }, }, - initContainers: { - serializedName: "properties.initContainers", + outboundIpAddresses: { + serializedName: "properties.outboundIpAddresses", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ReplicaContainer", + name: "String", }, }, }, }, - }, - }, -}; - -export const Diagnostics: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Diagnostics", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, type: { - name: "Composite", - className: "DiagnosticsProperties", + name: "String", }, }, }, }, }; -export const WorkloadProfileStates: coreClient.CompositeMapper = { +export const ContainerAppAuthToken: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadProfileStates", + className: "ContainerAppAuthToken", modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + ...TrackedResource.type.modelProperties, + token: { + serializedName: "properties.token", + readOnly: true, type: { - name: "Composite", - className: "WorkloadProfileStatesProperties", + name: "String", }, }, - }, - }, -}; - -export const ManagedEnvironmentStorage: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedEnvironmentStorage", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + expires: { + serializedName: "properties.expires", + readOnly: true, type: { - name: "Composite", - className: "ManagedEnvironmentStorageProperties", + name: "DateTime", }, }, }, }, }; -export const SourceControl: coreClient.CompositeMapper = { +export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceControl", + className: "ManagedEnvironment", modelProperties: { - ...ProxyResource.type.modelProperties, - operationState: { - serializedName: "properties.operationState", - readOnly: true, + ...TrackedResource.type.modelProperties, + kind: { + serializedName: "kind", type: { name: "String", }, }, - repoUrl: { - serializedName: "properties.repoUrl", + identity: { + serializedName: "identity", type: { - name: "String", + name: "Composite", + className: "ManagedServiceIdentity", }, }, - branch: { - serializedName: "properties.branch", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, }, - githubActionConfiguration: { - serializedName: "properties.githubActionConfiguration", + daprAIInstrumentationKey: { + serializedName: "properties.daprAIInstrumentationKey", type: { - name: "Composite", - className: "GithubActionConfiguration", + name: "String", }, }, - }, - }, -}; - -export const ConnectedEnvironment: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ConnectedEnvironment", - modelProperties: { - ...TrackedResource.type.modelProperties, - extendedLocation: { - serializedName: "extendedLocation", + daprAIConnectionString: { + serializedName: "properties.daprAIConnectionString", type: { - name: "Composite", - className: "ExtendedLocation", + name: "String", }, }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + vnetConfiguration: { + serializedName: "properties.vnetConfiguration", type: { - name: "String", + name: "Composite", + className: "VnetConfiguration", }, }, deploymentErrors: { @@ -5938,48 +10426,136 @@ export const ConnectedEnvironment: coreClient.CompositeMapper = { }, staticIp: { serializedName: "properties.staticIp", + readOnly: true, type: { name: "String", }, }, - daprAIConnectionString: { - serializedName: "properties.daprAIConnectionString", + appLogsConfiguration: { + serializedName: "properties.appLogsConfiguration", + type: { + name: "Composite", + className: "AppLogsConfiguration", + }, + }, + appInsightsConfiguration: { + serializedName: "properties.appInsightsConfiguration", + type: { + name: "Composite", + className: "AppInsightsConfiguration", + }, + }, + openTelemetryConfiguration: { + serializedName: "properties.openTelemetryConfiguration", + type: { + name: "Composite", + className: "OpenTelemetryConfiguration", + }, + }, + zoneRedundant: { + serializedName: "properties.zoneRedundant", + type: { + name: "Boolean", + }, + }, + availabilityZones: { + serializedName: "properties.availabilityZones", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + customDomainConfiguration: { + serializedName: "properties.customDomainConfiguration", + type: { + name: "Composite", + className: "CustomDomainConfiguration", + }, + }, + eventStreamEndpoint: { + serializedName: "properties.eventStreamEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + workloadProfiles: { + serializedName: "properties.workloadProfiles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkloadProfile", + }, + }, + }, + }, + kedaConfiguration: { + serializedName: "properties.kedaConfiguration", + type: { + name: "Composite", + className: "KedaConfiguration", + }, + }, + daprConfiguration: { + serializedName: "properties.daprConfiguration", + type: { + name: "Composite", + className: "DaprConfiguration", + }, + }, + infrastructureResourceGroup: { + serializedName: "properties.infrastructureResourceGroup", type: { name: "String", }, }, - customDomainConfiguration: { - serializedName: "properties.customDomainConfiguration", + peerAuthentication: { + serializedName: "properties.peerAuthentication", + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication", + }, + }, + peerTrafficConfiguration: { + serializedName: "properties.peerTrafficConfiguration", + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerTrafficConfiguration", + }, + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, type: { - name: "Composite", - className: "CustomDomainConfiguration", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + }, + }, }, }, - }, - }, -}; - -export const Certificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Certificate", - modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", type: { - name: "Composite", - className: "CertificateProperties", + name: "String", }, }, }, }, }; -export const ContainerApp: coreClient.CompositeMapper = { +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerApp", + className: "Job", modelProperties: { ...TrackedResource.type.modelProperties, extendedLocation: { @@ -5996,12 +10572,6 @@ export const ContainerApp: coreClient.CompositeMapper = { className: "ManagedServiceIdentity", }, }, - managedBy: { - serializedName: "managedBy", - type: { - name: "String", - }, - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -6009,8 +10579,9 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String", }, }, - managedEnvironmentId: { - serializedName: "properties.managedEnvironmentId", + runningState: { + serializedName: "properties.runningState", + readOnly: true, type: { name: "String", }, @@ -6027,46 +10598,18 @@ export const ContainerApp: coreClient.CompositeMapper = { name: "String", }, }, - latestRevisionName: { - serializedName: "properties.latestRevisionName", - readOnly: true, - type: { - name: "String", - }, - }, - latestReadyRevisionName: { - serializedName: "properties.latestReadyRevisionName", - readOnly: true, - type: { - name: "String", - }, - }, - latestRevisionFqdn: { - serializedName: "properties.latestRevisionFqdn", - readOnly: true, - type: { - name: "String", - }, - }, - customDomainVerificationId: { - serializedName: "properties.customDomainVerificationId", - readOnly: true, - type: { - name: "String", - }, - }, configuration: { serializedName: "properties.configuration", type: { name: "Composite", - className: "Configuration", + className: "JobConfiguration", }, }, template: { serializedName: "properties.template", type: { name: "Composite", - className: "Template", + className: "JobTemplate", }, }, outboundIpAddresses: { @@ -6092,10 +10635,27 @@ export const ContainerApp: coreClient.CompositeMapper = { }, }; -export const ContainerAppAuthToken: coreClient.CompositeMapper = { +export const ManagedCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppAuthToken", + className: "ManagedCertificate", + modelProperties: { + ...TrackedResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ManagedCertificateProperties", + }, + }, + }, + }, +}; + +export const EnvironmentAuthToken: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EnvironmentAuthToken", modelProperties: { ...TrackedResource.type.modelProperties, token: { @@ -6116,203 +10676,335 @@ export const ContainerAppAuthToken: coreClient.CompositeMapper = { }, }; -export const ManagedEnvironment: coreClient.CompositeMapper = { +export const SessionPool: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedEnvironment", + className: "SessionPool", modelProperties: { ...TrackedResource.type.modelProperties, - kind: { - serializedName: "kind", + identity: { + serializedName: "identity", type: { - name: "String", + name: "Composite", + className: "ManagedServiceIdentityAutoGenerated", }, }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + environmentId: { + serializedName: "properties.environmentId", type: { name: "String", }, }, - daprAIInstrumentationKey: { - serializedName: "properties.daprAIInstrumentationKey", + containerType: { + serializedName: "properties.containerType", type: { name: "String", }, }, - daprAIConnectionString: { - serializedName: "properties.daprAIConnectionString", + poolManagementType: { + serializedName: "properties.poolManagementType", type: { name: "String", }, }, - vnetConfiguration: { - serializedName: "properties.vnetConfiguration", + nodeCount: { + serializedName: "properties.nodeCount", + readOnly: true, type: { - name: "Composite", - className: "VnetConfiguration", + name: "Number", }, }, - deploymentErrors: { - serializedName: "properties.deploymentErrors", - readOnly: true, + scaleConfiguration: { + serializedName: "properties.scaleConfiguration", type: { - name: "String", + name: "Composite", + className: "ScaleConfiguration", }, }, - defaultDomain: { - serializedName: "properties.defaultDomain", - readOnly: true, + secrets: { + serializedName: "properties.secrets", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SessionPoolSecret", + }, + }, }, }, - staticIp: { - serializedName: "properties.staticIp", - readOnly: true, + dynamicPoolConfiguration: { + serializedName: "properties.dynamicPoolConfiguration", type: { - name: "String", + name: "Composite", + className: "DynamicPoolConfiguration", }, }, - appLogsConfiguration: { - serializedName: "properties.appLogsConfiguration", + customContainerTemplate: { + serializedName: "properties.customContainerTemplate", type: { name: "Composite", - className: "AppLogsConfiguration", + className: "CustomContainerTemplate", }, }, - zoneRedundant: { - serializedName: "properties.zoneRedundant", + sessionNetworkConfiguration: { + serializedName: "properties.sessionNetworkConfiguration", type: { - name: "Boolean", + name: "Composite", + className: "SessionNetworkConfiguration", }, }, - customDomainConfiguration: { - serializedName: "properties.customDomainConfiguration", + poolManagementEndpoint: { + serializedName: "properties.poolManagementEndpoint", + readOnly: true, type: { - name: "Composite", - className: "CustomDomainConfiguration", + name: "String", }, }, - eventStreamEndpoint: { - serializedName: "properties.eventStreamEndpoint", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String", }, }, - workloadProfiles: { - serializedName: "properties.workloadProfiles", + managedIdentitySettings: { + serializedName: "properties.managedIdentitySettings", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkloadProfile", + className: "ManagedIdentitySetting", }, }, }, }, - kedaConfiguration: { - serializedName: "properties.kedaConfiguration", + }, + }, +}; + +export const BuildersCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Composite", - className: "KedaConfiguration", + name: "String", }, }, - daprConfiguration: { - serializedName: "properties.daprConfiguration", + }, + }, +}; + +export const BuildersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "DaprConfiguration", + name: "String", + }, + }, + }, + }, +}; + +export const BuildersDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const BuildsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const BuildsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ConnectedEnvironmentsCertificatesDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentsCertificatesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ConnectedEnvironmentsCertificatesUpdateHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentsCertificatesUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, - infrastructureResourceGroup: { - serializedName: "properties.infrastructureResourceGroup", - type: { - name: "String", + }, + }; + +export const ConnectedEnvironmentsDaprComponentsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentsDaprComponentsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, - peerAuthentication: { - serializedName: "properties.peerAuthentication", - type: { - name: "Composite", - className: "ManagedEnvironmentPropertiesPeerAuthentication", + }, + }; + +export const ConnectedEnvironmentsStoragesDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ConnectedEnvironmentsStoragesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, - peerTrafficConfiguration: { - serializedName: "properties.peerTrafficConfiguration", + }, + }; + +export const ContainerAppsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { - name: "Composite", - className: "ManagedEnvironmentPropertiesPeerTrafficConfiguration", + name: "String", }, }, }, }, }; -export const Job: coreClient.CompositeMapper = { +export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Job", + className: "ContainerAppsUpdateHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + location: { + serializedName: "location", type: { name: "String", }, }, - environmentId: { - serializedName: "properties.environmentId", + }, + }, +}; + +export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStartHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String", }, }, - workloadProfileName: { - serializedName: "properties.workloadProfileName", + }, + }, +}; + +export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStopHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String", }, }, - configuration: { - serializedName: "properties.configuration", - type: { - name: "Composite", - className: "JobConfiguration", - }, - }, - template: { - serializedName: "properties.template", - type: { - name: "Composite", - className: "JobTemplate", - }, - }, - outboundIpAddresses: { - serializedName: "properties.outboundIpAddresses", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - eventStreamEndpoint: { - serializedName: "properties.eventStreamEndpoint", - readOnly: true, + }, + }, +}; + +export const ContainerAppsBuildsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsBuildsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", type: { name: "String", }, @@ -6321,51 +11013,62 @@ export const Job: coreClient.CompositeMapper = { }, }; -export const ManagedCertificate: coreClient.CompositeMapper = { +export const ContainerAppsPatchesDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCertificate", + className: "ContainerAppsPatchesDeleteHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - properties: { - serializedName: "properties", + location: { + serializedName: "location", type: { - name: "Composite", - className: "ManagedCertificateProperties", + name: "String", }, }, }, }, }; -export const EnvironmentAuthToken: coreClient.CompositeMapper = { +export const ContainerAppsPatchesSkipConfigureHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerAppsPatchesSkipConfigureHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ContainerAppsPatchesApplyHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EnvironmentAuthToken", + className: "ContainerAppsPatchesApplyHeaders", modelProperties: { - ...TrackedResource.type.modelProperties, - token: { - serializedName: "properties.token", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String", }, }, - expires: { - serializedName: "properties.expires", - readOnly: true, + location: { + serializedName: "location", type: { - name: "DateTime", + name: "String", }, }, }, }, }; -export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { +export const JobsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentsDeleteHeaders", + className: "JobsDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -6377,10 +11080,10 @@ export const ConnectedEnvironmentsDeleteHeaders: coreClient.CompositeMapper = { }, }; -export const ContainerAppsDeleteHeaders: coreClient.CompositeMapper = { +export const JobsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppsDeleteHeaders", + className: "JobsUpdateHeaders", modelProperties: { location: { serializedName: "location", @@ -6392,10 +11095,10 @@ export const ContainerAppsDeleteHeaders: coreClient.CompositeMapper = { }, }; -export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { +export const JobsStartHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppsUpdateHeaders", + className: "JobsStartHeaders", modelProperties: { location: { serializedName: "location", @@ -6407,10 +11110,10 @@ export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { }, }; -export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { +export const JobsStopExecutionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppsStartHeaders", + className: "JobsStopExecutionHeaders", modelProperties: { location: { serializedName: "location", @@ -6422,10 +11125,10 @@ export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { }, }; -export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { +export const JobsStopMultipleExecutionsHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppsStopHeaders", + className: "JobsStopMultipleExecutionsHeaders", modelProperties: { location: { serializedName: "location", @@ -6437,11 +11140,38 @@ export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { }, }; -export const JobsDeleteHeaders: coreClient.CompositeMapper = { +export const JobsResumeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsDeleteHeaders", + className: "JobsResumeHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const JobsSuspendHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsSuspendHeaders", modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, location: { serializedName: "location", type: { @@ -6452,10 +11182,10 @@ export const JobsDeleteHeaders: coreClient.CompositeMapper = { }, }; -export const JobsUpdateHeaders: coreClient.CompositeMapper = { +export const DotNetComponentsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsUpdateHeaders", + className: "DotNetComponentsUpdateHeaders", modelProperties: { location: { serializedName: "location", @@ -6467,10 +11197,10 @@ export const JobsUpdateHeaders: coreClient.CompositeMapper = { }, }; -export const JobsStartHeaders: coreClient.CompositeMapper = { +export const DotNetComponentsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsStartHeaders", + className: "DotNetComponentsDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -6482,10 +11212,10 @@ export const JobsStartHeaders: coreClient.CompositeMapper = { }, }; -export const JobsStopExecutionHeaders: coreClient.CompositeMapper = { +export const JavaComponentsUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsStopExecutionHeaders", + className: "JavaComponentsUpdateHeaders", modelProperties: { location: { serializedName: "location", @@ -6497,10 +11227,10 @@ export const JobsStopExecutionHeaders: coreClient.CompositeMapper = { }, }; -export const JobsStopMultipleExecutionsHeaders: coreClient.CompositeMapper = { +export const JavaComponentsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsStopMultipleExecutionsHeaders", + className: "JavaComponentsDeleteHeaders", modelProperties: { location: { serializedName: "location", @@ -6511,3 +11241,60 @@ export const JobsStopMultipleExecutionsHeaders: coreClient.CompositeMapper = { }, }, }; + +export const ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ContainerAppsSessionPoolsUpdateHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerAppsSessionPoolsUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ContainerAppsSessionPoolsDeleteHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ContainerAppsSessionPoolsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export let discriminators = { + JavaComponentProperties: JavaComponentProperties, + "JavaComponentProperties.SpringCloudGateway": SpringCloudGatewayComponent, + "JavaComponentProperties.SpringBootAdmin": SpringBootAdminComponent, + "JavaComponentProperties.Nacos": NacosComponent, + "JavaComponentProperties.SpringCloudEureka": SpringCloudEurekaComponent, + "JavaComponentProperties.SpringCloudConfig": SpringCloudConfigComponent, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index 01a5992fb7c9..40bd6e622f43 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -12,24 +12,58 @@ import { OperationQueryParameter, } from "@azure/core-client"; import { + AppResiliency as AppResiliencyMapper, AuthConfig as AuthConfigMapper, + BuilderResource as BuilderResourceMapper, + BuilderResourceUpdate as BuilderResourceUpdateMapper, + BuildResource as BuildResourceMapper, ConnectedEnvironment as ConnectedEnvironmentMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, Certificate as CertificateMapper, CertificatePatch as CertificatePatchMapper, - DaprComponent as DaprComponentMapper, + ConnectedEnvironmentDaprComponent as ConnectedEnvironmentDaprComponentMapper, ConnectedEnvironmentStorage as ConnectedEnvironmentStorageMapper, ContainerApp as ContainerAppMapper, + PatchSkipConfig as PatchSkipConfigMapper, Job as JobMapper, JobPatchProperties as JobPatchPropertiesMapper, JobExecutionTemplate as JobExecutionTemplateMapper, + DotNetComponent as DotNetComponentMapper, + JavaComponent as JavaComponentMapper, + LogicApp as LogicAppMapper, + WorkflowArtifacts as WorkflowArtifactsMapper, ManagedEnvironment as ManagedEnvironmentMapper, ManagedCertificate as ManagedCertificateMapper, ManagedCertificatePatch as ManagedCertificatePatchMapper, + PrivateEndpointConnection as PrivateEndpointConnectionMapper, + DaprComponentResiliencyPolicy as DaprComponentResiliencyPolicyMapper, + DaprComponent as DaprComponentMapper, + DaprSubscription as DaprSubscriptionMapper, + HttpRouteConfig as HttpRouteConfigMapper, + MaintenanceConfigurationResource as MaintenanceConfigurationResourceMapper, ManagedEnvironmentStorage as ManagedEnvironmentStorageMapper, + SessionPool as SessionPoolMapper, + SessionPoolUpdatableProperties as SessionPoolUpdatablePropertiesMapper, SourceControl as SourceControlMapper, } from "../models/mappers"; +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String", + }, + }, +}; + +export const resiliencyEnvelope: OperationParameter = { + parameterPath: "resiliencyEnvelope", + mapper: AppResiliencyMapper, +}; + export const accept: OperationParameter = { parameterPath: "accept", mapper: { @@ -57,13 +91,10 @@ export const $host: OperationURLParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { - constraints: { - MinLength: 1, - }, serializedName: "subscriptionId", required: true, type: { - name: "String", + name: "Uuid", }, }, }; @@ -83,10 +114,27 @@ export const resourceGroupName: OperationURLParameter = { }, }; -export const containerAppName: OperationURLParameter = { - parameterPath: "containerAppName", +export const appName: OperationURLParameter = { + parameterPath: "appName", mapper: { - serializedName: "containerAppName", + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "appName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const name: OperationURLParameter = { + parameterPath: "name", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "name", required: true, type: { name: "String", @@ -97,7 +145,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-03-01", + defaultValue: "2024-10-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -106,23 +154,34 @@ export const apiVersion: OperationQueryParameter = { }, }; -export const authConfigName: OperationURLParameter = { - parameterPath: "authConfigName", +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "authConfigName", + serializedName: "nextLink", required: true, type: { name: "String", }, }, + skipEncoding: true, }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const containerAppName: OperationURLParameter = { + parameterPath: "containerAppName", mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", + serializedName: "containerAppName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const authConfigName: OperationURLParameter = { + parameterPath: "authConfigName", + mapper: { + serializedName: "authConfigName", + required: true, type: { name: "String", }, @@ -134,25 +193,55 @@ export const authConfigEnvelope: OperationParameter = { mapper: AuthConfigMapper, }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const location: OperationURLParameter = { + parameterPath: "location", mapper: { - serializedName: "nextLink", + constraints: { + MinLength: 1, + }, + serializedName: "location", required: true, type: { name: "String", }, }, - skipEncoding: true, }; -export const location: OperationURLParameter = { - parameterPath: "location", +export const builderName: OperationURLParameter = { + parameterPath: "builderName", mapper: { constraints: { - MinLength: 1, + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 32, + MinLength: 2, }, - serializedName: "location", + serializedName: "builderName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const builderEnvelope: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceMapper, +}; + +export const builderEnvelope1: OperationParameter = { + parameterPath: "builderEnvelope", + mapper: BuilderResourceUpdateMapper, +}; + +export const buildName: OperationURLParameter = { + parameterPath: "buildName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 64, + MinLength: 2, + }, + serializedName: "buildName", required: true, type: { name: "String", @@ -160,6 +249,11 @@ export const location: OperationURLParameter = { }, }; +export const buildEnvelope: OperationParameter = { + parameterPath: "buildEnvelope", + mapper: BuildResourceMapper, +}; + export const connectedEnvironmentName: OperationURLParameter = { parameterPath: "connectedEnvironmentName", mapper: { @@ -215,7 +309,7 @@ export const componentName: OperationURLParameter = { export const daprComponentEnvelope: OperationParameter = { parameterPath: "daprComponentEnvelope", - mapper: DaprComponentMapper, + mapper: ConnectedEnvironmentDaprComponentMapper, }; export const storageName: OperationURLParameter = { @@ -273,6 +367,41 @@ export const filter: OperationQueryParameter = { }, }; +export const patchName: OperationURLParameter = { + parameterPath: "patchName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 64, + MinLength: 2, + }, + serializedName: "patchName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const patchSkipConfig: OperationParameter = { + parameterPath: "patchSkipConfig", + mapper: PatchSkipConfigMapper, +}; + +export const labelName: OperationURLParameter = { + parameterPath: "labelName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "labelName", + required: true, + type: { + name: "String", + }, + }, +}; + export const revisionName: OperationURLParameter = { parameterPath: "revisionName", mapper: { @@ -388,6 +517,120 @@ export const jobExecutionName: OperationURLParameter = { }, }; +export const environmentName1: OperationURLParameter = { + parameterPath: "environmentName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "environmentName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const dotNetComponentEnvelope: OperationParameter = { + parameterPath: "dotNetComponentEnvelope", + mapper: DotNetComponentMapper, +}; + +export const revisionName1: OperationURLParameter = { + parameterPath: "revisionName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "revisionName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const functionAppName: OperationURLParameter = { + parameterPath: "functionAppName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "functionAppName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const javaComponentEnvelope: OperationParameter = { + parameterPath: "javaComponentEnvelope", + mapper: JavaComponentMapper, +}; + +export const logicAppName: OperationURLParameter = { + parameterPath: "logicAppName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "logicAppName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const resource: OperationParameter = { + parameterPath: "resource", + mapper: LogicAppMapper, +}; + +export const workflowName: OperationURLParameter = { + parameterPath: "workflowName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]*$"), + MaxLength: 63, + MinLength: 3, + }, + serializedName: "workflowName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const workflowArtifacts: OperationParameter = { + parameterPath: ["options", "workflowArtifacts"], + mapper: WorkflowArtifactsMapper, +}; + +export const xMsLogicAppsProxyPath: OperationParameter = { + parameterPath: "xMsLogicAppsProxyPath", + mapper: { + serializedName: "x-ms-logicApps-proxy-path", + required: true, + type: { + name: "String", + }, + }, +}; + +export const xMsLogicAppsProxyMethod: OperationParameter = { + parameterPath: "xMsLogicAppsProxyMethod", + mapper: { + serializedName: "x-ms-logicApps-proxy-method", + required: true, + type: { + name: "String", + }, + }, +}; + export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper, @@ -414,11 +657,149 @@ export const managedCertificateEnvelope1: OperationParameter = { mapper: ManagedCertificatePatchMapper, }; +export const privateEndpointConnectionName: OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + serializedName: "privateEndpointConnectionName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const privateEndpointConnectionEnvelope: OperationParameter = { + parameterPath: "privateEndpointConnectionEnvelope", + mapper: PrivateEndpointConnectionMapper, +}; + +export const componentName1: OperationURLParameter = { + parameterPath: "componentName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "componentName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const name1: OperationURLParameter = { + parameterPath: "name", + mapper: { + serializedName: "name", + required: true, + type: { + name: "String", + }, + }, +}; + +export const daprComponentResiliencyPolicyEnvelope: OperationParameter = { + parameterPath: "daprComponentResiliencyPolicyEnvelope", + mapper: DaprComponentResiliencyPolicyMapper, +}; + +export const daprComponentEnvelope1: OperationParameter = { + parameterPath: "daprComponentEnvelope", + mapper: DaprComponentMapper, +}; + +export const daprSubscriptionEnvelope: OperationParameter = { + parameterPath: "daprSubscriptionEnvelope", + mapper: DaprSubscriptionMapper, +}; + +export const httpRouteName: OperationURLParameter = { + parameterPath: "httpRouteName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]*$"), + MaxLength: 63, + MinLength: 3, + }, + serializedName: "httpRouteName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const httpRouteConfigEnvelope: OperationParameter = { + parameterPath: ["options", "httpRouteConfigEnvelope"], + mapper: HttpRouteConfigMapper, +}; + +export const httpRouteConfigEnvelope1: OperationParameter = { + parameterPath: "httpRouteConfigEnvelope", + mapper: HttpRouteConfigMapper, +}; + +export const httpRouteName1: OperationURLParameter = { + parameterPath: "httpRouteName", + mapper: { + serializedName: "httpRouteName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const maintenanceConfigurationEnvelope: OperationParameter = { + parameterPath: "maintenanceConfigurationEnvelope", + mapper: MaintenanceConfigurationResourceMapper, +}; + +export const configName: OperationURLParameter = { + parameterPath: "configName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + }, + serializedName: "configName", + required: true, + type: { + name: "String", + }, + }, +}; + export const storageEnvelope1: OperationParameter = { parameterPath: "storageEnvelope", mapper: ManagedEnvironmentStorageMapper, }; +export const sessionPoolName: OperationURLParameter = { + parameterPath: "sessionPoolName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z][a-z0-9]*$"), + MaxLength: 63, + MinLength: 3, + }, + serializedName: "sessionPoolName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const sessionPoolEnvelope: OperationParameter = { + parameterPath: "sessionPoolEnvelope", + mapper: SessionPoolMapper, +}; + +export const sessionPoolEnvelope1: OperationParameter = { + parameterPath: "sessionPoolEnvelope", + mapper: SessionPoolUpdatablePropertiesMapper, +}; + export const sourceControlName: OperationURLParameter = { parameterPath: "sourceControlName", mapper: { @@ -435,6 +816,36 @@ export const sourceControlEnvelope: OperationParameter = { mapper: SourceControlMapper, }; +export const xMsGithubAuxiliary: OperationParameter = { + parameterPath: ["options", "xMsGithubAuxiliary"], + mapper: { + serializedName: "x-ms-github-auxiliary", + type: { + name: "String", + }, + }, +}; + +export const ignoreWorkflowDeletionFailure: OperationQueryParameter = { + parameterPath: ["options", "ignoreWorkflowDeletionFailure"], + mapper: { + serializedName: "ignoreWorkflowDeletionFailure", + type: { + name: "Boolean", + }, + }, +}; + +export const deleteWorkflow: OperationQueryParameter = { + parameterPath: ["options", "deleteWorkflow"], + mapper: { + serializedName: "deleteWorkflow", + type: { + name: "Boolean", + }, + }, +}; + export const location1: OperationURLParameter = { parameterPath: "location", mapper: { @@ -449,7 +860,7 @@ export const location1: OperationURLParameter = { }, }; -export const environmentName1: OperationURLParameter = { +export const environmentName2: OperationURLParameter = { parameterPath: "environmentName", mapper: { constraints: { diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/appResiliencyOperations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/appResiliencyOperations.ts new file mode 100644 index 000000000000..cdb9220543a7 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/appResiliencyOperations.ts @@ -0,0 +1,374 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { AppResiliencyOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + AppResiliency, + AppResiliencyListNextOptionalParams, + AppResiliencyListOptionalParams, + AppResiliencyListResponse, + AppResiliencyCreateOrUpdateOptionalParams, + AppResiliencyCreateOrUpdateResponse, + AppResiliencyUpdateOptionalParams, + AppResiliencyUpdateResponse, + AppResiliencyDeleteOptionalParams, + AppResiliencyGetOptionalParams, + AppResiliencyGetResponse, + AppResiliencyListNextResponse, +} from "../models"; + +/// +/** Class containing AppResiliencyOperations operations. */ +export class AppResiliencyOperationsImpl implements AppResiliencyOperations { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class AppResiliencyOperations class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List container app resiliency policies. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + appName: string, + options?: AppResiliencyListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, appName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + appName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + appName: string, + options?: AppResiliencyListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: AppResiliencyListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, appName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + appName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + appName: string, + options?: AppResiliencyListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + appName, + options, + )) { + yield* page; + } + } + + /** + * Create or update container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appName: string, + name: string, + resiliencyEnvelope: AppResiliency, + options?: AppResiliencyCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, name, resiliencyEnvelope, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Update container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appName: string, + name: string, + resiliencyEnvelope: AppResiliency, + options?: AppResiliencyUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, name, resiliencyEnvelope, options }, + updateOperationSpec, + ); + } + + /** + * Delete container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appName: string, + name: string, + options?: AppResiliencyDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, name, options }, + deleteOperationSpec, + ); + } + + /** + * Get container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appName: string, + name: string, + options?: AppResiliencyGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, name, options }, + getOperationSpec, + ); + } + + /** + * List container app resiliency policies. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + appName: string, + options?: AppResiliencyListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + appName: string, + nextLink: string, + options?: AppResiliencyListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, appName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.AppResiliency, + }, + 201: { + bodyMapper: Mappers.AppResiliency, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.resiliencyEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + Parameters.name, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.AppResiliency, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.resiliencyEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + Parameters.name, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + Parameters.name, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppResiliency, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + Parameters.name, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppResiliencyCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AppResiliencyCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.appName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/buildAuthToken.ts b/sdk/appcontainers/arm-appcontainers/src/operations/buildAuthToken.ts new file mode 100644 index 000000000000..ff23e47f9bf3 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/buildAuthToken.ts @@ -0,0 +1,74 @@ +/* + * 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. + */ + +import { BuildAuthToken } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + BuildAuthTokenListOptionalParams, + BuildAuthTokenListResponse, +} from "../models"; + +/** Class containing BuildAuthToken operations. */ +export class BuildAuthTokenImpl implements BuildAuthToken { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class BuildAuthToken class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildAuthTokenListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, buildName, options }, + listOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BuildToken, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts new file mode 100644 index 000000000000..0ec80c46cf79 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts @@ -0,0 +1,728 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { Builders } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + BuilderResource, + BuildersListBySubscriptionNextOptionalParams, + BuildersListBySubscriptionOptionalParams, + BuildersListBySubscriptionResponse, + BuildersListByResourceGroupNextOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersListByResourceGroupResponse, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams, + BuildersDeleteResponse, + BuildersListBySubscriptionNextResponse, + BuildersListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing Builders operations. */ +export class BuildersImpl implements Builders { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builders class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + public listBySubscription( + options?: BuildersListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: BuildersListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: BuildersListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: BuildersListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * List BuilderResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: BuildersListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + private _listBySubscription( + options?: BuildersListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec, + ); + } + + /** + * List BuilderResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + getOperationSpec, + ); + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, builderEnvelope, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + BuildersCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, builderEnvelope, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + BuildersUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + builderName, + builderEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + BuildersDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: BuildersListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: BuildersListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.App/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource, + }, + 201: { + bodyMapper: Mappers.BuilderResource, + }, + 202: { + bodyMapper: Mappers.BuilderResource, + }, + 204: { + bodyMapper: Mappers.BuilderResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.builderEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.BuilderResource, + }, + 201: { + bodyMapper: Mappers.BuilderResource, + }, + 202: { + bodyMapper: Mappers.BuilderResource, + }, + 204: { + bodyMapper: Mappers.BuilderResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.builderEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.BuildersDeleteHeaders, + }, + 201: { + headersMapper: Mappers.BuildersDeleteHeaders, + }, + 202: { + headersMapper: Mappers.BuildersDeleteHeaders, + }, + 204: { + headersMapper: Mappers.BuildersDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuilderCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts new file mode 100644 index 000000000000..2c99f98f3173 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts @@ -0,0 +1,347 @@ +/* + * 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. + */ + +import { Builds } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + BuildsGetOptionalParams, + BuildsGetResponse, + BuildResource, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams, + BuildsDeleteResponse, +} from "../models"; + +/** Class containing Builds operations. */ +export class BuildsImpl implements Builds { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class Builds class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, buildName, options }, + getOperationSpec, + ); + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + builderName, + buildName, + buildEnvelope, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + BuildsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + builderName, + buildName, + buildEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams, + ): Promise< + SimplePollerLike, BuildsDeleteResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, builderName, buildName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + BuildsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + builderName, + buildName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.BuildResource, + }, + 201: { + bodyMapper: Mappers.BuildResource, + }, + 202: { + bodyMapper: Mappers.BuildResource, + }, + 204: { + bodyMapper: Mappers.BuildResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.buildEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.BuildsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.BuildsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.BuildsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.BuildsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/buildsByBuilderResource.ts b/sdk/appcontainers/arm-appcontainers/src/operations/buildsByBuilderResource.ts new file mode 100644 index 000000000000..008c12adcec4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/buildsByBuilderResource.ts @@ -0,0 +1,193 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { BuildsByBuilderResource } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + BuildResource, + BuildsByBuilderResourceListNextOptionalParams, + BuildsByBuilderResourceListOptionalParams, + BuildsByBuilderResourceListResponse, + BuildsByBuilderResourceListNextResponse, +} from "../models"; + +/// +/** Class containing BuildsByBuilderResource operations. */ +export class BuildsByBuilderResourceImpl implements BuildsByBuilderResource { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class BuildsByBuilderResource class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + builderName: string, + options?: BuildsByBuilderResourceListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, builderName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + builderName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + builderName: string, + options?: BuildsByBuilderResourceListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: BuildsByBuilderResourceListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, builderName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + builderName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + builderName: string, + options?: BuildsByBuilderResourceListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + builderName, + options, + )) { + yield* page; + } + } + + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + builderName: string, + options?: BuildsByBuilderResourceListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + builderName: string, + nextLink: string, + options?: BuildsByBuilderResourceListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.builderName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts index eeb0cefd1dd9..4f15233ca615 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/certificates.ts @@ -308,7 +308,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.certificateName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -353,7 +353,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.certificateName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts index 4f402674a7aa..904bb456ca03 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironments.ts @@ -565,7 +565,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.connectedEnvironmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -631,7 +631,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.connectedEnvironmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts index eff92dd0caea..8c659247e72c 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsCertificates.ts @@ -13,6 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Certificate, ConnectedEnvironmentsCertificatesListNextOptionalParams, @@ -23,6 +29,7 @@ import { ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, ConnectedEnvironmentsCertificatesCreateOrUpdateResponse, ConnectedEnvironmentsCertificatesDeleteOptionalParams, + ConnectedEnvironmentsCertificatesDeleteResponse, CertificatePatch, ConnectedEnvironmentsCertificatesUpdateOptionalParams, ConnectedEnvironmentsCertificatesUpdateResponse, @@ -171,16 +178,97 @@ export class ConnectedEnvironmentsCertificatesImpl * @param certificateName Name of the Certificate. * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + connectedEnvironmentName, + certificateName, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsCertificatesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, connectedEnvironmentName, certificateName, options }, - createOrUpdateOperationSpec, + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + connectedEnvironmentName, + certificateName, + options, ); + return poller.pollUntilDone(); } /** @@ -190,16 +278,97 @@ export class ConnectedEnvironmentsCertificatesImpl * @param certificateName Name of the Certificate. * @param options The options parameters. */ - delete( + async beginDelete( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, connectedEnvironmentName, certificateName, options }, - deleteOperationSpec, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + connectedEnvironmentName, + certificateName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsCertificatesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + connectedEnvironmentName, + certificateName, + options, ); + return poller.pollUntilDone(); } /** @@ -210,23 +379,102 @@ export class ConnectedEnvironmentsCertificatesImpl * @param certificateEnvelope Properties of a certificate that need to be updated * @param options The options parameters. */ - update( + async beginUpdate( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, certificateEnvelope: CertificatePatch, options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, options, }, - updateOperationSpec, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsCertificatesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + connectedEnvironmentName, + certificateName, + certificateEnvelope, + options, ); + return poller.pollUntilDone(); } /** @@ -301,8 +549,17 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.Certificate, }, + 201: { + bodyMapper: Mappers.Certificate, + }, + 202: { + bodyMapper: Mappers.Certificate, + }, + 204: { + bodyMapper: Mappers.Certificate, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, requestBody: Parameters.certificateEnvelope, @@ -314,7 +571,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.connectedEnvironmentName, Parameters.certificateName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -322,10 +579,20 @@ const deleteOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.ConnectedEnvironmentsCertificatesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ConnectedEnvironmentsCertificatesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ConnectedEnvironmentsCertificatesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ConnectedEnvironmentsCertificatesDeleteHeaders, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, queryParameters: [Parameters.apiVersion], @@ -346,8 +613,17 @@ const updateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.Certificate, }, + 201: { + bodyMapper: Mappers.Certificate, + }, + 202: { + bodyMapper: Mappers.Certificate, + }, + 204: { + bodyMapper: Mappers.Certificate, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, requestBody: Parameters.certificateEnvelope1, @@ -359,7 +635,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.connectedEnvironmentName, Parameters.certificateName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts index 0e0cc326298b..abe70641b37e 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsDaprComponents.ts @@ -14,7 +14,13 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; import { - DaprComponent, + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ConnectedEnvironmentDaprComponent, ConnectedEnvironmentsDaprComponentsListNextOptionalParams, ConnectedEnvironmentsDaprComponentsListOptionalParams, ConnectedEnvironmentsDaprComponentsListResponse, @@ -23,6 +29,7 @@ import { ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse, ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ConnectedEnvironmentsDaprComponentsDeleteResponse, ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams, ConnectedEnvironmentsDaprComponentsListSecretsResponse, ConnectedEnvironmentsDaprComponentsListNextResponse, @@ -53,7 +60,7 @@ export class ConnectedEnvironmentsDaprComponentsImpl resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams, - ): PagedAsyncIterableIterator { + ): PagedAsyncIterableIterator { const iter = this.listPagingAll( resourceGroupName, connectedEnvironmentName, @@ -85,7 +92,7 @@ export class ConnectedEnvironmentsDaprComponentsImpl connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams, settings?: PageSettings, - ): AsyncIterableIterator { + ): AsyncIterableIterator { let result: ConnectedEnvironmentsDaprComponentsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { @@ -117,7 +124,7 @@ export class ConnectedEnvironmentsDaprComponentsImpl resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams, - ): AsyncIterableIterator { + ): AsyncIterableIterator { for await (const page of this.listPagingPage( resourceGroupName, connectedEnvironmentName, @@ -171,23 +178,102 @@ export class ConnectedEnvironmentsDaprComponentsImpl * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, connectedEnvironmentName: string, componentName: string, - daprComponentEnvelope: DaprComponent, + daprComponentEnvelope: ConnectedEnvironmentDaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, options, }, - createOrUpdateOperationSpec, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a Dapr Component in a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + daprComponentEnvelope: ConnectedEnvironmentDaprComponent, + options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + connectedEnvironmentName, + componentName, + daprComponentEnvelope, + options, ); + return poller.pollUntilDone(); } /** @@ -197,16 +283,97 @@ export class ConnectedEnvironmentsDaprComponentsImpl * @param componentName Name of the Dapr Component. * @param options The options parameters. */ - delete( + async beginDelete( resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, connectedEnvironmentName, componentName, options }, - deleteOperationSpec, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsDaprComponentsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + connectedEnvironmentName, + componentName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsDaprComponentsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Dapr Component from a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + connectedEnvironmentName, + componentName, + options, ); + return poller.pollUntilDone(); } /** @@ -255,7 +422,7 @@ const listOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DaprComponentsCollection, + bodyMapper: Mappers.ConnectedEnvironmentDaprComponentsCollection, }, default: { bodyMapper: Mappers.DefaultErrorResponse, @@ -276,7 +443,7 @@ const getOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DaprComponent, + bodyMapper: Mappers.ConnectedEnvironmentDaprComponent, }, default: { bodyMapper: Mappers.DefaultErrorResponse, @@ -298,10 +465,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.DaprComponent, + bodyMapper: Mappers.ConnectedEnvironmentDaprComponent, + }, + 201: { + bodyMapper: Mappers.ConnectedEnvironmentDaprComponent, + }, + 202: { + bodyMapper: Mappers.ConnectedEnvironmentDaprComponent, + }, + 204: { + bodyMapper: Mappers.ConnectedEnvironmentDaprComponent, }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, requestBody: Parameters.daprComponentEnvelope, @@ -313,7 +489,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.connectedEnvironmentName, Parameters.componentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -321,10 +497,20 @@ const deleteOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.ConnectedEnvironmentsDaprComponentsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ConnectedEnvironmentsDaprComponentsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ConnectedEnvironmentsDaprComponentsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ConnectedEnvironmentsDaprComponentsDeleteHeaders, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, queryParameters: [Parameters.apiVersion], @@ -365,7 +551,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DaprComponentsCollection, + bodyMapper: Mappers.ConnectedEnvironmentDaprComponentsCollection, }, default: { bodyMapper: Mappers.DefaultErrorResponse, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts index 2bdc55053a4d..1a047b628035 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/connectedEnvironmentsStorages.ts @@ -11,6 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ConnectedEnvironmentsStoragesListOptionalParams, ConnectedEnvironmentsStoragesListResponse, @@ -20,6 +26,7 @@ import { ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, ConnectedEnvironmentsStoragesCreateOrUpdateResponse, ConnectedEnvironmentsStoragesDeleteOptionalParams, + ConnectedEnvironmentsStoragesDeleteResponse, } from "../models"; /** Class containing ConnectedEnvironmentsStorages operations. */ @@ -80,23 +87,102 @@ export class ConnectedEnvironmentsStoragesImpl * @param storageEnvelope Configuration details of storage. * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, connectedEnvironmentName: string, storageName: string, storageEnvelope: ConnectedEnvironmentStorage, options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsStoragesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, options, }, - createOrUpdateOperationSpec, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsStoragesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or update storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + storageEnvelope: ConnectedEnvironmentStorage, + options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + connectedEnvironmentName, + storageName, + storageEnvelope, + options, ); + return poller.pollUntilDone(); } /** @@ -106,16 +192,97 @@ export class ConnectedEnvironmentsStoragesImpl * @param storageName Name of the storage. * @param options The options parameters. */ - delete( + async beginDelete( resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, connectedEnvironmentName, storageName, options }, - deleteOperationSpec, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsStoragesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + connectedEnvironmentName, + storageName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ConnectedEnvironmentsStoragesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + connectedEnvironmentName, + storageName, + options, ); + return poller.pollUntilDone(); } } // Operation Specifications @@ -171,8 +338,17 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.ConnectedEnvironmentStorage, }, + 201: { + bodyMapper: Mappers.ConnectedEnvironmentStorage, + }, + 202: { + bodyMapper: Mappers.ConnectedEnvironmentStorage, + }, + 204: { + bodyMapper: Mappers.ConnectedEnvironmentStorage, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, requestBody: Parameters.storageEnvelope, @@ -184,7 +360,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.connectedEnvironmentName, Parameters.storageName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -192,10 +368,20 @@ const deleteOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}", httpMethod: "DELETE", responses: { - 200: {}, - 204: {}, + 200: { + headersMapper: Mappers.ConnectedEnvironmentsStoragesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ConnectedEnvironmentsStoragesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ConnectedEnvironmentsStoragesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ConnectedEnvironmentsStoragesDeleteHeaders, + }, default: { - bodyMapper: Mappers.DefaultErrorResponse, + bodyMapper: Mappers.ErrorResponse, }, }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts index 4d306842d7c9..72c64115780a 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -864,7 +864,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.containerAppName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -918,7 +918,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.containerAppName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts index b0a61e1b487f..66bb622111e2 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsAuthConfigs.ts @@ -290,7 +290,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.containerAppName, Parameters.authConfigName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -330,8 +330,8 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerAppName, Parameters.nextLink, + Parameters.containerAppName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuilds.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuilds.ts new file mode 100644 index 000000000000..1a0a92f3ca2a --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuilds.ts @@ -0,0 +1,208 @@ +/* + * 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. + */ + +import { ContainerAppsBuilds } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ContainerAppsBuildsGetOptionalParams, + ContainerAppsBuildsGetResponse, + ContainerAppsBuildsDeleteOptionalParams, + ContainerAppsBuildsDeleteResponse, +} from "../models"; + +/** Class containing ContainerAppsBuilds operations. */ +export class ContainerAppsBuildsImpl implements ContainerAppsBuilds { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsBuilds class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, buildName, options }, + getOperationSpec, + ); + } + + /** + * Delete a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsBuildsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, buildName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsBuildsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + containerAppName, + buildName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppsBuildResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.buildName, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ContainerAppsBuildsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ContainerAppsBuildsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ContainerAppsBuildsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ContainerAppsBuildsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.buildName, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuildsByContainerApp.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuildsByContainerApp.ts new file mode 100644 index 000000000000..3858fb146dac --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsBuildsByContainerApp.ts @@ -0,0 +1,199 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerAppsBuildsByContainerApp } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + ContainerAppsBuildResource, + ContainerAppsBuildsByContainerAppListNextOptionalParams, + ContainerAppsBuildsByContainerAppListOptionalParams, + ContainerAppsBuildsByContainerAppListResponse, + ContainerAppsBuildsByContainerAppListNextResponse, +} from "../models"; + +/// +/** Class containing ContainerAppsBuildsByContainerApp operations. */ +export class ContainerAppsBuildsByContainerAppImpl + implements ContainerAppsBuildsByContainerApp +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsBuildsByContainerApp class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List Container Apps Build resources by Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsBuildsByContainerAppListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + containerAppName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + containerAppName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsBuildsByContainerAppListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerAppsBuildsByContainerAppListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, containerAppName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + containerAppName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsBuildsByContainerAppListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + containerAppName, + options, + )) { + yield* page; + } + } + + /** + * List Container Apps Build resources by Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsBuildsByContainerAppListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsBuildsByContainerAppListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppsBuildCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppsBuildCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts index 668f447aea39..8fed138934ca 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsDiagnostics.ts @@ -468,8 +468,8 @@ const listDetectorsNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerAppName, Parameters.nextLink, + Parameters.containerAppName, ], headerParameters: [Parameters.accept], serializer, @@ -489,8 +489,8 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerAppName, Parameters.nextLink, + Parameters.containerAppName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsLabelHistory.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsLabelHistory.ts new file mode 100644 index 000000000000..35d4fb3adea6 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsLabelHistory.ts @@ -0,0 +1,246 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerAppsLabelHistory } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + LabelHistory, + ContainerAppsLabelHistoryListLabelHistoryNextOptionalParams, + ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ContainerAppsLabelHistoryListLabelHistoryResponse, + ContainerAppsLabelHistoryGetLabelHistoryOptionalParams, + ContainerAppsLabelHistoryGetLabelHistoryResponse, + ContainerAppsLabelHistoryListLabelHistoryNextResponse, +} from "../models"; + +/// +/** Class containing ContainerAppsLabelHistory operations. */ +export class ContainerAppsLabelHistoryImpl + implements ContainerAppsLabelHistory +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsLabelHistory class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Label History for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param options The options parameters. + */ + public listLabelHistory( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listLabelHistoryPagingAll( + resourceGroupName, + containerAppName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listLabelHistoryPagingPage( + resourceGroupName, + containerAppName, + options, + settings, + ); + }, + }; + } + + private async *listLabelHistoryPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerAppsLabelHistoryListLabelHistoryResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listLabelHistory( + resourceGroupName, + containerAppName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listLabelHistoryNext( + resourceGroupName, + containerAppName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listLabelHistoryPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listLabelHistoryPagingPage( + resourceGroupName, + containerAppName, + options, + )) { + yield* page; + } + } + + /** + * Get the Label History for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param options The options parameters. + */ + private _listLabelHistory( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listLabelHistoryOperationSpec, + ); + } + + /** + * Get the history of a label. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param labelName Name of the Container App label. + * @param options The options parameters. + */ + getLabelHistory( + resourceGroupName: string, + containerAppName: string, + labelName: string, + options?: ContainerAppsLabelHistoryGetLabelHistoryOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, labelName, options }, + getLabelHistoryOperationSpec, + ); + } + + /** + * ListLabelHistoryNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param nextLink The nextLink from the previous successful call to the ListLabelHistory method. + * @param options The options parameters. + */ + private _listLabelHistoryNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsLabelHistoryListLabelHistoryNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listLabelHistoryNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listLabelHistoryOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LabelHistoryCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getLabelHistoryOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/labelHistory/{labelName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LabelHistory, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.labelName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listLabelHistoryNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LabelHistoryCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsPatches.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsPatches.ts new file mode 100644 index 000000000000..ab8897dd8384 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsPatches.ts @@ -0,0 +1,648 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerAppsPatches } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ContainerAppsPatchResource, + ContainerAppsPatchesListByContainerAppNextOptionalParams, + ContainerAppsPatchesListByContainerAppOptionalParams, + ContainerAppsPatchesListByContainerAppResponse, + ContainerAppsPatchesGetOptionalParams, + ContainerAppsPatchesGetResponse, + ContainerAppsPatchesDeleteOptionalParams, + ContainerAppsPatchesDeleteResponse, + PatchSkipConfig, + ContainerAppsPatchesSkipConfigureOptionalParams, + ContainerAppsPatchesSkipConfigureResponse, + ContainerAppsPatchesApplyOptionalParams, + ContainerAppsPatchesApplyResponse, + ContainerAppsPatchesListByContainerAppNextResponse, +} from "../models"; + +/// +/** Class containing ContainerAppsPatches operations. */ +export class ContainerAppsPatchesImpl implements ContainerAppsPatches { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsPatches class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List Container Apps Patch resources by ContainerApp. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param options The options parameters. + */ + public listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsPatchesListByContainerAppOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByContainerAppPagingAll( + resourceGroupName, + containerAppName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options, + settings, + ); + }, + }; + } + + private async *listByContainerAppPagingPage( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsPatchesListByContainerAppOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerAppsPatchesListByContainerAppResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByContainerApp( + resourceGroupName, + containerAppName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByContainerAppNext( + resourceGroupName, + containerAppName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByContainerAppPagingAll( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsPatchesListByContainerAppOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByContainerAppPagingPage( + resourceGroupName, + containerAppName, + options, + )) { + yield* page; + } + } + + /** + * List Container Apps Patch resources by ContainerApp. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param options The options parameters. + */ + private _listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsPatchesListByContainerAppOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, options }, + listByContainerAppOperationSpec, + ); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, patchName, options }, + getOperationSpec, + ); + } + + /** + * Delete specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, patchName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsPatchesDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + containerAppName, + patchName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param options The options parameters. + */ + async beginSkipConfigure( + resourceGroupName: string, + containerAppName: string, + patchName: string, + patchSkipConfig: PatchSkipConfig, + options?: ContainerAppsPatchesSkipConfigureOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesSkipConfigureResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + containerAppName, + patchName, + patchSkipConfig, + options, + }, + spec: skipConfigureOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsPatchesSkipConfigureResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param options The options parameters. + */ + async beginSkipConfigureAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + patchSkipConfig: PatchSkipConfig, + options?: ContainerAppsPatchesSkipConfigureOptionalParams, + ): Promise { + const poller = await this.beginSkipConfigure( + resourceGroupName, + containerAppName, + patchName, + patchSkipConfig, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + async beginApply( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesApplyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesApplyResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, containerAppName, patchName, options }, + spec: applyOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsPatchesApplyResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Apply a Container Apps Patch resource with patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + async beginApplyAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesApplyOptionalParams, + ): Promise { + const poller = await this.beginApply( + resourceGroupName, + containerAppName, + patchName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListByContainerAppNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param nextLink The nextLink from the previous successful call to the ListByContainerApp method. + * @param options The options parameters. + */ + private _listByContainerAppNext( + resourceGroupName: string, + containerAppName: string, + nextLink: string, + options?: ContainerAppsPatchesListByContainerAppNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, nextLink, options }, + listByContainerAppNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByContainerAppOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PatchCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppsPatchResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.patchName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ContainerAppsPatchesDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ContainerAppsPatchesDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ContainerAppsPatchesDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ContainerAppsPatchesDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.patchName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const skipConfigureOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig", + httpMethod: "POST", + responses: { + 200: { + headersMapper: Mappers.ContainerAppsPatchesSkipConfigureHeaders, + }, + 201: { + headersMapper: Mappers.ContainerAppsPatchesSkipConfigureHeaders, + }, + 202: { + headersMapper: Mappers.ContainerAppsPatchesSkipConfigureHeaders, + }, + 204: { + headersMapper: Mappers.ContainerAppsPatchesSkipConfigureHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.patchSkipConfig, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.patchName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const applyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerAppsPatchResource, + }, + 201: { + bodyMapper: Mappers.ContainerAppsPatchResource, + }, + 202: { + bodyMapper: Mappers.ContainerAppsPatchResource, + }, + 204: { + bodyMapper: Mappers.ContainerAppsPatchResource, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.patchName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PatchCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.containerAppName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts index 6d90e47babd4..de5a75f89fef 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsRevisions.ts @@ -356,8 +356,8 @@ const listRevisionsNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerAppName, Parameters.nextLink, + Parameters.containerAppName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSessionPools.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSessionPools.ts new file mode 100644 index 000000000000..ea3d20b3ba55 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSessionPools.ts @@ -0,0 +1,740 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ContainerAppsSessionPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + SessionPool, + ContainerAppsSessionPoolsListBySubscriptionNextOptionalParams, + ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ContainerAppsSessionPoolsListBySubscriptionResponse, + ContainerAppsSessionPoolsListByResourceGroupNextOptionalParams, + ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ContainerAppsSessionPoolsListByResourceGroupResponse, + ContainerAppsSessionPoolsGetOptionalParams, + ContainerAppsSessionPoolsGetResponse, + ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ContainerAppsSessionPoolsCreateOrUpdateResponse, + SessionPoolUpdatableProperties, + ContainerAppsSessionPoolsUpdateOptionalParams, + ContainerAppsSessionPoolsUpdateResponse, + ContainerAppsSessionPoolsDeleteOptionalParams, + ContainerAppsSessionPoolsDeleteResponse, + ContainerAppsSessionPoolsListBySubscriptionNextResponse, + ContainerAppsSessionPoolsListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing ContainerAppsSessionPools operations. */ +export class ContainerAppsSessionPoolsImpl + implements ContainerAppsSessionPools +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ContainerAppsSessionPools class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the session pools in a given subscription. + * @param options The options parameters. + */ + public listBySubscription( + options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBySubscriptionPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySubscriptionPagingPage(options, settings); + }, + }; + } + + private async *listBySubscriptionPagingPage( + options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerAppsSessionPoolsListBySubscriptionResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySubscription(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySubscriptionNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySubscriptionPagingAll( + options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBySubscriptionPagingPage(options)) { + yield* page; + } + } + + /** + * Get the session pools in a given resource group of a subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ContainerAppsSessionPoolsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Get the session pools in a given subscription. + * @param options The options parameters. + */ + private _listBySubscription( + options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { options }, + listBySubscriptionOperationSpec, + ); + } + + /** + * Get the session pools in a given resource group of a subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * Get the properties of a session pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, sessionPoolName, options }, + getOperationSpec, + ); + } + + /** + * Create or update a session pool with the given properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPool, + options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + sessionPoolName, + sessionPoolEnvelope, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsSessionPoolsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a session pool with the given properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPool, + options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + sessionPoolName, + sessionPoolEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Patches a session pool using JSON merge patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPoolUpdatableProperties, + options?: ContainerAppsSessionPoolsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + sessionPoolName, + sessionPoolEnvelope, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsSessionPoolsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Patches a session pool using JSON merge patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPoolUpdatableProperties, + options?: ContainerAppsSessionPoolsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + sessionPoolName, + sessionPoolEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete the session pool with the given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, sessionPoolName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ContainerAppsSessionPoolsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete the session pool with the given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + sessionPoolName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListBySubscriptionNext + * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. + * @param options The options parameters. + */ + private _listBySubscriptionNext( + nextLink: string, + options?: ContainerAppsSessionPoolsListBySubscriptionNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listBySubscriptionNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ContainerAppsSessionPoolsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySubscriptionOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.App/sessionPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionPoolCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionPoolCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionPool, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sessionPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SessionPool, + }, + 201: { + bodyMapper: Mappers.SessionPool, + }, + 202: { + bodyMapper: Mappers.SessionPool, + }, + 204: { + bodyMapper: Mappers.SessionPool, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.sessionPoolEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sessionPoolName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.SessionPool, + }, + 201: { + bodyMapper: Mappers.SessionPool, + }, + 202: { + bodyMapper: Mappers.SessionPool, + }, + 204: { + bodyMapper: Mappers.SessionPool, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.sessionPoolEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sessionPoolName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ContainerAppsSessionPoolsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ContainerAppsSessionPoolsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ContainerAppsSessionPoolsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ContainerAppsSessionPoolsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.sessionPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionPoolCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SessionPoolCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts index 8f8859a7f989..b5bea2011311 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerAppsSourceControls.ts @@ -452,7 +452,11 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.containerAppName, Parameters.sourceControlName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [ + Parameters.contentType, + Parameters.accept, + Parameters.xMsGithubAuxiliary, + ], mediaType: "json", serializer, }; @@ -468,7 +472,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse, }, }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.ignoreWorkflowDeletionFailure, + Parameters.deleteWorkflow, + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -476,7 +484,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.containerAppName, Parameters.sourceControlName, ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.xMsGithubAuxiliary], serializer, }; const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { @@ -494,8 +502,8 @@ const listByContainerAppNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.containerAppName, Parameters.nextLink, + Parameters.containerAppName, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponentResiliencyPolicies.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponentResiliencyPolicies.ts new file mode 100644 index 000000000000..a1dc68a23ea3 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponentResiliencyPolicies.ts @@ -0,0 +1,369 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DaprComponentResiliencyPolicies } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + DaprComponentResiliencyPolicy, + DaprComponentResiliencyPoliciesListNextOptionalParams, + DaprComponentResiliencyPoliciesListOptionalParams, + DaprComponentResiliencyPoliciesListResponse, + DaprComponentResiliencyPoliciesGetOptionalParams, + DaprComponentResiliencyPoliciesGetResponse, + DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams, + DaprComponentResiliencyPoliciesCreateOrUpdateResponse, + DaprComponentResiliencyPoliciesDeleteOptionalParams, + DaprComponentResiliencyPoliciesListNextResponse, +} from "../models"; + +/// +/** Class containing DaprComponentResiliencyPolicies operations. */ +export class DaprComponentResiliencyPoliciesImpl + implements DaprComponentResiliencyPolicies +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class DaprComponentResiliencyPolicies class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the resiliency policies for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentResiliencyPoliciesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + componentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + componentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentResiliencyPoliciesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DaprComponentResiliencyPoliciesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + environmentName, + componentName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + componentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentResiliencyPoliciesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + componentName, + options, + )) { + yield* page; + } + } + + /** + * Get the resiliency policies for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentResiliencyPoliciesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, options }, + listOperationSpec, + ); + } + + /** + * Get a Dapr component resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + options?: DaprComponentResiliencyPoliciesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, name, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a resiliency policy for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency + * Policy. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy, + options?: DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + componentName, + name, + daprComponentResiliencyPolicyEnvelope, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete a resiliency policy for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + options?: DaprComponentResiliencyPoliciesDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, name, options }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + componentName: string, + nextLink: string, + options?: DaprComponentResiliencyPoliciesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, componentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentResiliencyPoliciesCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.componentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentResiliencyPolicy, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.componentName1, + Parameters.name1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentResiliencyPolicy, + }, + 201: { + bodyMapper: Mappers.DaprComponentResiliencyPolicy, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.daprComponentResiliencyPolicyEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.componentName1, + Parameters.name1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.componentName1, + Parameters.name1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprComponentResiliencyPoliciesCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + Parameters.componentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts index 475aa35e349d..58427fdb970f 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprComponents.ts @@ -298,7 +298,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse, }, }, - requestBody: Parameters.daprComponentEnvelope, + requestBody: Parameters.daprComponentEnvelope1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -307,7 +307,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.componentName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/daprSubscriptions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/daprSubscriptions.ts new file mode 100644 index 000000000000..d7153d92ef1d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/daprSubscriptions.ts @@ -0,0 +1,337 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DaprSubscriptions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + DaprSubscription, + DaprSubscriptionsListNextOptionalParams, + DaprSubscriptionsListOptionalParams, + DaprSubscriptionsListResponse, + DaprSubscriptionsGetOptionalParams, + DaprSubscriptionsGetResponse, + DaprSubscriptionsCreateOrUpdateOptionalParams, + DaprSubscriptionsCreateOrUpdateResponse, + DaprSubscriptionsDeleteOptionalParams, + DaprSubscriptionsListNextResponse, +} from "../models"; + +/// +/** Class containing DaprSubscriptions operations. */ +export class DaprSubscriptionsImpl implements DaprSubscriptions { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class DaprSubscriptions class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Dapr subscriptions for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: DaprSubscriptionsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: DaprSubscriptionsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DaprSubscriptionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: DaprSubscriptionsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * Get the Dapr subscriptions for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: DaprSubscriptionsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * Get a dapr subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprSubscriptionsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, name, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a Dapr subscription in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + daprSubscriptionEnvelope: DaprSubscription, + options?: DaprSubscriptionsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + name, + daprSubscriptionEnvelope, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete a Dapr subscription from a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprSubscriptionsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, name, options }, + deleteOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: DaprSubscriptionsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprSubscriptionsCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprSubscription, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.name1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DaprSubscription, + }, + 201: { + bodyMapper: Mappers.DaprSubscription, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.daprSubscriptionEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.name1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.name1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DaprSubscriptionsCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/dotNetComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/dotNetComponents.ts new file mode 100644 index 000000000000..fcd9ea334e1d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/dotNetComponents.ts @@ -0,0 +1,655 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DotNetComponents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + DotNetComponent, + DotNetComponentsListNextOptionalParams, + DotNetComponentsListOptionalParams, + DotNetComponentsListResponse, + DotNetComponentsGetOptionalParams, + DotNetComponentsGetResponse, + DotNetComponentsCreateOrUpdateOptionalParams, + DotNetComponentsCreateOrUpdateResponse, + DotNetComponentsUpdateOptionalParams, + DotNetComponentsUpdateResponse, + DotNetComponentsDeleteOptionalParams, + DotNetComponentsDeleteResponse, + DotNetComponentsListNextResponse, +} from "../models"; + +/// +/** Class containing DotNetComponents operations. */ +export class DotNetComponentsImpl implements DotNetComponents { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class DotNetComponents class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the .NET Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: DotNetComponentsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: DotNetComponentsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DotNetComponentsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: DotNetComponentsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * Get the .NET Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: DotNetComponentsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * Get a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, name, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a .NET Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + name, + dotNetComponentEnvelope, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + DotNetComponentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a .NET Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + name, + dotNetComponentEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Patches a .NET Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + name, + dotNetComponentEnvelope, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + DotNetComponentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Patches a .NET Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + environmentName, + name, + dotNetComponentEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, environmentName, name, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + DotNetComponentsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + environmentName, + name, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: DotNetComponentsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DotNetComponentsCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DotNetComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DotNetComponent, + }, + 201: { + bodyMapper: Mappers.DotNetComponent, + }, + 202: { + bodyMapper: Mappers.DotNetComponent, + }, + 204: { + bodyMapper: Mappers.DotNetComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.dotNetComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DotNetComponent, + }, + 201: { + bodyMapper: Mappers.DotNetComponent, + }, + 202: { + bodyMapper: Mappers.DotNetComponent, + }, + 204: { + bodyMapper: Mappers.DotNetComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.dotNetComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.DotNetComponentsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.DotNetComponentsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.DotNetComponentsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.DotNetComponentsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DotNetComponentsCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/functionsExtension.ts b/sdk/appcontainers/arm-appcontainers/src/operations/functionsExtension.ts new file mode 100644 index 000000000000..9a82b922bcc4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/functionsExtension.ts @@ -0,0 +1,83 @@ +/* + * 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. + */ + +import { FunctionsExtension } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + FunctionsExtensionInvokeFunctionsHostOptionalParams, + FunctionsExtensionInvokeFunctionsHostResponse, +} from "../models"; + +/** Class containing FunctionsExtension operations. */ +export class FunctionsExtensionImpl implements FunctionsExtension { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class FunctionsExtension class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param options The options parameters. + */ + invokeFunctionsHost( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + functionAppName: string, + options?: FunctionsExtensionInvokeFunctionsHostOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerAppName, + revisionName, + functionAppName, + options, + }, + invokeFunctionsHostOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const invokeFunctionsHostOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { type: { name: "String" } }, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.revisionName1, + Parameters.functionAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/httpRouteConfigOperations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/httpRouteConfigOperations.ts new file mode 100644 index 000000000000..4e7dfd84de3d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/httpRouteConfigOperations.ts @@ -0,0 +1,384 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { HttpRouteConfigOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + HttpRouteConfig, + HttpRouteConfigListNextOptionalParams, + HttpRouteConfigListOptionalParams, + HttpRouteConfigListResponse, + HttpRouteConfigGetOptionalParams, + HttpRouteConfigGetResponse, + HttpRouteConfigCreateOrUpdateOptionalParams, + HttpRouteConfigCreateOrUpdateResponse, + HttpRouteConfigUpdateOptionalParams, + HttpRouteConfigUpdateResponse, + HttpRouteConfigDeleteOptionalParams, + HttpRouteConfigListNextResponse, +} from "../models"; + +/// +/** Class containing HttpRouteConfigOperations operations. */ +export class HttpRouteConfigOperationsImpl + implements HttpRouteConfigOperations +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class HttpRouteConfigOperations class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Managed Http Routes in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: HttpRouteConfigListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: HttpRouteConfigListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: HttpRouteConfigListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: HttpRouteConfigListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * Get the specified Managed Http Route Config. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, httpRouteName, options }, + getOperationSpec, + ); + } + + /** + * Create or Update a Http Route Config. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, httpRouteName, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Patches an http route config resource. Only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + httpRouteConfigEnvelope: HttpRouteConfig, + options?: HttpRouteConfigUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + httpRouteName, + httpRouteConfigEnvelope, + options, + }, + updateOperationSpec, + ); + } + + /** + * Deletes the specified Managed Http Route. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, httpRouteName, options }, + deleteOperationSpec, + ); + } + + /** + * Get the Managed Http Routes in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: HttpRouteConfigListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: HttpRouteConfigListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HttpRouteConfig, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.httpRouteName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.HttpRouteConfig, + }, + 201: { + bodyMapper: Mappers.HttpRouteConfig, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.httpRouteConfigEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.httpRouteName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.HttpRouteConfig, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.httpRouteConfigEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName, + Parameters.httpRouteName1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs/{httpRouteName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.httpRouteName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/httpRouteConfigs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HttpRouteConfigCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.HttpRouteConfigCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index 4261a519c0a3..63a5607e2c41 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -6,28 +6,48 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./appResiliencyOperations"; export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./buildsByBuilderResource"; +export * from "./builds"; +export * from "./buildAuthToken"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; +export * from "./containerAppsBuildsByContainerApp"; +export * from "./containerAppsBuilds"; +export * from "./containerAppsPatches"; +export * from "./containerAppsLabelHistory"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./jobs"; +export * from "./dotNetComponents"; +export * from "./functionsExtension"; export * from "./operations"; +export * from "./javaComponents"; export * from "./jobsExecutions"; +export * from "./logicApps"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./managedEnvironmentPrivateEndpointConnections"; +export * from "./managedEnvironmentPrivateLinkResources"; +export * from "./daprComponentResiliencyPolicies"; export * from "./daprComponents"; +export * from "./daprSubscriptions"; +export * from "./httpRouteConfigOperations"; +export * from "./maintenanceConfigurations"; export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSessionPools"; export * from "./containerAppsSourceControls"; export * from "./usages"; export * from "./managedEnvironmentUsages"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/javaComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operations/javaComponents.ts new file mode 100644 index 000000000000..76f06b99552e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/javaComponents.ts @@ -0,0 +1,655 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { JavaComponents } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + JavaComponent, + JavaComponentsListNextOptionalParams, + JavaComponentsListOptionalParams, + JavaComponentsListResponse, + JavaComponentsGetOptionalParams, + JavaComponentsGetResponse, + JavaComponentsCreateOrUpdateOptionalParams, + JavaComponentsCreateOrUpdateResponse, + JavaComponentsUpdateOptionalParams, + JavaComponentsUpdateResponse, + JavaComponentsDeleteOptionalParams, + JavaComponentsDeleteResponse, + JavaComponentsListNextResponse, +} from "../models"; + +/// +/** Class containing JavaComponents operations. */ +export class JavaComponentsImpl implements JavaComponents { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class JavaComponents class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Get the Java Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: JavaComponentsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: JavaComponentsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: JavaComponentsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: JavaComponentsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * Get the Java Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: JavaComponentsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * Get a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, name, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates a Java Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + name, + javaComponentEnvelope, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + JavaComponentsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates a Java Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + name, + javaComponentEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Patches a Java Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + name, + javaComponentEnvelope, + options, + }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + JavaComponentsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Patches a Java Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + environmentName, + name, + javaComponentEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, environmentName, name, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + JavaComponentsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Delete a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + environmentName, + name, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: JavaComponentsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JavaComponentsCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JavaComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.JavaComponent, + }, + 201: { + bodyMapper: Mappers.JavaComponent, + }, + 202: { + bodyMapper: Mappers.JavaComponent, + }, + 204: { + bodyMapper: Mappers.JavaComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.javaComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.JavaComponent, + }, + 201: { + bodyMapper: Mappers.JavaComponent, + }, + 202: { + bodyMapper: Mappers.JavaComponent, + }, + 204: { + bodyMapper: Mappers.JavaComponent, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.javaComponentEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.JavaComponentsDeleteHeaders, + }, + 201: { + headersMapper: Mappers.JavaComponentsDeleteHeaders, + }, + 202: { + headersMapper: Mappers.JavaComponentsDeleteHeaders, + }, + 204: { + headersMapper: Mappers.JavaComponentsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JavaComponentsCollection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts index 652328464eab..6a5d9cbb123a 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts @@ -50,6 +50,10 @@ import { JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, JobsListSecretsResponse, + JobsResumeOptionalParams, + JobsResumeResponse, + JobsSuspendOptionalParams, + JobsSuspendResponse, JobsListDetectorsNextResponse, JobsListBySubscriptionNextResponse, JobsListByResourceGroupNextResponse, @@ -912,6 +916,172 @@ export class JobsImpl implements Jobs { ); } + /** + * Resumes a suspended job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + async beginResume( + resourceGroupName: string, + jobName: string, + options?: JobsResumeOptionalParams, + ): Promise< + SimplePollerLike, JobsResumeResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, options }, + spec: resumeOperationSpec, + }); + const poller = await createHttpPoller< + JobsResumeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Resumes a suspended job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + async beginResumeAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsResumeOptionalParams, + ): Promise { + const poller = await this.beginResume(resourceGroupName, jobName, options); + return poller.pollUntilDone(); + } + + /** + * Suspends a job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + async beginSuspend( + resourceGroupName: string, + jobName: string, + options?: JobsSuspendOptionalParams, + ): Promise< + SimplePollerLike, JobsSuspendResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, jobName, options }, + spec: suspendOperationSpec, + }); + const poller = await createHttpPoller< + JobsSuspendResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Suspends a job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + async beginSuspendAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsSuspendOptionalParams, + ): Promise { + const poller = await this.beginSuspend(resourceGroupName, jobName, options); + return poller.pollUntilDone(); + } + /** * ListDetectorsNext * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1116,7 +1286,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.jobName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -1170,7 +1340,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.jobName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -1202,7 +1372,7 @@ const startOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.jobName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -1280,6 +1450,66 @@ const listSecretsOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const resumeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Job, + }, + 201: { + bodyMapper: Mappers.Job, + }, + 202: { + bodyMapper: Mappers.Job, + }, + 204: { + bodyMapper: Mappers.Job, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const suspendOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.Job, + }, + 201: { + bodyMapper: Mappers.Job, + }, + 202: { + bodyMapper: Mappers.Job, + }, + 204: { + bodyMapper: Mappers.Job, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; const listDetectorsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/logicApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/logicApps.ts new file mode 100644 index 000000000000..cf4686b5c4bf --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/logicApps.ts @@ -0,0 +1,549 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { LogicApps } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + WorkflowEnvelope, + LogicAppsListWorkflowsNextOptionalParams, + LogicAppsListWorkflowsOptionalParams, + LogicAppsListWorkflowsResponse, + LogicAppsGetOptionalParams, + LogicAppsGetResponse, + LogicApp, + LogicAppsCreateOrUpdateOptionalParams, + LogicAppsCreateOrUpdateResponse, + LogicAppsDeleteOptionalParams, + LogicAppsGetWorkflowOptionalParams, + LogicAppsGetWorkflowResponse, + LogicAppsDeployWorkflowArtifactsOptionalParams, + LogicAppsListWorkflowsConnectionsOptionalParams, + LogicAppsListWorkflowsConnectionsResponse, + LogicAppsProxyMethod, + LogicAppsInvokeOptionalParams, + LogicAppsInvokeResponse, + LogicAppsListWorkflowsNextResponse, +} from "../models"; + +/// +/** Class containing LogicApps operations. */ +export class LogicAppsImpl implements LogicApps { + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class LogicApps class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List the workflows for a logic app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + public listWorkflows( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listWorkflowsPagingAll( + resourceGroupName, + containerAppName, + logicAppName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listWorkflowsPagingPage( + resourceGroupName, + containerAppName, + logicAppName, + options, + settings, + ); + }, + }; + } + + private async *listWorkflowsPagingPage( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: LogicAppsListWorkflowsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listWorkflows( + resourceGroupName, + containerAppName, + logicAppName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listWorkflowsNext( + resourceGroupName, + containerAppName, + logicAppName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listWorkflowsPagingAll( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listWorkflowsPagingPage( + resourceGroupName, + containerAppName, + logicAppName, + options, + )) { + yield* page; + } + } + + /** + * Gets a logic app extension resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, options }, + getOperationSpec, + ); + } + + /** + * Create or update a Logic App extension resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param resource Logic app resource properties. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + resource: LogicApp, + options?: LogicAppsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, resource, options }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes a Logic App extension resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, options }, + deleteOperationSpec, + ); + } + + /** + * List the workflows for a logic app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + private _listWorkflows( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, options }, + listWorkflowsOperationSpec, + ); + } + + /** + * Get workflow information by its name + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param workflowName Workflow name. + * @param options The options parameters. + */ + getWorkflow( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + workflowName: string, + options?: LogicAppsGetWorkflowOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerAppName, + logicAppName, + workflowName, + options, + }, + getWorkflowOperationSpec, + ); + } + + /** + * Creates or updates the artifacts for the logic app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + deployWorkflowArtifacts( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsDeployWorkflowArtifactsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, options }, + deployWorkflowArtifactsOperationSpec, + ); + } + + /** + * Gets logic app's connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + listWorkflowsConnections( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsConnectionsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, options }, + listWorkflowsConnectionsOperationSpec, + ); + } + + /** + * Proxies a the API call to the logic app backed by the container app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the LogicApp App, the extension resource. + * @param xMsLogicAppsProxyPath The proxy path for the API call + * @param xMsLogicAppsProxyMethod The proxy method for the API call + * @param options The options parameters. + */ + invoke( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + xMsLogicAppsProxyPath: string, + xMsLogicAppsProxyMethod: LogicAppsProxyMethod, + options?: LogicAppsInvokeOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + containerAppName, + logicAppName, + xMsLogicAppsProxyPath, + xMsLogicAppsProxyMethod, + options, + }, + invokeOperationSpec, + ); + } + + /** + * ListWorkflowsNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param nextLink The nextLink from the previous successful call to the ListWorkflows method. + * @param options The options parameters. + */ + private _listWorkflowsNext( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + nextLink: string, + options?: LogicAppsListWorkflowsNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, containerAppName, logicAppName, nextLink, options }, + listWorkflowsNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicApp, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LogicApp, + }, + 201: { + bodyMapper: Mappers.LogicApp, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.resource, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listWorkflowsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowEnvelopeCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getWorkflowOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows/{workflowName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowEnvelope, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + Parameters.workflowName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const deployWorkflowArtifactsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/deployWorkflowArtifacts", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.workflowArtifacts, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const listWorkflowsConnectionsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/listWorkflowsConnections", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.WorkflowEnvelope, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const invokeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/invoke", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [ + Parameters.accept, + Parameters.xMsLogicAppsProxyPath, + Parameters.xMsLogicAppsProxyMethod, + ], + serializer, +}; +const listWorkflowsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkflowEnvelopeCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.containerAppName1, + Parameters.logicAppName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/maintenanceConfigurations.ts b/sdk/appcontainers/arm-appcontainers/src/operations/maintenanceConfigurations.ts new file mode 100644 index 000000000000..bf43ce9f9133 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/maintenanceConfigurations.ts @@ -0,0 +1,340 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { MaintenanceConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + MaintenanceConfigurationResource, + MaintenanceConfigurationsListNextOptionalParams, + MaintenanceConfigurationsListOptionalParams, + MaintenanceConfigurationsListResponse, + MaintenanceConfigurationsCreateOrUpdateOptionalParams, + MaintenanceConfigurationsCreateOrUpdateResponse, + MaintenanceConfigurationsDeleteOptionalParams, + MaintenanceConfigurationsGetOptionalParams, + MaintenanceConfigurationsGetResponse, + MaintenanceConfigurationsListNextResponse, +} from "../models"; + +/// +/** Class containing MaintenanceConfigurations operations. */ +export class MaintenanceConfigurationsImpl + implements MaintenanceConfigurations +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class MaintenanceConfigurations class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: MaintenanceConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: MaintenanceConfigurationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: MaintenanceConfigurationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: MaintenanceConfigurationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * Gets all maintenance configurations in the specified Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: MaintenanceConfigurationsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * Create or update the maintenance configuration for Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for + * ManagedEnvironment . + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + configName: string, + maintenanceConfigurationEnvelope: MaintenanceConfigurationResource, + options?: MaintenanceConfigurationsCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + configName, + maintenanceConfigurationEnvelope, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + configName: string, + options?: MaintenanceConfigurationsDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, configName, options }, + deleteOperationSpec, + ); + } + + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + configName: string, + options?: MaintenanceConfigurationsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, configName, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: MaintenanceConfigurationsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/maintenanceConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MaintenanceConfigurationCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MaintenanceConfigurationResource, + }, + 201: { + bodyMapper: Mappers.MaintenanceConfigurationResource, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.maintenanceConfigurationEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.configName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.configName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironment/{environmentName}/maintenanceConfigurations/{configName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MaintenanceConfigurationResource, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.configName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MaintenanceConfigurationCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts index e2e49f2d1617..d5f3336fbda4 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedCertificates.ts @@ -386,7 +386,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.environmentName, Parameters.managedCertificateName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -431,7 +431,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.environmentName, Parameters.managedCertificateName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateEndpointConnections.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateEndpointConnections.ts new file mode 100644 index 000000000000..862d98b8492f --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateEndpointConnections.ts @@ -0,0 +1,534 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedEnvironmentPrivateEndpointConnections } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PrivateEndpointConnection, + ManagedEnvironmentPrivateEndpointConnectionsListNextOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsListResponse, + ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsGetResponse, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse, + ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse, + ManagedEnvironmentPrivateEndpointConnectionsListNextResponse, +} from "../models"; + +/// +/** Class containing ManagedEnvironmentPrivateEndpointConnections operations. */ +export class ManagedEnvironmentPrivateEndpointConnectionsImpl + implements ManagedEnvironmentPrivateEndpointConnections +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentPrivateEndpointConnections class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List private endpoint connections for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedEnvironmentPrivateEndpointConnectionsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * List private endpoint connections for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * Get a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + environmentName, + privateEndpointConnectionName, + options, + }, + getOperationSpec, + ); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionEnvelope: PrivateEndpointConnection, + options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + privateEndpointConnectionName, + privateEndpointConnectionEnvelope, + options, + }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionEnvelope: PrivateEndpointConnection, + options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + environmentName, + privateEndpointConnectionName, + privateEndpointConnectionEnvelope, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ) => { + let currentRawResponse: coreClient.FullOperationResponse | undefined = + undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown, + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback, + }, + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON(), + }, + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + environmentName, + privateEndpointConnectionName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Delete a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + environmentName, + privateEndpointConnectionName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.privateEndpointConnectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + 201: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + 202: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + 204: { + bodyMapper: Mappers.PrivateEndpointConnection, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + requestBody: Parameters.privateEndpointConnectionEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.privateEndpointConnectionName, + ], + headerParameters: [Parameters.contentType, Parameters.accept], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: + Mappers.ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders, + }, + 201: { + headersMapper: + Mappers.ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders, + }, + 202: { + headersMapper: + Mappers.ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders, + }, + 204: { + headersMapper: + Mappers.ManagedEnvironmentPrivateEndpointConnectionsDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + Parameters.privateEndpointConnectionName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateLinkResources.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateLinkResources.ts new file mode 100644 index 000000000000..7f547281ed18 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentPrivateLinkResources.ts @@ -0,0 +1,199 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedEnvironmentPrivateLinkResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerAppsAPIClient } from "../containerAppsAPIClient"; +import { + PrivateLinkResource, + ManagedEnvironmentPrivateLinkResourcesListNextOptionalParams, + ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + ManagedEnvironmentPrivateLinkResourcesListResponse, + ManagedEnvironmentPrivateLinkResourcesListNextResponse, +} from "../models"; + +/// +/** Class containing ManagedEnvironmentPrivateLinkResources operations. */ +export class ManagedEnvironmentPrivateLinkResourcesImpl + implements ManagedEnvironmentPrivateLinkResources +{ + private readonly client: ContainerAppsAPIClient; + + /** + * Initialize a new instance of the class ManagedEnvironmentPrivateLinkResources class. + * @param client Reference to the service client + */ + constructor(client: ContainerAppsAPIClient) { + this.client = client; + } + + /** + * List private link resources for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + environmentName, + options, + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + environmentName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ManagedEnvironmentPrivateLinkResourcesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, environmentName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + environmentName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + environmentName, + options, + )) { + yield* page; + } + } + + /** + * List private link resources for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + environmentName: string, + nextLink: string, + options?: ManagedEnvironmentPrivateLinkResourcesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, environmentName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateLinkResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.environmentName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentUsages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentUsages.ts index b10ec59c4ab6..a6c7efe0e7ba 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentUsages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentUsages.ts @@ -169,7 +169,7 @@ const listOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.environmentName1, + Parameters.environmentName2, ], headerParameters: [Parameters.accept], serializer, @@ -190,7 +190,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.environmentName1, + Parameters.environmentName2, ], headerParameters: [Parameters.accept], serializer, diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts index 56ad9a776a50..4ffe90f9199a 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironments.ts @@ -763,7 +763,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; @@ -817,7 +817,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts index 472d3aafbb72..a4c6b3ac5119 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/managedEnvironmentsStorages.ts @@ -184,7 +184,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.storageName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts b/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts index 69a979bfe01c..e86dee1ef889 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/namespaces.ts @@ -75,7 +75,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.environmentName, ], - headerParameters: [Parameters.accept, Parameters.contentType], + headerParameters: [Parameters.contentType, Parameters.accept], mediaType: "json", serializer, }; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/appResiliencyOperations.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/appResiliencyOperations.ts new file mode 100644 index 000000000000..02ddd9a3dcff --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/appResiliencyOperations.ts @@ -0,0 +1,92 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + AppResiliency, + AppResiliencyListOptionalParams, + AppResiliencyCreateOrUpdateOptionalParams, + AppResiliencyCreateOrUpdateResponse, + AppResiliencyUpdateOptionalParams, + AppResiliencyUpdateResponse, + AppResiliencyDeleteOptionalParams, + AppResiliencyGetOptionalParams, + AppResiliencyGetResponse, +} from "../models"; + +/// +/** Interface representing a AppResiliencyOperations. */ +export interface AppResiliencyOperations { + /** + * List container app resiliency policies. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + appName: string, + options?: AppResiliencyListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Create or update container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + appName: string, + name: string, + resiliencyEnvelope: AppResiliency, + options?: AppResiliencyCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + appName: string, + name: string, + resiliencyEnvelope: AppResiliency, + options?: AppResiliencyUpdateOptionalParams, + ): Promise; + /** + * Delete container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + appName: string, + name: string, + options?: AppResiliencyDeleteOptionalParams, + ): Promise; + /** + * Get container app resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + appName: string, + name: string, + options?: AppResiliencyGetOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildAuthToken.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildAuthToken.ts new file mode 100644 index 000000000000..e3809bfe5362 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildAuthToken.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { + BuildAuthTokenListOptionalParams, + BuildAuthTokenListResponse, +} from "../models"; + +/** Interface representing a BuildAuthToken. */ +export interface BuildAuthToken { + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildAuthTokenListOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts new file mode 100644 index 000000000000..cd798024a5b0 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts @@ -0,0 +1,145 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + BuilderResource, + BuildersListBySubscriptionOptionalParams, + BuildersListByResourceGroupOptionalParams, + BuildersGetOptionalParams, + BuildersGetResponse, + BuildersCreateOrUpdateOptionalParams, + BuildersCreateOrUpdateResponse, + BuilderResourceUpdate, + BuildersUpdateOptionalParams, + BuildersUpdateResponse, + BuildersDeleteOptionalParams, + BuildersDeleteResponse, +} from "../models"; + +/// +/** Interface representing a Builders. */ +export interface Builders { + /** + * List BuilderResource resources by subscription ID + * @param options The options parameters. + */ + listBySubscription( + options?: BuildersListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List BuilderResource resources by resource group + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: BuildersListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + options?: BuildersGetOptionalParams, + ): Promise; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersCreateOrUpdateResponse + > + >; + /** + * Create or update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResource, + options?: BuildersCreateOrUpdateOptionalParams, + ): Promise; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersUpdateResponse + > + >; + /** + * Update a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + builderName: string, + builderEnvelope: BuilderResourceUpdate, + options?: BuildersUpdateOptionalParams, + ): Promise; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildersDeleteResponse + > + >; + /** + * Delete a BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + options?: BuildersDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts new file mode 100644 index 000000000000..4bda16271c98 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts @@ -0,0 +1,98 @@ +/* + * 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. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + BuildsGetOptionalParams, + BuildsGetResponse, + BuildResource, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams, + BuildsDeleteResponse, +} from "../models"; + +/** Interface representing a Builds. */ +export interface Builds { + /** + * Get a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsGetOptionalParams, + ): Promise; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + BuildsCreateOrUpdateResponse + > + >; + /** + * Create a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + buildEnvelope: BuildResource, + options?: BuildsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams, + ): Promise< + SimplePollerLike, BuildsDeleteResponse> + >; + /** + * Delete a BuildResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + builderName: string, + buildName: string, + options?: BuildsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildsByBuilderResource.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildsByBuilderResource.ts new file mode 100644 index 000000000000..8fc0552a0b84 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/buildsByBuilderResource.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + BuildResource, + BuildsByBuilderResourceListOptionalParams, +} from "../models"; + +/// +/** Interface representing a BuildsByBuilderResource. */ +export interface BuildsByBuilderResource { + /** + * List BuildResource resources by BuilderResource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + builderName: string, + options?: BuildsByBuilderResourceListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts index 8a39598f59f0..769cb41d382b 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsCertificates.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Certificate, ConnectedEnvironmentsCertificatesListOptionalParams, @@ -15,6 +16,7 @@ import { ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, ConnectedEnvironmentsCertificatesCreateOrUpdateResponse, ConnectedEnvironmentsCertificatesDeleteOptionalParams, + ConnectedEnvironmentsCertificatesDeleteResponse, CertificatePatch, ConnectedEnvironmentsCertificatesUpdateOptionalParams, ConnectedEnvironmentsCertificatesUpdateResponse, @@ -54,7 +56,25 @@ export interface ConnectedEnvironmentsCertificates { * @param certificateName Name of the Certificate. * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesCreateOrUpdateResponse + > + >; + /** + * Create or Update a Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, @@ -67,12 +87,50 @@ export interface ConnectedEnvironmentsCertificates { * @param certificateName Name of the Certificate. * @param options The options parameters. */ - delete( + beginDelete( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams, - ): Promise; + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesDeleteResponse + > + >; + /** + * Deletes the specified Certificate. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + options?: ConnectedEnvironmentsCertificatesDeleteOptionalParams, + ): Promise; + /** + * Patches a certificate. Currently only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + certificateName: string, + certificateEnvelope: CertificatePatch, + options?: ConnectedEnvironmentsCertificatesUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsCertificatesUpdateResponse + > + >; /** * Patches a certificate. Currently only patching of tags is supported * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -81,7 +139,7 @@ export interface ConnectedEnvironmentsCertificates { * @param certificateEnvelope Properties of a certificate that need to be updated * @param options The options parameters. */ - update( + beginUpdateAndWait( resourceGroupName: string, connectedEnvironmentName: string, certificateName: string, diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts index ad829ef3d7f4..1ff782b41bb1 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsDaprComponents.ts @@ -7,14 +7,16 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { - DaprComponent, + ConnectedEnvironmentDaprComponent, ConnectedEnvironmentsDaprComponentsListOptionalParams, ConnectedEnvironmentsDaprComponentsGetOptionalParams, ConnectedEnvironmentsDaprComponentsGetResponse, ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse, ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ConnectedEnvironmentsDaprComponentsDeleteResponse, ConnectedEnvironmentsDaprComponentsListSecretsOptionalParams, ConnectedEnvironmentsDaprComponentsListSecretsResponse, } from "../models"; @@ -32,7 +34,7 @@ export interface ConnectedEnvironmentsDaprComponents { resourceGroupName: string, connectedEnvironmentName: string, options?: ConnectedEnvironmentsDaprComponentsListOptionalParams, - ): PagedAsyncIterableIterator; + ): PagedAsyncIterableIterator; /** * Get a dapr component. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -54,11 +56,31 @@ export interface ConnectedEnvironmentsDaprComponents { * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( resourceGroupName: string, connectedEnvironmentName: string, componentName: string, - daprComponentEnvelope: DaprComponent, + daprComponentEnvelope: ConnectedEnvironmentDaprComponent, + options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsDaprComponentsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a Dapr Component in a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + daprComponentEnvelope: ConnectedEnvironmentDaprComponent, options?: ConnectedEnvironmentsDaprComponentsCreateOrUpdateOptionalParams, ): Promise; /** @@ -68,12 +90,30 @@ export interface ConnectedEnvironmentsDaprComponents { * @param componentName Name of the Dapr Component. * @param options The options parameters. */ - delete( + beginDelete( + resourceGroupName: string, + connectedEnvironmentName: string, + componentName: string, + options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsDaprComponentsDeleteResponse + > + >; + /** + * Delete a Dapr Component from a connected environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + beginDeleteAndWait( resourceGroupName: string, connectedEnvironmentName: string, componentName: string, options?: ConnectedEnvironmentsDaprComponentsDeleteOptionalParams, - ): Promise; + ): Promise; /** * List secrets for a dapr component * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts index d83f94c38661..1dcfe27aa8f8 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/connectedEnvironmentsStorages.ts @@ -6,6 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ConnectedEnvironmentsStoragesListOptionalParams, ConnectedEnvironmentsStoragesListResponse, @@ -15,6 +16,7 @@ import { ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, ConnectedEnvironmentsStoragesCreateOrUpdateResponse, ConnectedEnvironmentsStoragesDeleteOptionalParams, + ConnectedEnvironmentsStoragesDeleteResponse, } from "../models"; /** Interface representing a ConnectedEnvironmentsStorages. */ @@ -51,7 +53,27 @@ export interface ConnectedEnvironmentsStorages { * @param storageEnvelope Configuration details of storage. * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + storageEnvelope: ConnectedEnvironmentStorage, + options?: ConnectedEnvironmentsStoragesCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsStoragesCreateOrUpdateResponse + > + >; + /** + * Create or update storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param storageEnvelope Configuration details of storage. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( resourceGroupName: string, connectedEnvironmentName: string, storageName: string, @@ -65,10 +87,28 @@ export interface ConnectedEnvironmentsStorages { * @param storageName Name of the storage. * @param options The options parameters. */ - delete( + beginDelete( + resourceGroupName: string, + connectedEnvironmentName: string, + storageName: string, + options?: ConnectedEnvironmentsStoragesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ConnectedEnvironmentsStoragesDeleteResponse + > + >; + /** + * Delete storage for a connectedEnvironment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @param options The options parameters. + */ + beginDeleteAndWait( resourceGroupName: string, connectedEnvironmentName: string, storageName: string, options?: ConnectedEnvironmentsStoragesDeleteOptionalParams, - ): Promise; + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuilds.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuilds.ts new file mode 100644 index 000000000000..8e998eedd8b2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuilds.ts @@ -0,0 +1,63 @@ +/* + * 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. + */ + +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ContainerAppsBuildsGetOptionalParams, + ContainerAppsBuildsGetResponse, + ContainerAppsBuildsDeleteOptionalParams, + ContainerAppsBuildsDeleteResponse, +} from "../models"; + +/** Interface representing a ContainerAppsBuilds. */ +export interface ContainerAppsBuilds { + /** + * Get a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsGetOptionalParams, + ): Promise; + /** + * Delete a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsBuildsDeleteResponse + > + >; + /** + * Delete a Container Apps Build resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + buildName: string, + options?: ContainerAppsBuildsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuildsByContainerApp.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuildsByContainerApp.ts new file mode 100644 index 000000000000..3c9655f51f28 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsBuildsByContainerApp.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ContainerAppsBuildResource, + ContainerAppsBuildsByContainerAppListOptionalParams, +} from "../models"; + +/// +/** Interface representing a ContainerAppsBuildsByContainerApp. */ +export interface ContainerAppsBuildsByContainerApp { + /** + * List Container Apps Build resources by Container App + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsBuildsByContainerAppListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsLabelHistory.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsLabelHistory.ts new file mode 100644 index 000000000000..2d9473acb594 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsLabelHistory.ts @@ -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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + LabelHistory, + ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ContainerAppsLabelHistoryGetLabelHistoryOptionalParams, + ContainerAppsLabelHistoryGetLabelHistoryResponse, +} from "../models"; + +/// +/** Interface representing a ContainerAppsLabelHistory. */ +export interface ContainerAppsLabelHistory { + /** + * Get the Label History for a given Container App. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param options The options parameters. + */ + listLabelHistory( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsLabelHistoryListLabelHistoryOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the history of a label. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App + * @param labelName Name of the Container App label. + * @param options The options parameters. + */ + getLabelHistory( + resourceGroupName: string, + containerAppName: string, + labelName: string, + options?: ContainerAppsLabelHistoryGetLabelHistoryOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsPatches.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsPatches.ts new file mode 100644 index 000000000000..65cfb81a6351 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsPatches.ts @@ -0,0 +1,149 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ContainerAppsPatchResource, + ContainerAppsPatchesListByContainerAppOptionalParams, + ContainerAppsPatchesGetOptionalParams, + ContainerAppsPatchesGetResponse, + ContainerAppsPatchesDeleteOptionalParams, + ContainerAppsPatchesDeleteResponse, + PatchSkipConfig, + ContainerAppsPatchesSkipConfigureOptionalParams, + ContainerAppsPatchesSkipConfigureResponse, + ContainerAppsPatchesApplyOptionalParams, + ContainerAppsPatchesApplyResponse, +} from "../models"; + +/// +/** Interface representing a ContainerAppsPatches. */ +export interface ContainerAppsPatches { + /** + * List Container Apps Patch resources by ContainerApp. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param options The options parameters. + */ + listByContainerApp( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsPatchesListByContainerAppOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get details for specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesGetOptionalParams, + ): Promise; + /** + * Delete specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesDeleteResponse + > + >; + /** + * Delete specific Container Apps Patch by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesDeleteOptionalParams, + ): Promise; + /** + * Configure the Container Apps Patch skip option by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param options The options parameters. + */ + beginSkipConfigure( + resourceGroupName: string, + containerAppName: string, + patchName: string, + patchSkipConfig: PatchSkipConfig, + options?: ContainerAppsPatchesSkipConfigureOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesSkipConfigureResponse + > + >; + /** + * Configure the Container Apps Patch skip option by patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param options The options parameters. + */ + beginSkipConfigureAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + patchSkipConfig: PatchSkipConfig, + options?: ContainerAppsPatchesSkipConfigureOptionalParams, + ): Promise; + /** + * Apply a Container Apps Patch resource with patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + beginApply( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesApplyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsPatchesApplyResponse + > + >; + /** + * Apply a Container Apps Patch resource with patch name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch + * @param options The options parameters. + */ + beginApplyAndWait( + resourceGroupName: string, + containerAppName: string, + patchName: string, + options?: ContainerAppsPatchesApplyOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSessionPools.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSessionPools.ts new file mode 100644 index 000000000000..a60d6ec80cd2 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerAppsSessionPools.ts @@ -0,0 +1,145 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + SessionPool, + ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ContainerAppsSessionPoolsGetOptionalParams, + ContainerAppsSessionPoolsGetResponse, + ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ContainerAppsSessionPoolsCreateOrUpdateResponse, + SessionPoolUpdatableProperties, + ContainerAppsSessionPoolsUpdateOptionalParams, + ContainerAppsSessionPoolsUpdateResponse, + ContainerAppsSessionPoolsDeleteOptionalParams, + ContainerAppsSessionPoolsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a ContainerAppsSessionPools. */ +export interface ContainerAppsSessionPools { + /** + * Get the session pools in a given subscription. + * @param options The options parameters. + */ + listBySubscription( + options?: ContainerAppsSessionPoolsListBySubscriptionOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the session pools in a given resource group of a subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ContainerAppsSessionPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the properties of a session pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsGetOptionalParams, + ): Promise; + /** + * Create or update a session pool with the given properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPool, + options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsCreateOrUpdateResponse + > + >; + /** + * Create or update a session pool with the given properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPool, + options?: ContainerAppsSessionPoolsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Patches a session pool using JSON merge patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPoolUpdatableProperties, + options?: ContainerAppsSessionPoolsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsUpdateResponse + > + >; + /** + * Patches a session pool using JSON merge patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + sessionPoolName: string, + sessionPoolEnvelope: SessionPoolUpdatableProperties, + options?: ContainerAppsSessionPoolsUpdateOptionalParams, + ): Promise; + /** + * Delete the session pool with the given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsSessionPoolsDeleteResponse + > + >; + /** + * Delete the session pool with the given name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + sessionPoolName: string, + options?: ContainerAppsSessionPoolsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponentResiliencyPolicies.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponentResiliencyPolicies.ts new file mode 100644 index 000000000000..ba6615f2fc7e --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprComponentResiliencyPolicies.ts @@ -0,0 +1,84 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DaprComponentResiliencyPolicy, + DaprComponentResiliencyPoliciesListOptionalParams, + DaprComponentResiliencyPoliciesGetOptionalParams, + DaprComponentResiliencyPoliciesGetResponse, + DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams, + DaprComponentResiliencyPoliciesCreateOrUpdateResponse, + DaprComponentResiliencyPoliciesDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a DaprComponentResiliencyPolicies. */ +export interface DaprComponentResiliencyPolicies { + /** + * Get the resiliency policies for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + componentName: string, + options?: DaprComponentResiliencyPoliciesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a Dapr component resiliency policy. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + options?: DaprComponentResiliencyPoliciesGetOptionalParams, + ): Promise; + /** + * Creates or updates a resiliency policy for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency + * Policy. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + daprComponentResiliencyPolicyEnvelope: DaprComponentResiliencyPolicy, + options?: DaprComponentResiliencyPoliciesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a resiliency policy for a Dapr component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + componentName: string, + name: string, + options?: DaprComponentResiliencyPoliciesDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprSubscriptions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprSubscriptions.ts new file mode 100644 index 000000000000..958294ab0a36 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/daprSubscriptions.ts @@ -0,0 +1,75 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DaprSubscription, + DaprSubscriptionsListOptionalParams, + DaprSubscriptionsGetOptionalParams, + DaprSubscriptionsGetResponse, + DaprSubscriptionsCreateOrUpdateOptionalParams, + DaprSubscriptionsCreateOrUpdateResponse, + DaprSubscriptionsDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a DaprSubscriptions. */ +export interface DaprSubscriptions { + /** + * Get the Dapr subscriptions for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: DaprSubscriptionsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a dapr subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprSubscriptionsGetOptionalParams, + ): Promise; + /** + * Creates or updates a Dapr subscription in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + daprSubscriptionEnvelope: DaprSubscription, + options?: DaprSubscriptionsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a Dapr subscription from a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DaprSubscriptionsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/dotNetComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/dotNetComponents.ts new file mode 100644 index 000000000000..42d2b70d9a67 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/dotNetComponents.ts @@ -0,0 +1,152 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + DotNetComponent, + DotNetComponentsListOptionalParams, + DotNetComponentsGetOptionalParams, + DotNetComponentsGetResponse, + DotNetComponentsCreateOrUpdateOptionalParams, + DotNetComponentsCreateOrUpdateResponse, + DotNetComponentsUpdateOptionalParams, + DotNetComponentsUpdateResponse, + DotNetComponentsDeleteOptionalParams, + DotNetComponentsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a DotNetComponents. */ +export interface DotNetComponents { + /** + * Get the .NET Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: DotNetComponentsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsGetOptionalParams, + ): Promise; + /** + * Creates or updates a .NET Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a .NET Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Patches a .NET Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsUpdateResponse + > + >; + /** + * Patches a .NET Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + dotNetComponentEnvelope: DotNetComponent, + options?: DotNetComponentsUpdateOptionalParams, + ): Promise; + /** + * Delete a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + DotNetComponentsDeleteResponse + > + >; + /** + * Delete a .NET Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + options?: DotNetComponentsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/functionsExtension.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/functionsExtension.ts new file mode 100644 index 000000000000..c49faec48872 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/functionsExtension.ts @@ -0,0 +1,31 @@ +/* + * 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. + */ + +import { + FunctionsExtensionInvokeFunctionsHostOptionalParams, + FunctionsExtensionInvokeFunctionsHostResponse, +} from "../models"; + +/** Interface representing a FunctionsExtension. */ +export interface FunctionsExtension { + /** + * Proxies a Functions host call to the function app backed by the container app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param options The options parameters. + */ + invokeFunctionsHost( + resourceGroupName: string, + containerAppName: string, + revisionName: string, + functionAppName: string, + options?: FunctionsExtensionInvokeFunctionsHostOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/httpRouteConfigOperations.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/httpRouteConfigOperations.ts new file mode 100644 index 000000000000..3d4475636fb3 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/httpRouteConfigOperations.ts @@ -0,0 +1,90 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + HttpRouteConfig, + HttpRouteConfigListOptionalParams, + HttpRouteConfigGetOptionalParams, + HttpRouteConfigGetResponse, + HttpRouteConfigCreateOrUpdateOptionalParams, + HttpRouteConfigCreateOrUpdateResponse, + HttpRouteConfigUpdateOptionalParams, + HttpRouteConfigUpdateResponse, + HttpRouteConfigDeleteOptionalParams, +} from "../models"; + +/// +/** Interface representing a HttpRouteConfigOperations. */ +export interface HttpRouteConfigOperations { + /** + * Get the Managed Http Routes in a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: HttpRouteConfigListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get the specified Managed Http Route Config. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigGetOptionalParams, + ): Promise; + /** + * Create or Update a Http Route Config. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigCreateOrUpdateOptionalParams, + ): Promise; + /** + * Patches an http route config resource. Only patching of tags is supported + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param httpRouteConfigEnvelope Properties of http route config that need to be updated + * @param options The options parameters. + */ + update( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + httpRouteConfigEnvelope: HttpRouteConfig, + options?: HttpRouteConfigUpdateOptionalParams, + ): Promise; + /** + * Deletes the specified Managed Http Route. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param httpRouteName Name of the Http Route Config Resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + httpRouteName: string, + options?: HttpRouteConfigDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index 4261a519c0a3..63a5607e2c41 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -6,28 +6,48 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./appResiliencyOperations"; export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./buildsByBuilderResource"; +export * from "./builds"; +export * from "./buildAuthToken"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; +export * from "./containerAppsBuildsByContainerApp"; +export * from "./containerAppsBuilds"; +export * from "./containerAppsPatches"; +export * from "./containerAppsLabelHistory"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./jobs"; +export * from "./dotNetComponents"; +export * from "./functionsExtension"; export * from "./operations"; +export * from "./javaComponents"; export * from "./jobsExecutions"; +export * from "./logicApps"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; export * from "./namespaces"; +export * from "./managedEnvironmentPrivateEndpointConnections"; +export * from "./managedEnvironmentPrivateLinkResources"; +export * from "./daprComponentResiliencyPolicies"; export * from "./daprComponents"; +export * from "./daprSubscriptions"; +export * from "./httpRouteConfigOperations"; +export * from "./maintenanceConfigurations"; export * from "./managedEnvironmentsStorages"; +export * from "./containerAppsSessionPools"; export * from "./containerAppsSourceControls"; export * from "./usages"; export * from "./managedEnvironmentUsages"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/javaComponents.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/javaComponents.ts new file mode 100644 index 000000000000..a523c0ea6b2b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/javaComponents.ts @@ -0,0 +1,152 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + JavaComponent, + JavaComponentsListOptionalParams, + JavaComponentsGetOptionalParams, + JavaComponentsGetResponse, + JavaComponentsCreateOrUpdateOptionalParams, + JavaComponentsCreateOrUpdateResponse, + JavaComponentsUpdateOptionalParams, + JavaComponentsUpdateResponse, + JavaComponentsDeleteOptionalParams, + JavaComponentsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a JavaComponents. */ +export interface JavaComponents { + /** + * Get the Java Components for a managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: JavaComponentsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsGetOptionalParams, + ): Promise; + /** + * Creates or updates a Java Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsCreateOrUpdateResponse + > + >; + /** + * Creates or updates a Java Component in a Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Patches a Java Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsUpdateResponse + > + >; + /** + * Patches a Java Component using JSON Merge Patch + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + javaComponentEnvelope: JavaComponent, + options?: JavaComponentsUpdateOptionalParams, + ): Promise; + /** + * Delete a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + JavaComponentsDeleteResponse + > + >; + /** + * Delete a Java Component. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + name: string, + options?: JavaComponentsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts index e5c6ac77881d..9ec8acecce0d 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts @@ -33,6 +33,10 @@ import { JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, JobsListSecretsResponse, + JobsResumeOptionalParams, + JobsResumeResponse, + JobsSuspendOptionalParams, + JobsSuspendResponse, } from "../models"; /// @@ -271,4 +275,52 @@ export interface Jobs { jobName: string, options?: JobsListSecretsOptionalParams, ): Promise; + /** + * Resumes a suspended job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + beginResume( + resourceGroupName: string, + jobName: string, + options?: JobsResumeOptionalParams, + ): Promise< + SimplePollerLike, JobsResumeResponse> + >; + /** + * Resumes a suspended job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + beginResumeAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsResumeOptionalParams, + ): Promise; + /** + * Suspends a job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + beginSuspend( + resourceGroupName: string, + jobName: string, + options?: JobsSuspendOptionalParams, + ): Promise< + SimplePollerLike, JobsSuspendResponse> + >; + /** + * Suspends a job + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Name of the Job. + * @param options The options parameters. + */ + beginSuspendAndWait( + resourceGroupName: string, + jobName: string, + options?: JobsSuspendOptionalParams, + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/logicApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/logicApps.ts new file mode 100644 index 000000000000..70b12e099618 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/logicApps.ts @@ -0,0 +1,144 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + WorkflowEnvelope, + LogicAppsListWorkflowsOptionalParams, + LogicAppsGetOptionalParams, + LogicAppsGetResponse, + LogicApp, + LogicAppsCreateOrUpdateOptionalParams, + LogicAppsCreateOrUpdateResponse, + LogicAppsDeleteOptionalParams, + LogicAppsGetWorkflowOptionalParams, + LogicAppsGetWorkflowResponse, + LogicAppsDeployWorkflowArtifactsOptionalParams, + LogicAppsListWorkflowsConnectionsOptionalParams, + LogicAppsListWorkflowsConnectionsResponse, + LogicAppsProxyMethod, + LogicAppsInvokeOptionalParams, + LogicAppsInvokeResponse, +} from "../models"; + +/// +/** Interface representing a LogicApps. */ +export interface LogicApps { + /** + * List the workflows for a logic app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + listWorkflows( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets a logic app extension resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsGetOptionalParams, + ): Promise; + /** + * Create or update a Logic App extension resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param resource Logic app resource properties. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + resource: LogicApp, + options?: LogicAppsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes a Logic App extension resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsDeleteOptionalParams, + ): Promise; + /** + * Get workflow information by its name + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param workflowName Workflow name. + * @param options The options parameters. + */ + getWorkflow( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + workflowName: string, + options?: LogicAppsGetWorkflowOptionalParams, + ): Promise; + /** + * Creates or updates the artifacts for the logic app + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + deployWorkflowArtifacts( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsDeployWorkflowArtifactsOptionalParams, + ): Promise; + /** + * Gets logic app's connections. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the Logic App, the extension resource. + * @param options The options parameters. + */ + listWorkflowsConnections( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + options?: LogicAppsListWorkflowsConnectionsOptionalParams, + ): Promise; + /** + * Proxies a the API call to the logic app backed by the container app. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param logicAppName Name of the LogicApp App, the extension resource. + * @param xMsLogicAppsProxyPath The proxy path for the API call + * @param xMsLogicAppsProxyMethod The proxy method for the API call + * @param options The options parameters. + */ + invoke( + resourceGroupName: string, + containerAppName: string, + logicAppName: string, + xMsLogicAppsProxyPath: string, + xMsLogicAppsProxyMethod: LogicAppsProxyMethod, + options?: LogicAppsInvokeOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/maintenanceConfigurations.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/maintenanceConfigurations.ts new file mode 100644 index 000000000000..aa902ba14d09 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/maintenanceConfigurations.ts @@ -0,0 +1,76 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + MaintenanceConfigurationResource, + MaintenanceConfigurationsListOptionalParams, + MaintenanceConfigurationsCreateOrUpdateOptionalParams, + MaintenanceConfigurationsCreateOrUpdateResponse, + MaintenanceConfigurationsDeleteOptionalParams, + MaintenanceConfigurationsGetOptionalParams, + MaintenanceConfigurationsGetResponse, +} from "../models"; + +/// +/** Interface representing a MaintenanceConfigurations. */ +export interface MaintenanceConfigurations { + /** + * Gets all maintenance configurations in the specified Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: MaintenanceConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Create or update the maintenance configuration for Managed Environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param maintenanceConfigurationEnvelope Parameters to set the maintenance configuration for + * ManagedEnvironment . + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + environmentName: string, + configName: string, + maintenanceConfigurationEnvelope: MaintenanceConfigurationResource, + options?: MaintenanceConfigurationsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Deletes the maintenance configuration of a ManagedEnvironment . + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + environmentName: string, + configName: string, + options?: MaintenanceConfigurationsDeleteOptionalParams, + ): Promise; + /** + * Gets the maintenance configuration of a ManagedEnvironment . + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName The name of the Managed Environment. + * @param configName The name of the maintenance configuration. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + configName: string, + options?: MaintenanceConfigurationsGetOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateEndpointConnections.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateEndpointConnections.ts new file mode 100644 index 000000000000..603ba7f7c2ce --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateEndpointConnections.ts @@ -0,0 +1,120 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PrivateEndpointConnection, + ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsGetResponse, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse, + ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse, +} from "../models"; + +/// +/** Interface representing a ManagedEnvironmentPrivateEndpointConnections. */ +export interface ManagedEnvironmentPrivateEndpointConnections { + /** + * List private endpoint connections for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsGetOptionalParams, + ): Promise; + /** + * Update the state of a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionEnvelope: PrivateEndpointConnection, + options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateResponse + > + >; + /** + * Update the state of a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + privateEndpointConnectionEnvelope: PrivateEndpointConnection, + options?: ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ManagedEnvironmentPrivateEndpointConnectionsDeleteResponse + > + >; + /** + * Delete a private endpoint connection for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the + * Azure resource. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + environmentName: string, + privateEndpointConnectionName: string, + options?: ManagedEnvironmentPrivateEndpointConnectionsDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateLinkResources.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateLinkResources.ts new file mode 100644 index 000000000000..1f3937da2566 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/managedEnvironmentPrivateLinkResources.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + PrivateLinkResource, + ManagedEnvironmentPrivateLinkResourcesListOptionalParams, +} from "../models"; + +/// +/** Interface representing a ManagedEnvironmentPrivateLinkResources. */ +export interface ManagedEnvironmentPrivateLinkResources { + /** + * List private link resources for a given managed environment. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + environmentName: string, + options?: ManagedEnvironmentPrivateLinkResourcesListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts b/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts deleted file mode 100644 index b7b41d665411..000000000000 --- a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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. - */ - -import { - env, - Recorder, - RecorderStartOptions, - delay, - isPlaybackMode, -} from "@azure-tools/test-recorder"; -import { createTestCredential } from "@azure-tools/test-credential"; -import { assert, use } from "chai"; -import { Context } from "mocha"; -import { ContainerAppsAPIClient } from "../src/containerAppsAPIClient"; -import { ContainerApp, ManagedEnvironment } from "../src/models"; - -const replaceableVariables: Record = { - SUBSCRIPTION_ID: "88888888-8888-8888-8888-888888888888" -}; - -const recorderOptions: RecorderStartOptions = { - envSetupForPlayback: replaceableVariables, - removeCentralSanitizers: [ - "AZSDK3493", // .name in the body is not a secret and is listed below in the beforeEach section - "AZSDK3430", // .id in the body is not a secret and is listed below in the beforeEach section - ], -}; - -export const testPollingOptions = { - updateIntervalInMs: isPlaybackMode() ? 0 : undefined, -}; - -describe("AppContainer test", () => { - let recorder: Recorder; - let subscriptionId: string; - let client: ContainerAppsAPIClient; - let location: string; - let resourceGroup: string; - let containerAppName: string; - let environmentEnvelope: ManagedEnvironment; - let containerAppEnvelope: ContainerApp; - let environmentName: string; - - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ''; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new ContainerAppsAPIClient(credential, subscriptionId, recorder.configureClientOptions({})); - location = "eastus"; - resourceGroup = "myjstest"; - containerAppName = "mycontainerappxxx"; - environmentName = "testcontainerenv12"; - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("operations list test", async function () { - const resArray = new Array(); - for await (const item of client.operations.list()) { - resArray.push(item); - } - assert.notEqual(resArray.length, 0); - }); - - it("managedEnvironments create test", async function () { - environmentEnvelope = { - location: "East US", - zoneRedundant: false - }; - const res = await client.managedEnvironments.beginCreateOrUpdateAndWait( - resourceGroup, - environmentName, - environmentEnvelope, - testPollingOptions - ); - assert.equal(res.name, environmentName); - }) - - it("containerApp create test", async function () { - containerAppEnvelope = { - "location": location, - "managedEnvironmentId": "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroup + "/providers/Microsoft.App/managedEnvironments/" + environmentName, - template: { - containers: [ - { - name: "simple-hello-world-container", - image: "mcr.microsoft.com/azuredocs/containerapps-helloworld", - resources: { - cpu: 0.25, - memory: "0.5Gi" - } - } - ] - } - } - const res = await client.containerApps.beginCreateOrUpdateAndWait(resourceGroup, containerAppName, containerAppEnvelope, testPollingOptions); - assert.equal(res.name, containerAppName); - }); - - it("containerapp list Secrets test", async function () { - const res = await client.containerApps.listSecrets( - resourceGroup, - containerAppName - ); - }); - - it("containerapp delete test", async function () { - const res = await client.containerApps.beginDeleteAndWait(resourceGroup, containerAppName, testPollingOptions); - const resArray = new Array(); - for await (let item of client.containerApps.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) - - it("managedEnvironments delete test", async function () { - const res = await client.managedEnvironments.beginDeleteAndWait(resourceGroup, environmentName, testPollingOptions); - const resArray = new Array(); - for await (let item of client.managedEnvironments.listByResourceGroup(resourceGroup)) { - resArray.push(item); - } - assert.equal(resArray.length, 0); - }) -}) diff --git a/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/test/sampleTest.ts @@ -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. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appcontainers/arm-appcontainers/tsconfig.json b/sdk/appcontainers/arm-appcontainers/tsconfig.json index 00a8ff1127f8..3e6ae96443f3 100644 --- a/sdk/appcontainers/arm-appcontainers/tsconfig.json +++ b/sdk/appcontainers/arm-appcontainers/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appcontainers": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"