diff --git a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md index fde5a64607d5..95afe9a4e251 100644 --- a/sdk/appcontainers/arm-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/arm-appcontainers/CHANGELOG.md @@ -1,21 +1,13 @@ # Release History - -## 2.0.0-beta.4 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 2.0.0-beta.3 (2023-05-12) + +## 2.0.0-beta.4 (2023-07-13) **Features** - Added operation group AvailableWorkloadProfiles - Added operation group BillingMeters + - Added operation group Builders + - Added operation group Builds - Added operation group ConnectedEnvironments - Added operation group ConnectedEnvironmentsCertificates - Added operation group ConnectedEnvironmentsDaprComponents @@ -26,9 +18,14 @@ - Added operation group ManagedCertificates - Added operation group ManagedEnvironmentDiagnostics - Added operation group ManagedEnvironmentsDiagnostics + - Added operation ContainerApps.beginStart + - Added operation ContainerApps.beginStartAndWait + - Added operation ContainerApps.beginStop + - Added operation ContainerApps.beginStopAndWait - Added operation ContainerApps.getAuthToken - Added operation ManagedEnvironments.getAuthToken - Added operation ManagedEnvironments.listWorkloadProfileStates + - Added Interface AppInsightsConfiguration - Added Interface AvailableWorkloadProfile - Added Interface AvailableWorkloadProfileProperties - Added Interface AvailableWorkloadProfilesCollection @@ -39,6 +36,31 @@ - Added Interface BillingMeterCollection - Added Interface BillingMeterProperties - Added Interface BillingMetersGetOptionalParams + - Added Interface BlobStorageTokenStore + - 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 BuildsCreateOrUpdateHeaders + - Added Interface BuildsCreateOrUpdateOptionalParams + - Added Interface BuildsDeleteHeaders + - Added Interface BuildsDeleteOptionalParams + - Added Interface BuildsGetOptionalParams + - Added Interface BuildsListByBuilderResourceNextOptionalParams + - Added Interface BuildsListByBuilderResourceOptionalParams - Added Interface ConnectedEnvironment - Added Interface ConnectedEnvironmentCollection - Added Interface ConnectedEnvironmentsCertificatesCreateOrUpdateOptionalParams @@ -81,13 +103,21 @@ - Added Interface ContainerAppsDiagnosticsListRevisionsNextOptionalParams - Added Interface ContainerAppsDiagnosticsListRevisionsOptionalParams - Added Interface ContainerAppsGetAuthTokenOptionalParams + - Added Interface ContainerAppsStartHeaders + - Added Interface ContainerAppsStartOptionalParams + - Added Interface ContainerAppsStopHeaders + - Added Interface ContainerAppsStopOptionalParams - Added Interface ContainerAppsUpdateHeaders + - Added Interface ContainerRegistry + - Added Interface ContainerRegistryWithCustomImage - Added Interface CorsPolicy - Added Interface CustomDomainConfiguration - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Added Interface CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - Added Interface DaprConfiguration - Added Interface DaprSecret + - Added Interface DataDogConfiguration + - Added Interface DestinationsConfiguration - Added Interface DiagnosticDataProviderMetadata - Added Interface DiagnosticDataProviderMetadataPropertyBagItem - Added Interface DiagnosticDataTableResponseColumn @@ -101,24 +131,32 @@ - Added Interface DiagnosticsStatus - Added Interface DiagnosticSupportTopic - Added Interface EnvironmentAuthToken + - Added Interface EnvironmentVariable - Added Interface ErrorAdditionalInfo - Added Interface ErrorDetail - Added Interface ErrorResponse - Added Interface ExtendedLocation + - Added Interface GetVerificationIdOptionalParams + - Added Interface HttpGet + - Added Interface IngressPortMapping - Added Interface IngressStickySessions - Added Interface InitContainer - Added Interface IpSecurityRestrictionRule - Added Interface Job - Added Interface JobConfiguration + - Added Interface JobConfigurationEventTriggerConfig - Added Interface JobConfigurationManualTriggerConfig - Added Interface JobConfigurationScheduleTriggerConfig - Added Interface JobExecution - Added Interface JobExecutionBase - Added Interface JobExecutionContainer - Added Interface JobExecutionNamesCollection + - Added Interface JobExecutionOptionalParams - Added Interface JobExecutionTemplate - Added Interface JobPatchProperties - Added Interface JobPatchPropertiesProperties + - Added Interface JobScale + - Added Interface JobScaleRule - Added Interface JobsCollection - Added Interface JobsCreateOrUpdateOptionalParams - Added Interface JobsDeleteHeaders @@ -142,6 +180,7 @@ - Added Interface JobsUpdateOptionalParams - Added Interface JobTemplate - Added Interface KedaConfiguration + - Added Interface LogsConfiguration - Added Interface ManagedCertificate - Added Interface ManagedCertificateCollection - Added Interface ManagedCertificatePatch @@ -154,12 +193,21 @@ - Added Interface ManagedCertificatesUpdateOptionalParams - Added Interface ManagedEnvironmentDiagnosticsGetDetectorOptionalParams - Added Interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams + - Added Interface ManagedEnvironmentPropertiesPeerAuthentication - Added Interface ManagedEnvironmentsDiagnosticsGetRootOptionalParams - Added Interface ManagedEnvironmentsGetAuthTokenOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesNextOptionalParams - Added Interface ManagedEnvironmentsListWorkloadProfileStatesOptionalParams + - Added Interface MetricsConfiguration + - Added Interface Mtls + - Added Interface OpenTelemetryConfiguration + - Added Interface PreBuildStep - Added Interface SecretVolumeItem + - Added Interface Service + - Added Interface ServiceBind - Added Interface TcpScaleRule + - Added Interface TokenStore + - Added Interface TracesConfiguration - Added Interface WorkloadProfile - Added Interface WorkloadProfileStates - Added Interface WorkloadProfileStatesCollection @@ -170,6 +218,18 @@ - Added Type Alias AvailableWorkloadProfilesGetNextResponse - Added Type Alias AvailableWorkloadProfilesGetResponse - Added Type Alias BillingMetersGetResponse + - Added Type Alias BuildersCreateOrUpdateResponse + - 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 BuildsCreateOrUpdateResponse + - Added Type Alias BuildsGetResponse + - Added Type Alias BuildsListByBuilderResourceNextResponse + - Added Type Alias BuildsListByBuilderResourceResponse + - Added Type Alias BuildStatus - Added Type Alias ConnectedEnvironmentProvisioningState - Added Type Alias ConnectedEnvironmentsCertificatesCreateOrUpdateResponse - Added Type Alias ConnectedEnvironmentsCertificatesGetResponse @@ -192,6 +252,8 @@ - Added Type Alias ConnectedEnvironmentsStoragesGetResponse - Added Type Alias ConnectedEnvironmentsStoragesListResponse - Added Type Alias ConnectedEnvironmentsUpdateResponse + - Added Type Alias ContainerAppContainerRunningState + - Added Type Alias ContainerAppReplicaRunningState - Added Type Alias ContainerAppsDiagnosticsGetDetectorResponse - Added Type Alias ContainerAppsDiagnosticsGetRevisionResponse - Added Type Alias ContainerAppsDiagnosticsGetRootResponse @@ -200,9 +262,13 @@ - Added Type Alias ContainerAppsDiagnosticsListRevisionsNextResponse - Added Type Alias ContainerAppsDiagnosticsListRevisionsResponse - Added Type Alias ContainerAppsGetAuthTokenResponse + - Added Type Alias ContainerAppsStartResponse + - Added Type Alias ContainerAppsStopResponse - Added Type Alias ContainerAppsUpdateResponse - Added Type Alias ExtendedLocationTypes + - Added Type Alias GetVerificationIdResponse - Added Type Alias IngressClientCertificateMode + - Added Type Alias JobExecutionResponse - Added Type Alias JobExecutionRunningState - Added Type Alias JobProvisioningState - Added Type Alias JobsCreateOrUpdateResponse @@ -231,9 +297,13 @@ - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesNextResponse - Added Type Alias ManagedEnvironmentsListWorkloadProfileStatesResponse - Added Type Alias ManagedEnvironmentsUpdateResponse + - Added Type Alias ProvisioningState + - Added Type Alias RevisionRunningState - Added Type Alias TriggerType + - Interface AzureCredentials has a new optional parameter kind - Interface CertificateProperties has a new optional parameter subjectAlternativeNames - Interface Configuration has a new optional parameter maxInactiveRevisions + - Interface Configuration has a new optional parameter service - Interface ContainerApp has a new optional parameter environmentId - Interface ContainerApp has a new optional parameter eventStreamEndpoint - Interface ContainerApp has a new optional parameter extendedLocation @@ -248,45 +318,66 @@ - Interface Dapr has a new optional parameter httpReadBufferSize - Interface Dapr has a new optional parameter logLevel - Interface DaprComponent has a new optional parameter secretStoreComponent + - Interface GithubActionConfiguration has a new optional parameter githubPersonalAccessToken + - Interface Ingress has a new optional parameter additionalPortMappings - Interface Ingress has a new optional parameter clientCertificateMode - Interface Ingress has a new optional parameter corsPolicy - Interface Ingress has a new optional parameter exposedPort - Interface Ingress has a new optional parameter ipSecurityRestrictions - Interface Ingress has a new optional parameter stickySessions + - Interface Login has a new optional parameter tokenStore + - Interface ManagedEnvironment has a new optional parameter appInsightsConfiguration - Interface ManagedEnvironment has a new optional parameter customDomainConfiguration - Interface ManagedEnvironment has a new optional parameter daprConfiguration - Interface ManagedEnvironment has a new optional parameter eventStreamEndpoint - Interface ManagedEnvironment has a new optional parameter infrastructureResourceGroup - Interface ManagedEnvironment has a new optional parameter kedaConfiguration - Interface ManagedEnvironment has a new optional parameter kind + - Interface ManagedEnvironment has a new optional parameter openTelemetryConfiguration + - Interface ManagedEnvironment has a new optional parameter peerAuthentication - Interface ManagedEnvironment has a new optional parameter workloadProfiles + - Interface Replica has a new optional parameter initContainers + - Interface Replica has a new optional parameter runningState + - Interface Replica has a new optional parameter runningStateDetails - Interface ReplicaContainer has a new optional parameter execEndpoint - Interface ReplicaContainer has a new optional parameter logStreamEndpoint + - Interface ReplicaContainer has a new optional parameter runningState + - Interface ReplicaContainer has a new optional parameter runningStateDetails - Interface Revision has a new optional parameter lastActiveTime + - Interface Revision has a new optional parameter runningState - Interface ScaleRule has a new optional parameter tcp - Interface Secret has a new optional parameter identity - Interface Secret has a new optional parameter keyVaultUrl - Interface Template has a new optional parameter initContainers + - Interface Template has a new optional parameter serviceBinds + - Interface Template has a new optional parameter terminationGracePeriodSeconds + - Interface Volume has a new optional parameter mountOptions - Interface Volume has a new optional parameter secrets + - Interface VolumeMount has a new optional parameter subPath - Added Enum KnownAction - Added Enum KnownAffinity - Added Enum KnownApplicability + - Added Enum KnownBuildStatus - Added Enum KnownConnectedEnvironmentProvisioningState + - Added Enum KnownContainerAppContainerRunningState + - Added Enum KnownContainerAppReplicaRunningState - Added Enum KnownExtendedLocationTypes - Added Enum KnownIngressClientCertificateMode - Added Enum KnownJobExecutionRunningState - Added Enum KnownJobProvisioningState - Added Enum KnownLogLevel - Added Enum KnownManagedCertificateDomainControlValidation + - Added Enum KnownProvisioningState + - Added Enum KnownRevisionRunningState - Added Enum KnownTriggerType - Enum KnownContainerAppProvisioningState has a new value Deleting - Enum KnownIngressTransportMethod has a new value Tcp - Enum KnownStorageType has a new value Secret - Added function getContinuationToken - - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter **Breaking Changes** + - Interface ContainerAppsRevisionsListRevisionsNextOptionalParams no longer has parameter filter - Interface VnetConfiguration no longer has parameter runtimeSubnetId - Type of parameter customDomainVerificationFailureInfo of interface CustomHostnameAnalysisResult is changed from DefaultErrorResponse to CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - Type of parameter value of interface DaprSecretsCollection is changed from Secret[] to DaprSecret[] diff --git a/sdk/appcontainers/arm-appcontainers/_meta.json b/sdk/appcontainers/arm-appcontainers/_meta.json index 39e4a36c9bb0..2363628c76f5 100644 --- a/sdk/appcontainers/arm-appcontainers/_meta.json +++ b/sdk/appcontainers/arm-appcontainers/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c7daa3d35baaaabece0dbc6f731eadbe426973b9", + "commit": "5de1e2677400a321c7566f4ddfb086ffa91b815f", "readme": "specification/app/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --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.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --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.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", - "use": "@autorest/typescript@6.0.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ 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 12680793840c..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_7d4c58c2dc" -} diff --git a/sdk/appcontainers/arm-appcontainers/package.json b/sdk/appcontainers/arm-appcontainers/package.json index 60fa15d44316..53ec69046162 100644 --- a/sdk/appcontainers/arm-appcontainers/package.json +++ b/sdk/appcontainers/arm-appcontainers/package.json @@ -8,7 +8,7 @@ "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.5.0", + "@azure/core-lro": "^2.5.3", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", @@ -111,13 +111,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 f5237442ba13..cd1c35ab5ee9 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; @@ -167,6 +172,7 @@ export interface AzureActiveDirectoryValidation { export interface AzureCredentials { clientId?: string; clientSecret?: string; + kind?: string; subscriptionId?: string; tenantId?: string; } @@ -234,6 +240,211 @@ export type BillingMetersGetResponse = BillingMeterCollection; // @public export type BindingType = string; +// @public +export interface BlobStorageTokenStore { + sasUrlSettingName: string; +} + +// @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 interface BuilderResource extends TrackedResource { + readonly buildComputeId?: string; + containerRegistries?: ContainerRegistry[]; + environmentId?: string; + identity?: ManagedServiceIdentity; + readonly patchComputeId?: string; + readonly provisioningState?: ProvisioningState; +} + +// @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, void>>; + 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 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 interface BuildResource extends ProxyResource { + readonly buildStatus?: BuildStatus; + configuration?: BuildConfiguration; + destinationContainerRegistry?: ContainerRegistryWithCustomImage; + readonly provisioningState?: ProvisioningState; + 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, void>>; + beginDeleteAndWait(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsDeleteOptionalParams): Promise; + get(resourceGroupName: string, builderName: string, buildName: string, options?: BuildsGetOptionalParams): Promise; + listByBuilderResource(resourceGroupName: string, builderName: string, options?: BuildsListByBuilderResourceOptionalParams): PagedAsyncIterableIterator; +} + +// @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 interface BuildsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsGetResponse = BuildResource; + +// @public +export interface BuildsListByBuilderResourceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceNextResponse = BuildCollection; + +// @public +export interface BuildsListByBuilderResourceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type BuildsListByBuilderResourceResponse = BuildCollection; + +// @public +export type BuildStatus = string; + // @public export interface Certificate extends TrackedResource { properties?: CertificateProperties; @@ -349,6 +560,7 @@ export interface Configuration { maxInactiveRevisions?: number; registries?: RegistryCredentials[]; secrets?: Secret[]; + service?: Service; } // @public @@ -635,6 +847,9 @@ export interface ContainerAppCollection { value: ContainerApp[]; } +// @public +export type ContainerAppContainerRunningState = string; + // @public export interface ContainerAppJobExecutions { readonly nextLink?: string; @@ -678,12 +893,19 @@ export interface ContainerAppProbeTcpSocket { // @public export type ContainerAppProvisioningState = string; +// @public +export type ContainerAppReplicaRunningState = string; + // @public export interface ContainerApps { beginCreateOrUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise, ContainerAppsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsDeleteOptionalParams): Promise; + beginStart(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise, ContainerAppsStartResponse>>; + beginStartAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStartOptionalParams): Promise; + beginStop(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStopOptionalParams): Promise, ContainerAppsStopResponse>>; + beginStopAndWait(resourceGroupName: string, containerAppName: string, options?: ContainerAppsStopOptionalParams): Promise; beginUpdate(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise, ContainerAppsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, containerAppName: string, containerAppEnvelope: ContainerApp, options?: ContainerAppsUpdateOptionalParams): Promise; get(resourceGroupName: string, containerAppName: string, options?: ContainerAppsGetOptionalParams): Promise; @@ -706,6 +928,10 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // (undocumented) billingMeters: BillingMeters; // (undocumented) + builders: Builders; + // (undocumented) + builds: Builds; + // (undocumented) certificates: Certificates; // (undocumented) connectedEnvironments: ConnectedEnvironments; @@ -729,6 +955,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { containerAppsSourceControls: ContainerAppsSourceControls; // (undocumented) daprComponents: DaprComponents; + getVerificationId(options?: GetVerificationIdOptionalParams): Promise; + jobExecution(resourceGroupName: string, jobName: string, jobExecutionName: string, options?: JobExecutionOptionalParams): Promise; // (undocumented) jobs: Jobs; // (undocumented) @@ -1052,6 +1280,36 @@ export interface ContainerAppsSourceControlsListByContainerAppOptionalParams ext // @public export type ContainerAppsSourceControlsListByContainerAppResponse = SourceControlCollection; +// @public +export interface ContainerAppsStartHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsStartResponse = ContainerApp; + +// @public +export interface ContainerAppsStopHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ContainerAppsStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ContainerAppsStopResponse = ContainerApp; + // @public export interface ContainerAppsUpdateHeaders { // (undocumented) @@ -1067,6 +1325,18 @@ export interface ContainerAppsUpdateOptionalParams extends coreClient.OperationO // @public export type ContainerAppsUpdateResponse = ContainerApp; +// @public +export interface ContainerRegistry { + containerRegistryServer: string; + identityResourceId: string; +} + +// @public +export interface ContainerRegistryWithCustomImage { + image?: string; + server: string; +} + // @public export interface ContainerResources { cpu?: number; @@ -1262,6 +1532,12 @@ export interface DaprSecretsCollection { value: DaprSecret[]; } +// @public +export interface DataDogConfiguration { + key?: string; + site?: string; +} + // @public export interface DefaultAuthorizationPolicy { allowedApplications?: string[]; @@ -1289,6 +1565,11 @@ export interface DefaultErrorResponseErrorDetailsItem { readonly target?: string; } +// @public +export interface DestinationsConfiguration { + dataDogConfiguration?: DataDogConfiguration; +} + // @public export interface DiagnosticDataProviderMetadata { propertyBag?: DiagnosticDataProviderMetadataPropertyBagItem[]; @@ -1392,6 +1673,12 @@ export interface EnvironmentVar { value?: string; } +// @public +export interface EnvironmentVariable { + name: string; + value: string; +} + // @public export interface ErrorAdditionalInfo { readonly info?: Record; @@ -1442,6 +1729,15 @@ export type ForwardProxyConvention = "NoProxy" | "Standard" | "Custom"; // @public export function getContinuationToken(page: unknown): string | undefined; +// @public +export interface GetVerificationIdOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GetVerificationIdResponse = { + body: string; +}; + // @public export interface GitHub { enabled?: boolean; @@ -1453,6 +1749,7 @@ export interface GitHub { export interface GithubActionConfiguration { azureCredentials?: AzureCredentials; contextPath?: string; + githubPersonalAccessToken?: string; image?: string; os?: string; publishType?: string; @@ -1476,6 +1773,13 @@ export interface Google { validation?: AllowedAudiencesValidation; } +// @public +export interface HttpGet { + fileName?: string; + headers?: string[]; + url: string; +} + // @public export interface HttpScaleRule { auth?: ScaleRuleAuth[]; @@ -1512,6 +1816,7 @@ export interface IdentityProviders { // @public export interface Ingress { + additionalPortMappings?: IngressPortMapping[]; allowInsecure?: boolean; clientCertificateMode?: IngressClientCertificateMode; corsPolicy?: CorsPolicy; @@ -1529,6 +1834,13 @@ export interface Ingress { // @public export type IngressClientCertificateMode = string; +// @public +export interface IngressPortMapping { + exposedPort?: number; + external: boolean; + targetPort: number; +} + // @public export interface IngressStickySessions { affinity?: Affinity; @@ -1563,6 +1875,7 @@ export interface Job extends TrackedResource { // @public export interface JobConfiguration { + eventTriggerConfig?: JobConfigurationEventTriggerConfig; manualTriggerConfig?: JobConfigurationManualTriggerConfig; registries?: RegistryCredentials[]; replicaRetryLimit?: number; @@ -1572,6 +1885,13 @@ export interface JobConfiguration { triggerType: TriggerType; } +// @public +export interface JobConfigurationEventTriggerConfig { + parallelism?: number; + replicaCompletionCount?: number; + scale?: JobScale; +} + // @public export interface JobConfigurationManualTriggerConfig { parallelism?: number; @@ -1617,6 +1937,13 @@ export interface JobExecutionNamesCollection { value: JobExecutionBase[]; } +// @public +export interface JobExecutionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type JobExecutionResponse = JobExecution; + // @public export type JobExecutionRunningState = string; @@ -1658,8 +1985,8 @@ export interface Jobs { beginStartAndWait(resourceGroupName: string, jobName: string, template: JobExecutionTemplate, 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, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; - beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams): Promise; + beginStopMultipleExecutions(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): Promise, JobsStopMultipleExecutionsResponse>>; + beginStopMultipleExecutionsAndWait(resourceGroupName: string, jobName: string, options?: JobsStopMultipleExecutionsOptionalParams): 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; @@ -1668,6 +1995,22 @@ export interface Jobs { listSecrets(resourceGroupName: string, jobName: string, options?: JobsListSecretsOptionalParams): Promise; } +// @public +export interface JobScale { + maxExecutions?: number; + minExecutions?: number; + pollingInterval?: number; + rules?: JobScaleRule[]; +} + +// @public +export interface JobScaleRule { + auth?: ScaleRuleAuth[]; + metadata?: Record; + name?: string; + type?: string; +} + // @public export interface JobsCollection { readonly nextLink?: string; @@ -1879,6 +2222,15 @@ export enum KnownBindingType { SniEnabled = "SniEnabled" } +// @public +export enum KnownBuildStatus { + Canceled = "Canceled", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted", + Succeeded = "Succeeded" +} + // @public export enum KnownCertificateProvisioningState { Canceled = "Canceled", @@ -1906,6 +2258,13 @@ export enum KnownConnectedEnvironmentProvisioningState { Waiting = "Waiting" } +// @public +export enum KnownContainerAppContainerRunningState { + Running = "Running", + Terminated = "Terminated", + Waiting = "Waiting" +} + // @public export enum KnownContainerAppProvisioningState { Canceled = "Canceled", @@ -1915,6 +2274,13 @@ export enum KnownContainerAppProvisioningState { Succeeded = "Succeeded" } +// @public +export enum KnownContainerAppReplicaRunningState { + NotRunning = "NotRunning", + Running = "Running", + Unknown = "Unknown" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -2000,6 +2366,16 @@ export enum KnownManagedServiceIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownProvisioningState { + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownRevisionHealthState { Healthy = "Healthy", @@ -2016,6 +2392,16 @@ export enum KnownRevisionProvisioningState { Provisioning = "Provisioning" } +// @public +export enum KnownRevisionRunningState { + Degraded = "Degraded", + Failed = "Failed", + Processing = "Processing", + Running = "Running", + Stopped = "Stopped", + Unknown = "Unknown" +} + // @public export enum KnownScheme { Http = "HTTP", @@ -2041,7 +2427,7 @@ export enum KnownStorageType { export enum KnownTriggerType { Event = "Event", Manual = "Manual", - Scheduled = "Scheduled" + Schedule = "Schedule" } // @public @@ -2064,6 +2450,7 @@ export interface Login { nonce?: Nonce; preserveUrlFragmentsForLogins?: boolean; routes?: LoginRoutes; + tokenStore?: TokenStore; } // @public @@ -2079,6 +2466,11 @@ export interface LoginScopes { // @public export type LogLevel = string; +// @public +export interface LogsConfiguration { + destinations?: string[]; +} + // @public export interface ManagedCertificate extends TrackedResource { properties?: ManagedCertificateProperties; @@ -2163,6 +2555,7 @@ export type ManagedCertificatesUpdateResponse = ManagedCertificate; // @public export interface ManagedEnvironment extends TrackedResource { + appInsightsConfiguration?: AppInsightsConfiguration; appLogsConfiguration?: AppLogsConfiguration; customDomainConfiguration?: CustomDomainConfiguration; daprAIConnectionString?: string; @@ -2174,6 +2567,8 @@ export interface ManagedEnvironment extends TrackedResource { infrastructureResourceGroup?: string; kedaConfiguration?: KedaConfiguration; kind?: string; + openTelemetryConfiguration?: OpenTelemetryConfiguration; + peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; readonly provisioningState?: EnvironmentProvisioningState; readonly staticIp?: string; vnetConfiguration?: VnetConfiguration; @@ -2201,6 +2596,11 @@ export interface ManagedEnvironmentDiagnosticsListDetectorsOptionalParams extend // @public export type ManagedEnvironmentDiagnosticsListDetectorsResponse = DiagnosticsCollection; +// @public +export interface ManagedEnvironmentPropertiesPeerAuthentication { + mtls?: Mtls; +} + // @public export interface ManagedEnvironments { beginCreateOrUpdate(resourceGroupName: string, environmentName: string, environmentEnvelope: ManagedEnvironment, options?: ManagedEnvironmentsCreateOrUpdateOptionalParams): Promise, ManagedEnvironmentsCreateOrUpdateResponse>>; @@ -2375,6 +2775,16 @@ export interface ManagedServiceIdentity { // @public export type ManagedServiceIdentityType = string; +// @public +export interface MetricsConfiguration { + destinations?: string[]; +} + +// @public +export interface Mtls { + enabled?: boolean; +} + // @public export interface Namespaces { checkNameAvailability(resourceGroupName: string, environmentName: string, checkNameAvailabilityRequest: CheckNameAvailabilityRequest, options?: NamespacesCheckNameAvailabilityOptionalParams): Promise; @@ -2421,6 +2831,14 @@ export interface OpenIdConnectRegistration { openIdConnectConfiguration?: OpenIdConnectConfig; } +// @public +export interface OpenTelemetryConfiguration { + destinationsConfiguration?: DestinationsConfiguration; + logsConfiguration?: LogsConfiguration; + metricsConfiguration?: MetricsConfiguration; + tracesConfiguration?: TracesConfiguration; +} + // @public export interface OperationDetail { display?: OperationDisplay; @@ -2456,6 +2874,16 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = AvailableOperations; +// @public +export interface PreBuildStep { + description?: string; + httpGet?: HttpGet; + scripts?: string[]; +} + +// @public +export type ProvisioningState = string; + // @public export interface ProxyResource extends Resource { } @@ -2486,6 +2914,9 @@ export interface RegistryInfo { export interface Replica extends ProxyResource { containers?: ReplicaContainer[]; readonly createdTime?: Date; + initContainers?: ReplicaContainer[]; + readonly runningState?: ContainerAppReplicaRunningState; + readonly runningStateDetails?: string; } // @public @@ -2501,6 +2932,8 @@ export interface ReplicaContainer { name?: string; ready?: boolean; restartCount?: number; + readonly runningState?: ContainerAppContainerRunningState; + readonly runningStateDetails?: string; started?: boolean; } @@ -2522,6 +2955,7 @@ export interface Revision extends ProxyResource { readonly provisioningError?: string; readonly provisioningState?: RevisionProvisioningState; readonly replicas?: number; + readonly runningState?: RevisionRunningState; readonly template?: Template; readonly trafficWeight?: number; } @@ -2538,6 +2972,9 @@ export type RevisionHealthState = string; // @public export type RevisionProvisioningState = string; +// @public +export type RevisionRunningState = string; + // @public export interface Scale { maxReplicas?: number; @@ -2582,6 +3019,17 @@ export interface SecretVolumeItem { secretRef?: string; } +// @public +export interface Service { + type: string; +} + +// @public +export interface ServiceBind { + name?: string; + serviceId?: string; +} + // @public export interface SourceControl extends ProxyResource { branch?: string; @@ -2626,9 +3074,23 @@ export interface Template { initContainers?: InitContainer[]; revisionSuffix?: string; scale?: Scale; + serviceBinds?: ServiceBind[]; + terminationGracePeriodSeconds?: number; volumes?: Volume[]; } +// @public +export interface TokenStore { + azureBlobStorage?: BlobStorageTokenStore; + enabled?: boolean; + tokenRefreshExtensionHours?: number; +} + +// @public +export interface TracesConfiguration { + destinations?: string[]; +} + // @public export interface TrackedResource extends Resource { location: string; @@ -2683,6 +3145,7 @@ export interface VnetConfiguration { // @public export interface Volume { + mountOptions?: string; name?: string; secrets?: SecretVolumeItem[]; storageName?: string; @@ -2692,6 +3155,7 @@ export interface Volume { // @public export interface VolumeMount { mountPath?: string; + subPath?: string; volumeName?: 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 c1b852734e23..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/preview/2022-11-01-preview/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 6ef7d5fe2483..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/preview/2022-11-01-preview/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 427265a7faf6..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/preview/2022-11-01-preview/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 921aea9b75bc..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/preview/2022-11-01-preview/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 9ea615439f30..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/preview/2022-11-01-preview/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 ed459b096c87..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/preview/2022-11-01-preview/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 3256b0faa04a..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/preview/2022-11-01-preview/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 4e3287d0f52c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsCertificatesCreateOrUpdateSample.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, - 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/preview/2022-11-01-preview/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 ec12520c0494..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/preview/2022-11-01-preview/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 e1baa23f157d..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/preview/2022-11-01-preview/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 9a1ade0f3c50..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/preview/2022-11-01-preview/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 315475d52aaa..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/preview/2022-11-01-preview/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 4e1459b577df..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/preview/2022-11-01-preview/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 414997d18432..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/preview/2022-11-01-preview/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 ed5bcbcf828c..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/connectedEnvironmentsDaprComponentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/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 368ecf926c6a..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/preview/2022-11-01-preview/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 e2786d2c7fa3..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/preview/2022-11-01-preview/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 19094d5d885e..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/preview/2022-11-01-preview/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 557f3b108cc1..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/preview/2022-11-01-preview/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 26674465f43a..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/preview/2022-11-01-preview/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 d89d060736a1..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/preview/2022-11-01-preview/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 725f561968c0..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/preview/2022-11-01-preview/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 e52528c74c64..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/preview/2022-11-01-preview/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 159b0fd37e02..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/preview/2022-11-01-preview/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 119a17a00f5e..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/preview/2022-11-01-preview/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 069492c1d62d..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/preview/2022-11-01-preview/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 d26e9c473719..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/preview/2022-11-01-preview/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 f0cf7d8cc859..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/preview/2022-11-01-preview/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 f743fdf5197b..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsAuthConfigsCreateOrUpdateSample.ts +++ /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. -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/preview/2022-11-01-preview/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 = { - 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 a9b70f9d41d0..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/preview/2022-11-01-preview/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 57ae061a7b34..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/preview/2022-11-01-preview/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 7d0de398ec27..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/preview/2022-11-01-preview/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 4cbf4f4ae1e8..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsCreateOrUpdateSample.ts +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/examples/ContainerApps_CreateOrUpdate.json - */ -async function createOrUpdateContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const containerAppEnvelope: ContainerApp = { - configuration: { - dapr: { - appPort: 3000, - appProtocol: "http", - enableApiLogging: true, - enabled: true, - httpMaxRequestSize: 10, - httpReadBufferSize: 30, - logLevel: "debug" - }, - ingress: { - 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 - }, - 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.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - }, - workloadProfileName: "My-GP-01" - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.containerApps.beginCreateOrUpdateAndWait( - resourceGroupName, - containerAppName, - containerAppEnvelope - ); - console.log(result); -} - -/** - * This sample demonstrates how to Create or update a Container App. - * - * @summary Create or update a Container App. - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json - */ -async function createOrUpdateManagedByApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppManagedBy"; - const containerAppEnvelope: ContainerApp = { - configuration: { - ingress: { - exposedPort: 4000, - external: true, - targetPort: 3000, - traffic: [ - { revisionName: "testcontainerAppManagedBy-ab1234", weight: 100 } - ], - transport: "tcp" - } - }, - environmentId: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", - location: "East US", - managedBy: - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp", - template: { - containers: [ - { - name: "testcontainerAppManagedBy", - image: "repo/testcontainerAppManagedBy:v1", - probes: [ - { - type: "Liveness", - initialDelaySeconds: 3, - periodSeconds: 3, - tcpSocket: { port: 8080 } - } - ] - } - ], - scale: { - 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/preview/2022-11-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json - */ -async function createOrUpdateTcpApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerAppTcp"; - const 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 7086851d39ec..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/preview/2022-11-01-preview/examples/ContainerApps_Delete.json - */ -async function deleteContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testWorkerApp0"; - const 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 f516f414c4ae..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/preview/2022-11-01-preview/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 6ca77f4c5ed3..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/preview/2022-11-01-preview/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 c2f517b46b68..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/preview/2022-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 ef8e3f8befcf..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/preview/2022-11-01-preview/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 fe96c4e59354..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/preview/2022-11-01-preview/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 17bf7b42e400..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/preview/2022-11-01-preview/examples/ContainerApps_GetAuthToken.json - */ -async function getContainerAppAuthToken() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "651f8027-33e8-4ec4-97b4-f6e9f3dc8744"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 a80cebb595e1..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/preview/2022-11-01-preview/examples/ContainerApps_Get.json - */ -async function getContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 6be535aba06b..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/preview/2022-11-01-preview/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 0cd8131f30b2..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/preview/2022-11-01-preview/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 e460aca3b631..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/preview/2022-11-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json - */ -async function analyzeCustomHostname() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 856e856c4d63..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/preview/2022-11-01-preview/examples/ContainerApps_ListSecrets.json - */ -async function listContainerAppsSecrets() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 79112d9282a9..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/preview/2022-11-01-preview/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 cfd0c66be596..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/preview/2022-11-01-preview/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 0648b97690da..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/preview/2022-11-01-preview/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 7b01102d463c..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/preview/2022-11-01-preview/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 573af0e63fe9..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/preview/2022-11-01-preview/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 23c0160be4ec..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/preview/2022-11-01-preview/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 885c3cb1ed9e..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/preview/2022-11-01-preview/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 2b38efb5b1b4..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsSourceControlsCreateOrUpdateSample.ts +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/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: "", - tenantId: "" - }, - contextPath: "./", - image: "image/tag", - registryInfo: { - registryPassword: "", - registryUrl: "xwang971reg.azurecr.io", - registryUserName: "xwang971reg" - } - }, - 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 fb82577bcc18..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/preview/2022-11-01-preview/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 a92818f309c6..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/preview/2022-11-01-preview/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 d0c34cdbbe13..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/preview/2022-11-01-preview/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/containerAppsUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts deleted file mode 100644 index 76c5f1b085b0..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/containerAppsUpdateSample.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/examples/ContainerApps_Patch.json - */ -async function patchContainerApp() { - const subscriptionId = - process.env["APPCONTAINERS_SUBSCRIPTION_ID"] || - "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345"; - const resourceGroupName = process.env["APPCONTAINERS_RESOURCE_GROUP"] || "rg"; - const containerAppName = "testcontainerApp0"; - const 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 - }, - 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.2, memory: "100Mi" } - } - ], - scale: { - maxReplicas: 5, - minReplicas: 1, - rules: [ - { - name: "httpscalingrule", - custom: { type: "http", metadata: { concurrentRequests: "50" } } - } - ] - } - } - }; - 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 f6098068c3f5..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/preview/2022-11-01-preview/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/preview/2022-11-01-preview/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 77ff870d85c1..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/preview/2022-11-01-preview/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 2230288a6fe5..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/preview/2022-11-01-preview/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/preview/2022-11-01-preview/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 2bbd0b4acca9..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/preview/2022-11-01-preview/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 6c18584651a2..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/preview/2022-11-01-preview/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/jobsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts deleted file mode 100644 index 193b245ca8bc..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsCreateOrUpdateSample.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/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.2, memory: "100Mi" } - } - ] - } - }; - 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(); -} - -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 4c6b66a98b80..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/preview/2022-11-01-preview/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 9c7d47be3834..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/preview/2022-11-01-preview/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/jobsGetSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsGetSample.ts deleted file mode 100644 index 163f63df34b9..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/preview/2022-11-01-preview/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 e8b8d847fad2..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/preview/2022-11-01-preview/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 73cd0c684cd6..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/preview/2022-11-01-preview/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/jobsListSecretsSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsListSecretsSample.ts deleted file mode 100644 index 4cd509568b2d..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/preview/2022-11-01-preview/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/jobsStartSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.ts deleted file mode 100644 index 03eeadfdd2da..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStartSample.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 { - JobExecutionTemplate, - 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/preview/2022-11-01-preview/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.2, memory: "100Mi" } - } - ], - initContainers: [ - { - name: "testinitcontainerAppsJob0", - args: ["-c", "while true; do echo hello; sleep 10;done"], - command: ["/bin/sh"], - image: "repo/testcontainerAppsJob0:v4", - resources: { cpu: 0.2, memory: "100Mi" } - } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStartAndWait( - resourceGroupName, - jobName, - template - ); - 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 2b50617de174..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/preview/2022-11-01-preview/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 3b18792ab00f..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/jobsStopMultipleExecutionsSample.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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 { - JobExecutionNamesCollection, - 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/preview/2022-11-01-preview/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 jobExecutionName: JobExecutionNamesCollection = { - value: [ - { name: "jobExecution-27944453" }, - { name: "jobExecution-27944452" }, - { name: "jobExecution-27944451" } - ] - }; - const credential = new DefaultAzureCredential(); - const client = new ContainerAppsAPIClient(credential, subscriptionId); - const result = await client.jobs.beginStopMultipleExecutionsAndWait( - resourceGroupName, - jobName, - jobExecutionName - ); - 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 4b4439363ea3..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/preview/2022-11-01-preview/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.2, memory: "100Mi" } - } - ] - } - } - }; - 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 81506f3dd869..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/preview/2022-11-01-preview/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 5c1fdb327d67..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/preview/2022-11-01-preview/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 d0a37a92fb8e..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/preview/2022-11-01-preview/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 25db64d33fe2..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/preview/2022-11-01-preview/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 1c19bfb5bf21..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/preview/2022-11-01-preview/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 b48e57d93bf7..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/preview/2022-11-01-preview/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 71759dc309a0..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/preview/2022-11-01-preview/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/managedEnvironmentsCreateOrUpdateSample.ts b/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts deleted file mode 100644 index 6cbbd3844005..000000000000 --- a/sdk/appcontainers/arm-appcontainers/samples-dev/managedEnvironmentsCreateOrUpdateSample.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code 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/preview/2022-11-01-preview/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/preview/2022-11-01-preview/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", - 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 91baf59ae190..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/preview/2022-11-01-preview/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 19efcb9871ea..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/preview/2022-11-01-preview/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 66a84b6d8f55..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/preview/2022-11-01-preview/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 335952fd4a20..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/preview/2022-11-01-preview/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 752b77faf978..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/preview/2022-11-01-preview/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 b99bc16e23c0..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/preview/2022-11-01-preview/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 25078e9fd7be..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/preview/2022-11-01-preview/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 64d6d9cd868b..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/preview/2022-11-01-preview/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 36b14ca59574..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/preview/2022-11-01-preview/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 f12af5ad99b2..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/preview/2022-11-01-preview/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 746076000ec1..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/preview/2022-11-01-preview/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 3ebafa62a0af..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/preview/2022-11-01-preview/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 4e397a441bd3..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/preview/2022-11-01-preview/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/preview/2022-11-01-preview/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 b82454a18eba..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/preview/2022-11-01-preview/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/src/containerAppsAPIClient.ts b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts index 8e4722e51fc5..c018ee5e8797 100644 --- a/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts +++ b/sdk/appcontainers/arm-appcontainers/src/containerAppsAPIClient.ts @@ -18,19 +18,21 @@ import { ContainerAppsAuthConfigsImpl, AvailableWorkloadProfilesImpl, BillingMetersImpl, + BuildersImpl, + BuildsImpl, ConnectedEnvironmentsImpl, ConnectedEnvironmentsCertificatesImpl, ConnectedEnvironmentsDaprComponentsImpl, ConnectedEnvironmentsStoragesImpl, ContainerAppsImpl, - JobsImpl, - JobsExecutionsImpl, ContainerAppsRevisionsImpl, ContainerAppsRevisionReplicasImpl, ContainerAppsDiagnosticsImpl, ManagedEnvironmentDiagnosticsImpl, ManagedEnvironmentsDiagnosticsImpl, OperationsImpl, + JobsImpl, + JobsExecutionsImpl, ManagedEnvironmentsImpl, CertificatesImpl, ManagedCertificatesImpl, @@ -43,19 +45,21 @@ import { ContainerAppsAuthConfigs, AvailableWorkloadProfiles, BillingMeters, + Builders, + Builds, ConnectedEnvironments, ConnectedEnvironmentsCertificates, ConnectedEnvironmentsDaprComponents, ConnectedEnvironmentsStorages, ContainerApps, - Jobs, - JobsExecutions, ContainerAppsRevisions, ContainerAppsRevisionReplicas, ContainerAppsDiagnostics, ManagedEnvironmentDiagnostics, ManagedEnvironmentsDiagnostics, Operations, + Jobs, + JobsExecutions, ManagedEnvironments, Certificates, ManagedCertificates, @@ -64,7 +68,15 @@ import { ManagedEnvironmentsStorages, ContainerAppsSourceControls } from "./operationsInterfaces"; -import { ContainerAppsAPIClientOptionalParams } from "./models"; +import * as Parameters from "./models/parameters"; +import * as Mappers from "./models/mappers"; +import { + ContainerAppsAPIClientOptionalParams, + JobExecutionOptionalParams, + JobExecutionResponse, + GetVerificationIdOptionalParams, + GetVerificationIdResponse +} from "./models"; export class ContainerAppsAPIClient extends coreClient.ServiceClient { $host: string; @@ -151,10 +163,12 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.apiVersion = options.apiVersion || "2023-05-02-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesImpl(this); this.billingMeters = new BillingMetersImpl(this); + this.builders = new BuildersImpl(this); + this.builds = new BuildsImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesImpl( this @@ -166,8 +180,6 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.containerApps = new ContainerAppsImpl(this); - this.jobs = new JobsImpl(this); - this.jobsExecutions = new JobsExecutionsImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasImpl( this @@ -180,6 +192,8 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this ); this.operations = new OperationsImpl(this); + this.jobs = new JobsImpl(this); + this.jobsExecutions = new JobsExecutionsImpl(this); this.managedEnvironments = new ManagedEnvironmentsImpl(this); this.certificates = new CertificatesImpl(this); this.managedCertificates = new ManagedCertificatesImpl(this); @@ -222,22 +236,56 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { this.pipeline.addPolicy(apiVersionPolicy); } + /** + * Get details of a single job execution + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name + * @param jobExecutionName Job execution name. + * @param options The options parameters. + */ + jobExecution( + resourceGroupName: string, + jobName: string, + jobExecutionName: string, + options?: JobExecutionOptionalParams + ): Promise { + return this.sendOperationRequest( + { resourceGroupName, jobName, jobExecutionName, options }, + jobExecutionOperationSpec + ); + } + + /** + * Get the verification id of a subscription used for verifying custom domains + * @param options The options parameters. + */ + getVerificationId( + options?: GetVerificationIdOptionalParams + ): Promise { + return this.sendOperationRequest( + { options }, + getVerificationIdOperationSpec + ); + } + containerAppsAuthConfigs: ContainerAppsAuthConfigs; availableWorkloadProfiles: AvailableWorkloadProfiles; billingMeters: BillingMeters; + builders: Builders; + builds: Builds; connectedEnvironments: ConnectedEnvironments; connectedEnvironmentsCertificates: ConnectedEnvironmentsCertificates; connectedEnvironmentsDaprComponents: ConnectedEnvironmentsDaprComponents; connectedEnvironmentsStorages: ConnectedEnvironmentsStorages; containerApps: ContainerApps; - jobs: Jobs; - jobsExecutions: JobsExecutions; containerAppsRevisions: ContainerAppsRevisions; containerAppsRevisionReplicas: ContainerAppsRevisionReplicas; containerAppsDiagnostics: ContainerAppsDiagnostics; managedEnvironmentDiagnostics: ManagedEnvironmentDiagnostics; managedEnvironmentsDiagnostics: ManagedEnvironmentsDiagnostics; operations: Operations; + jobs: Jobs; + jobsExecutions: JobsExecutions; managedEnvironments: ManagedEnvironments; certificates: Certificates; managedCertificates: ManagedCertificates; @@ -246,3 +294,46 @@ export class ContainerAppsAPIClient extends coreClient.ServiceClient { managedEnvironmentsStorages: ManagedEnvironmentsStorages; containerAppsSourceControls: ContainerAppsSourceControls; } +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const jobExecutionOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.jobName, + Parameters.jobExecutionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getVerificationIdOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.App/getVerificationId", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { type: { name: "String" } } + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/models/index.ts b/sdk/appcontainers/arm-appcontainers/src/models/index.ts index 25be36ab20a6..8354dca5321a 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/index.ts @@ -338,6 +338,8 @@ export interface OpenIdConnectLogin { export interface Login { /** The routes that specify the endpoints used for login and logout requests. */ routes?: LoginRoutes; + /** The configuration settings of the token store. */ + tokenStore?: TokenStore; /** true if the fragments from the request are preserved after the login request is made; otherwise, false. */ preserveUrlFragmentsForLogins?: boolean; /** @@ -358,6 +360,28 @@ export interface LoginRoutes { logoutEndpoint?: string; } +/** The configuration settings of the token store. */ +export interface TokenStore { + /** + * true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. + * The default is false. + */ + enabled?: boolean; + /** + * The number of hours after session token expiration that a session token can be used to + * call the token refresh API. The default is 72 hours. + */ + tokenRefreshExtensionHours?: number; + /** The configuration settings of the storage of the tokens if blob storage is used. */ + azureBlobStorage?: BlobStorageTokenStore; +} + +/** 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 configuration settings of the session cookie's expiration. */ export interface CookieExpiration { /** The convention used when determining the session cookie's expiration. */ @@ -584,6 +608,122 @@ export interface BillingMeterProperties { displayName?: 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; +} + +/** 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; +} + +/** 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; +} + +/** 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 and application runtime. */ + 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[]; +} + /** Collection of connectedEnvironments */ export interface ConnectedEnvironmentCollection { /** Collection of resources. */ @@ -809,38 +949,6 @@ 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; -} - /** Non versioned Container App configuration properties that define the mutable settings of a Container app */ export interface Configuration { /** Collection of secrets used by a Container app */ @@ -858,6 +966,8 @@ export interface Configuration { dapr?: Dapr; /** Optional. Max inactive revisions a Container App can have. */ maxInactiveRevisions?: number; + /** Container App to be a dev Container App Service */ + service?: Service; } /** Container App Ingress configuration. */ @@ -889,6 +999,8 @@ export interface Ingress { clientCertificateMode?: IngressClientCertificateMode; /** CORS policy for container app */ corsPolicy?: CorsPolicy; + /** Settings to expose additional ports on container app */ + additionalPortMappings?: IngressPortMapping[]; } /** Traffic weight assigned to a revision */ @@ -947,6 +1059,16 @@ export interface CorsPolicy { allowCredentials?: boolean; } +/** Port mappings of container app ingress */ +export interface IngressPortMapping { + /** Specifies whether the app port is accessible outside of the environment */ + external: boolean; + /** Specifies the port user's container listens on */ + targetPort: number; + /** Specifies the exposed port for the target port. If not specified, it defaults to target port */ + exposedPort?: number; +} + /** Container App Private Registry */ export interface RegistryCredentials { /** Container Registry Server */ @@ -979,6 +1101,12 @@ export interface Dapr { enableApiLogging?: boolean; } +/** Container App to be a dev service */ +export interface Service { + /** Dev ContainerApp service type */ + type: string; +} + /** * Container App versioned application definition. * Defines the desired state of an immutable revision. @@ -987,6 +1115,8 @@ export interface Dapr { export interface Template { /** User friendly suffix that is appended to the revision name */ revisionSuffix?: string; + /** Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ + terminationGracePeriodSeconds?: number; /** List of specialized containers that run before app containers. */ initContainers?: InitContainer[]; /** List of container definitions for the Container App. */ @@ -995,6 +1125,8 @@ export interface Template { scale?: Scale; /** List of volume definitions for the Container App. */ volumes?: Volume[]; + /** List of container app services bound to the app */ + serviceBinds?: ServiceBind[]; } /** Container App base container definition. */ @@ -1044,6 +1176,8 @@ export interface VolumeMount { volumeName?: string; /** Path within the container at which the volume should be mounted.Must not contain ':'. */ mountPath?: string; + /** Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). */ + subPath?: string; } /** Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. */ @@ -1132,9 +1266,9 @@ export interface QueueScaleRule { auth?: ScaleRuleAuth[]; } -/** Auth Secrets for Container App Scale Rule */ +/** Auth Secrets for Scale Rule */ export interface ScaleRuleAuth { - /** Name of the Container App secret from which to pull the auth params. */ + /** Name of the secret from which to pull the auth params. */ secretRef?: string; /** Trigger Parameter that uses the secret */ triggerParameter?: string; @@ -1179,6 +1313,8 @@ 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. */ + mountOptions?: string; } /** Secret to be added to volume. */ @@ -1189,6 +1325,14 @@ export interface SecretVolumeItem { path?: string; } +/** Configuration to bind a ContainerApp to a dev ContainerApp Service */ +export interface ServiceBind { + /** Resource id of the target service */ + serviceId?: string; + /** Name of the service bind */ + name?: string; +} + /** Custom domain analysis. */ export interface CustomHostnameAnalysisResult { /** @@ -1308,10 +1452,10 @@ export interface ContainerAppSecret { readonly keyVaultUrl?: string; } -/** Container Apps Jobs collection ARM resource. */ -export interface JobsCollection { +/** Container App Revisions collection ARM resource. */ +export interface RevisionCollection { /** Collection of resources. */ - value: Job[]; + value: Revision[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1319,195 +1463,50 @@ export interface JobsCollection { readonly nextLink?: string; } -/** Non versioned Container Apps Job configuration properties */ -export interface JobConfiguration { - /** Collection of secrets used by a Container Apps Job */ - secrets?: Secret[]; - /** Trigger type of the job */ - triggerType: TriggerType; - /** Maximum number of seconds a replica is allowed to run. */ - replicaTimeout: number; - /** Maximum number of retries before failing the job. */ - replicaRetryLimit?: number; - /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ - manualTriggerConfig?: JobConfigurationManualTriggerConfig; - /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ - scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; - /** Collection of private container registry credentials used by a Container apps job */ - registries?: RegistryCredentials[]; -} - -/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ -export interface JobConfigurationManualTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ -export interface JobConfigurationScheduleTriggerConfig { - /** Minimum number of successful replica completions before overall job completion. */ - replicaCompletionCount?: number; - /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ - cronExpression: string; - /** Number of parallel replicas of a job that can run at a given time. */ - parallelism?: number; -} - -/** 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 */ -export interface JobTemplate { - /** List of specialized containers that run before app containers. */ - initContainers?: InitContainer[]; - /** List of container definitions for the Container App. */ - containers?: Container[]; - /** List of volume definitions for the Container App. */ - volumes?: Volume[]; -} - -/** Container Apps Job resource specific properties. */ -export interface JobPatchProperties { - /** 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. */ - tags?: { [propertyName: string]: string }; - properties?: JobPatchPropertiesProperties; -} - -export interface JobPatchPropertiesProperties { - /** Resource ID of environment. */ - environmentId?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** Outbound IP Addresses of a container apps job. */ - outboundIpAddresses?: string[]; - /** The endpoint of the eventstream of the container apps job. */ - eventStreamEndpoint?: string; -} - -/** Job's execution template, containing container configuration for a job's execution */ -export interface JobExecutionTemplate { - /** List of container definitions for the Container Apps Job. */ - containers?: JobExecutionContainer[]; - /** List of specialized containers that run before job containers. */ - initContainers?: JobExecutionContainer[]; -} - -/** Container Apps Jobs execution container definition. */ -export interface JobExecutionContainer { - /** 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?: ContainerResources; -} - -/** Container App's Job execution name. */ -export interface JobExecutionBase { - /** Job execution name. */ +/** Container object under Container App Revision Replica. */ +export interface ReplicaContainer { + /** The Name of the Container */ name?: string; - /** Job execution Id. */ - id?: 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 App executions names list. */ -export interface JobExecutionNamesCollection { +/** Container App Revision Replicas collection ARM resource. */ +export interface ReplicaCollection { /** Collection of resources. */ - value: JobExecutionBase[]; + value: Replica[]; } -/** Container App executions collection ARM resource. */ -export interface ContainerAppJobExecutions { - /** Collection of resources. */ - value: JobExecution[]; - /** - * 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 Apps Jobs execution. */ -export interface JobExecution { - /** Job execution Name. */ - name?: string; - /** Job execution Id. */ - id?: string; - /** Job Type. */ - type?: string; - /** - * Current running State of the job - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: JobExecutionRunningState; - /** Job execution start time. */ - startTime?: Date; - /** Job execution start time. */ - endTime?: Date; - /** Job's execution container. */ - template?: JobExecutionTemplate; -} - -/** Container Apps Job Secrets Collection ARM resource. */ -export interface JobSecretsCollection { - /** Collection of resources. */ - value: Secret[]; -} - -/** 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; - /** - * 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 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[]; +/** 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. @@ -1664,13 +1663,13 @@ export interface VnetConfiguration { /** Configuration of application logs */ export interface AppLogsConfiguration { - /** Logs destination */ + /** Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' */ destination?: string; - /** Log Analytics configuration */ + /** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' */ logAnalyticsConfiguration?: LogAnalyticsConfiguration; } -/** Log analytics configuration */ +/** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' */ export interface LogAnalyticsConfiguration { /** Log analytics customer id */ customerId?: string; @@ -1678,6 +1677,56 @@ export interface LogAnalyticsConfiguration { sharedKey?: string; } +/** 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; +} + +/** Configuration of datadog */ +export interface DataDogConfiguration { + /** The data dog site */ + site?: string; + /** The data dog api key */ + key?: string; +} + +/** Configuration of Open Telemetry traces */ +export interface TracesConfiguration { + /** 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 { + /** 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. */ @@ -1708,6 +1757,18 @@ export interface DaprConfiguration { readonly version?: string; } +/** Peer authentication settings for the Managed Environment */ +export interface ManagedEnvironmentPropertiesPeerAuthentication { + /** Mutual TLS authentication settings for the Managed Environment */ + mtls?: Mtls; +} + +/** Configuration properties for mutual TLS authentication */ +export interface Mtls { + /** Boolean indicating whether the mutual TLS authentication is enabled */ + enabled?: boolean; +} + /** Available operations of the service */ export interface AvailableOperations { /** Collection of available operation details */ @@ -1743,10 +1804,10 @@ export interface OperationDisplay { description?: string; } -/** Collection of Environments */ -export interface ManagedEnvironmentsCollection { +/** Container Apps Jobs collection ARM resource. */ +export interface JobsCollection { /** Collection of resources. */ - value: ManagedEnvironment[]; + value: Job[]; /** * Link to next page of resources. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1754,102 +1815,292 @@ export interface ManagedEnvironmentsCollection { readonly nextLink?: string; } -/** Certificate resource specific properties */ -export interface ManagedCertificateProperties { - /** - * Provisioning state of the certificate. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: CertificateProvisioningState; - /** Subject name of the certificate. */ - subjectName?: string; - /** - * Any error occurred during the certificate provision. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly error?: string; - /** Selected type of domain control validation for managed certificates. */ - domainControlValidation?: ManagedCertificateDomainControlValidation; - /** - * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly validationToken?: string; +/** Non versioned Container Apps Job configuration properties */ +export interface JobConfiguration { + /** Collection of secrets used by a Container Apps Job */ + secrets?: Secret[]; + /** Trigger type of the job */ + triggerType: TriggerType; + /** Maximum number of seconds a replica is allowed to run. */ + replicaTimeout: number; + /** Maximum number of retries before failing the job. */ + replicaRetryLimit?: number; + /** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ + manualTriggerConfig?: JobConfigurationManualTriggerConfig; + /** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ + scheduleTriggerConfig?: JobConfigurationScheduleTriggerConfig; + /** Trigger configuration of an event driven job. */ + eventTriggerConfig?: JobConfigurationEventTriggerConfig; + /** Collection of private container registry credentials used by a Container apps job */ + registries?: RegistryCredentials[]; } -/** A managed certificate to update */ -export interface ManagedCertificatePatch { - /** Application-specific metadata in the form of key-value pairs. */ - tags?: { [propertyName: string]: string }; +/** Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ +export interface JobConfigurationManualTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; } -/** Collection of Managed Certificates. */ -export interface ManagedCertificateCollection { - /** Collection of resources. */ - value: ManagedCertificate[]; - /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; +/** Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ +export interface JobConfigurationScheduleTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Cron formatted repeating schedule ("* * * * *") of a Cron Job. */ + cronExpression: string; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; } -/** Collection of workloadProfileStates */ -export interface WorkloadProfileStatesCollection { - /** Collection of resources. */ - value: WorkloadProfileStates[]; +/** Trigger configuration of an event driven job. */ +export interface JobConfigurationEventTriggerConfig { + /** Minimum number of successful replica completions before overall job completion. */ + replicaCompletionCount?: number; + /** Number of parallel replicas of a job that can run at a given time. */ + parallelism?: number; + /** Scaling configurations for event driven jobs. */ + scale?: JobScale; +} + +/** Scaling configurations for event driven jobs. */ +export interface JobScale { + /** Interval to check each event source in seconds. Defaults to 30s */ + pollingInterval?: number; + /** Minimum number of job executions that are created for a trigger, default 0 */ + minExecutions?: number; + /** Maximum number of job executions that are created for a trigger, default 100. */ + maxExecutions?: number; + /** Scaling rules. */ + rules?: JobScaleRule[]; +} + +/** Scaling rule. */ +export interface JobScaleRule { + /** Scale Rule Name */ + name?: string; /** - * Link to next page of resources. - * NOTE: This property will not be serialized. It can only be populated by the server. + * Type of the scale rule + * eg: azure-servicebus, redis etc. */ - readonly nextLink?: string; + type?: string; + /** Metadata properties to describe the scale rule. */ + metadata?: Record; + /** Authentication secrets for the scale rule. */ + auth?: ScaleRuleAuth[]; } -/** Workload Profile resource specific properties. */ -export interface WorkloadProfileStatesProperties { - /** Minimum count of instances. */ - minimumCount?: number; - /** Maximum count of nodes. */ - maximumCount?: number; - /** Current count of nodes. */ - currentCount?: number; +/** 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 */ +export interface JobTemplate { + /** List of specialized containers that run before app containers. */ + initContainers?: InitContainer[]; + /** List of container definitions for the Container App. */ + containers?: Container[]; + /** List of volume definitions for the Container App. */ + volumes?: Volume[]; } -/** Collection of Storage for Environments */ -export interface ManagedEnvironmentStoragesCollection { - /** Collection of storage resources. */ - value: ManagedEnvironmentStorage[]; +/** Container Apps Job resource specific properties. */ +export interface JobPatchProperties { + /** 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. */ + tags?: { [propertyName: string]: string }; + properties?: JobPatchPropertiesProperties; } -/** Storage properties */ -export interface ManagedEnvironmentStorageProperties { - /** Azure file properties */ - azureFile?: AzureFileProperties; +export interface JobPatchPropertiesProperties { + /** Resource ID of environment. */ + environmentId?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** Outbound IP Addresses of a container apps job. */ + outboundIpAddresses?: string[]; + /** The endpoint of the eventstream of the container apps job. */ + eventStreamEndpoint?: string; } -/** 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; +/** Job's execution template, containing container configuration for a job's execution */ +export interface JobExecutionTemplate { + /** List of container definitions for the Container Apps Job. */ + containers?: JobExecutionContainer[]; + /** List of specialized containers that run before job containers. */ + initContainers?: JobExecutionContainer[]; } -/** Configuration properties that define the mutable settings of a Container App SourceControl */ -export interface GithubActionConfiguration { - /** Registry configurations. */ - registryInfo?: RegistryInfo; - /** AzureCredentials configurations. */ - azureCredentials?: AzureCredentials; - /** Context path */ - contextPath?: string; - /** Image name */ +/** Container Apps Jobs execution container definition. */ +export interface JobExecutionContainer { + /** Container image tag. */ image?: string; - /** Code or Image */ - publishType?: 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?: ContainerResources; +} + +/** Container App's Job execution name. */ +export interface JobExecutionBase { + /** Job execution name. */ + name?: string; + /** Job execution Id. */ + id?: string; +} + +/** Container App executions collection ARM resource. */ +export interface ContainerAppJobExecutions { + /** Collection of resources. */ + value: JobExecution[]; + /** + * 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 Apps Job execution. */ +export interface JobExecution { + /** Job execution Name. */ + name?: string; + /** Job execution Id. */ + id?: string; + /** Job Type. */ + type?: string; + /** + * Current running State of the job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: JobExecutionRunningState; + /** Job execution start time. */ + startTime?: Date; + /** Job execution end time. */ + endTime?: Date; + /** Job's execution container. */ + template?: JobExecutionTemplate; +} + +/** Container Apps Job Secrets Collection ARM resource. */ +export interface JobSecretsCollection { + /** Collection of resources. */ + value: Secret[]; +} + +/** Collection of Environments */ +export interface ManagedEnvironmentsCollection { + /** Collection of resources. */ + value: ManagedEnvironment[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Certificate resource specific properties */ +export interface ManagedCertificateProperties { + /** + * Provisioning state of the certificate. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: CertificateProvisioningState; + /** Subject name of the certificate. */ + subjectName?: string; + /** + * Any error occurred during the certificate provision. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: string; + /** Selected type of domain control validation for managed certificates. */ + domainControlValidation?: ManagedCertificateDomainControlValidation; + /** + * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly validationToken?: string; +} + +/** A managed certificate to update */ +export interface ManagedCertificatePatch { + /** Application-specific metadata in the form of key-value pairs. */ + tags?: { [propertyName: string]: string }; +} + +/** Collection of Managed Certificates. */ +export interface ManagedCertificateCollection { + /** Collection of resources. */ + value: ManagedCertificate[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Collection of workloadProfileStates */ +export interface WorkloadProfileStatesCollection { + /** Collection of resources. */ + value: WorkloadProfileStates[]; + /** + * Link to next page of resources. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Workload Profile resource specific properties. */ +export interface WorkloadProfileStatesProperties { + /** Minimum count of instances. */ + minimumCount?: number; + /** Maximum count of nodes. */ + maximumCount?: number; + /** Current count of nodes. */ + currentCount?: 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; +} + +/** 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; + /** AzureCredentials configurations. */ + azureCredentials?: AzureCredentials; + /** Context path */ + contextPath?: string; + /** One time Github PAT to configure github environment */ + githubPersonalAccessToken?: string; + /** Image name */ + image?: string; + /** Code or Image */ + publishType?: string; /** Operation system */ os?: string; /** Runtime stack */ @@ -1876,10 +2127,18 @@ export interface AzureCredentials { clientSecret?: string; /** Tenant Id. */ tenantId?: string; + /** Kind of auth github does for deploying the template */ + kind?: string; /** Subscription Id. */ subscriptionId?: string; } +/** Container App executions names list. */ +export interface JobExecutionNamesCollection { + /** Collection of resources. */ + value: JobExecutionBase[]; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} @@ -1930,6 +2189,29 @@ export interface BillingMeter extends ProxyResource { 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?: ProvisioningState; + /** + * 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; +} + /** Dapr Component. */ export interface DaprComponent extends ProxyResource { /** Component type */ @@ -2011,6 +2293,11 @@ export interface Revision extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: RevisionProvisioningState; + /** + * Current running state of the revision + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: RevisionRunningState; } /** Container App Revision Replica. */ @@ -2020,8 +2307,20 @@ export interface Replica extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly createdTime?: Date; + /** + * Current running state of the replica + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningState?: ContainerAppReplicaRunningState; + /** + * The details of replica current running state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly runningStateDetails?: string; /** The containers collection under a replica. */ containers?: ReplicaContainer[]; + /** The init containers collection under a replica. */ + initContainers?: ReplicaContainer[]; } /** Diagnostics data for a resource. */ @@ -2061,6 +2360,31 @@ 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?: ProvisioningState; + /** Resource ID of the container apps environment that the builder is associated with. */ + environmentId?: string; + /** + * Resource ID of the compute that the builds will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly buildComputeId?: string; + /** + * Resource ID of the compute that the patching will be performed on. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly patchComputeId?: 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. */ @@ -2163,35 +2487,6 @@ export interface ContainerAppAuthToken extends TrackedResource { readonly expires?: Date; } -/** Container App Job */ -export interface Job extends TrackedResource { - /** 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; - /** - * Provisioning state of the Container Apps Job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly provisioningState?: JobProvisioningState; - /** Resource ID of environment. */ - environmentId?: string; - /** Workload profile name to pin for container apps job execution. */ - workloadProfileName?: string; - /** Container Apps Job configuration properties. */ - configuration?: JobConfiguration; - /** Container Apps job definition. */ - template?: JobTemplate; - /** - * Outbound IP Addresses of a container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly outboundIpAddresses?: string[]; - /** - * The endpoint of the eventstream of the container apps job. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventStreamEndpoint?: string; -} - /** An environment for hosting container apps */ export interface ManagedEnvironment extends TrackedResource { /** Kind of the Environment. */ @@ -2228,6 +2523,10 @@ 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; /** Custom domain configuration for the environment */ @@ -2245,21 +2544,52 @@ export interface ManagedEnvironment extends TrackedResource { daprConfiguration?: DaprConfiguration; /** Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. */ infrastructureResourceGroup?: string; + /** Peer authentication settings for the Managed Environment */ + peerAuthentication?: ManagedEnvironmentPropertiesPeerAuthentication; } -/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ -export interface ManagedCertificate extends TrackedResource { - /** Certificate resource specific properties */ - properties?: ManagedCertificateProperties; -} - -/** Environment Auth Token. */ -export interface EnvironmentAuthToken extends TrackedResource { +/** Container App Job */ +export interface Job extends TrackedResource { + /** 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; /** - * Auth token value. + * Provisioning state of the Container Apps Job. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly token?: string; + readonly provisioningState?: JobProvisioningState; + /** Resource ID of environment. */ + environmentId?: string; + /** Workload profile name to pin for container apps job execution. */ + workloadProfileName?: string; + /** Container Apps Job configuration properties. */ + configuration?: JobConfiguration; + /** Container Apps job definition. */ + template?: JobTemplate; + /** + * Outbound IP Addresses of a container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly outboundIpAddresses?: string[]; + /** + * The endpoint of the eventstream of the container apps job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventStreamEndpoint?: string; +} + +/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment */ +export interface ManagedCertificate extends TrackedResource { + /** Certificate resource specific properties */ + properties?: ManagedCertificateProperties; +} + +/** Environment Auth Token. */ +export interface EnvironmentAuthToken extends TrackedResource { + /** + * Auth token value. + * 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. @@ -2267,6 +2597,31 @@ export interface EnvironmentAuthToken extends TrackedResource { readonly expires?: Date; } +/** 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; @@ -2282,6 +2637,16 @@ export interface ContainerAppsUpdateHeaders { location?: string; } +/** Defines headers for ContainerApps_start operation. */ +export interface ContainerAppsStartHeaders { + location?: string; +} + +/** Defines headers for ContainerApps_stop operation. */ +export interface ContainerAppsStopHeaders { + location?: string; +} + /** Defines headers for Jobs_delete operation. */ export interface JobsDeleteHeaders { location?: string; @@ -2349,6 +2714,87 @@ export enum KnownApplicability { */ export type Applicability = string; +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Creating** \ + * **Updating** \ + * **Deleting** + */ +export type ProvisioningState = 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 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 { /** CustomLocation */ @@ -2463,30 +2909,6 @@ 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" -} - -/** - * 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 ContainerAppProvisioningState} that the service accepts. */ export enum KnownContainerAppProvisioningState { /** InProgress */ @@ -2733,56 +3155,56 @@ export enum KnownStorageType { */ export type StorageType = 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" +/** Known values of {@link RevisionHealthState} that the service accepts. */ +export enum KnownRevisionHealthState { + /** Healthy */ + Healthy = "Healthy", + /** Unhealthy */ + Unhealthy = "Unhealthy", + /** None */ + None = "None" } /** - * Defines values for JobProvisioningState. \ - * {@link KnownJobProvisioningState} can be used interchangeably with JobProvisioningState, + * Defines values for RevisionHealthState. \ + * {@link KnownRevisionHealthState} can be used interchangeably with RevisionHealthState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **InProgress** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** + * **Healthy** \ + * **Unhealthy** \ + * **None** */ -export type JobProvisioningState = string; +export type RevisionHealthState = string; -/** Known values of {@link TriggerType} that the service accepts. */ -export enum KnownTriggerType { - /** Scheduled */ - Scheduled = "Scheduled", - /** Event */ - Event = "Event", - /** Manual */ - Manual = "Manual" +/** Known values of {@link RevisionProvisioningState} that the service accepts. */ +export enum KnownRevisionProvisioningState { + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** Failed */ + Failed = "Failed", + /** Deprovisioning */ + Deprovisioning = "Deprovisioning", + /** Deprovisioned */ + Deprovisioned = "Deprovisioned" } /** - * Defines values for TriggerType. \ - * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * Defines values for RevisionProvisioningState. \ + * {@link KnownRevisionProvisioningState} can be used interchangeably with RevisionProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Scheduled** \ - * **Event** \ - * **Manual** + * **Provisioning** \ + * **Provisioned** \ + * **Failed** \ + * **Deprovisioning** \ + * **Deprovisioned** */ -export type TriggerType = string; +export type RevisionProvisioningState = string; -/** Known values of {@link JobExecutionRunningState} that the service accepts. */ -export enum KnownJobExecutionRunningState { +/** Known values of {@link RevisionRunningState} that the service accepts. */ +export enum KnownRevisionRunningState { /** Running */ Running = "Running", /** Processing */ @@ -2794,14 +3216,12 @@ export enum KnownJobExecutionRunningState { /** Failed */ Failed = "Failed", /** Unknown */ - Unknown = "Unknown", - /** Succeeded */ - Succeeded = "Succeeded" + Unknown = "Unknown" } /** - * Defines values for JobExecutionRunningState. \ - * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * Defines values for RevisionRunningState. \ + * {@link KnownRevisionRunningState} can be used interchangeably with RevisionRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Running** \ @@ -2809,58 +3229,51 @@ export enum KnownJobExecutionRunningState { * **Stopped** \ * **Degraded** \ * **Failed** \ - * **Unknown** \ - * **Succeeded** + * **Unknown** */ -export type JobExecutionRunningState = string; +export type RevisionRunningState = string; -/** Known values of {@link RevisionHealthState} that the service accepts. */ -export enum KnownRevisionHealthState { - /** Healthy */ - Healthy = "Healthy", - /** Unhealthy */ - Unhealthy = "Unhealthy", - /** None */ - None = "None" +/** Known values of {@link ContainerAppReplicaRunningState} that the service accepts. */ +export enum KnownContainerAppReplicaRunningState { + /** Running */ + Running = "Running", + /** NotRunning */ + NotRunning = "NotRunning", + /** Unknown */ + Unknown = "Unknown" } /** - * Defines values for RevisionHealthState. \ - * {@link KnownRevisionHealthState} can be used interchangeably with RevisionHealthState, + * Defines values for ContainerAppReplicaRunningState. \ + * {@link KnownContainerAppReplicaRunningState} can be used interchangeably with ContainerAppReplicaRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Healthy** \ - * **Unhealthy** \ - * **None** + * **Running** \ + * **NotRunning** \ + * **Unknown** */ -export type RevisionHealthState = string; +export type ContainerAppReplicaRunningState = string; -/** Known values of {@link RevisionProvisioningState} that the service accepts. */ -export enum KnownRevisionProvisioningState { - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** Failed */ - Failed = "Failed", - /** Deprovisioning */ - Deprovisioning = "Deprovisioning", - /** Deprovisioned */ - Deprovisioned = "Deprovisioned" +/** Known values of {@link ContainerAppContainerRunningState} that the service accepts. */ +export enum KnownContainerAppContainerRunningState { + /** Running */ + Running = "Running", + /** Terminated */ + Terminated = "Terminated", + /** Waiting */ + Waiting = "Waiting" } /** - * Defines values for RevisionProvisioningState. \ - * {@link KnownRevisionProvisioningState} can be used interchangeably with RevisionProvisioningState, + * Defines values for ContainerAppContainerRunningState. \ + * {@link KnownContainerAppContainerRunningState} can be used interchangeably with ContainerAppContainerRunningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Provisioning** \ - * **Provisioned** \ - * **Failed** \ - * **Deprovisioning** \ - * **Deprovisioned** + * **Running** \ + * **Terminated** \ + * **Waiting** */ -export type RevisionProvisioningState = string; +export type ContainerAppContainerRunningState = string; /** Known values of {@link EnvironmentProvisioningState} that the service accepts. */ export enum KnownEnvironmentProvisioningState { @@ -2904,6 +3317,87 @@ export enum KnownEnvironmentProvisioningState { */ export type EnvironmentProvisioningState = 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 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 JobExecutionRunningState} that the service accepts. */ +export enum KnownJobExecutionRunningState { + /** Running */ + Running = "Running", + /** Processing */ + Processing = "Processing", + /** Stopped */ + Stopped = "Stopped", + /** Degraded */ + Degraded = "Degraded", + /** Failed */ + Failed = "Failed", + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded" +} + +/** + * Defines values for JobExecutionRunningState. \ + * {@link KnownJobExecutionRunningState} can be used interchangeably with JobExecutionRunningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Running** \ + * **Processing** \ + * **Stopped** \ + * **Degraded** \ + * **Failed** \ + * **Unknown** \ + * **Succeeded** + */ +export type JobExecutionRunningState = string; + /** Known values of {@link ManagedCertificateDomainControlValidation} that the service accepts. */ export enum KnownManagedCertificateDomainControlValidation { /** Cname */ @@ -2999,22 +3493,131 @@ export type ContainerAppsAuthConfigsListByContainerAppNextResponse = AuthConfigC export interface AvailableWorkloadProfilesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; +/** Contains response data for the get operation. */ +export type AvailableWorkloadProfilesGetResponse = AvailableWorkloadProfilesCollection; + +/** Optional parameters. */ +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; +} + +/** 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 BuildsListByBuilderResourceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByBuilderResource operation. */ +export type BuildsListByBuilderResourceResponse = 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 AvailableWorkloadProfilesGetNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getNext operation. */ -export type AvailableWorkloadProfilesGetNextResponse = AvailableWorkloadProfilesCollection; +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; +} /** Optional parameters. */ -export interface BillingMetersGetOptionalParams +export interface BuildsListByBuilderResourceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type BillingMetersGetResponse = BillingMeterCollection; +/** Contains response data for the listByBuilderResourceNext operation. */ +export type BuildsListByBuilderResourceNextResponse = BuildCollection; /** Optional parameters. */ export interface ConnectedEnvironmentsListBySubscriptionOptionalParams @@ -3271,41 +3874,7 @@ export interface ContainerAppsGetAuthTokenOptionalParams export type ContainerAppsGetAuthTokenResponse = ContainerAppAuthToken; /** Optional parameters. */ -export interface ContainerAppsListBySubscriptionNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscriptionNext operation. */ -export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; - -/** Optional parameters. */ -export interface ContainerAppsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; - -/** Optional parameters. */ -export interface JobsListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type JobsListBySubscriptionResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type JobsListByResourceGroupResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type JobsGetResponse = Job; - -/** Optional parameters. */ -export interface JobsCreateOrUpdateOptionalParams +export interface ContainerAppsStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3313,50 +3882,11 @@ export interface JobsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type JobsCreateOrUpdateResponse = Job; - -/** Optional parameters. */ -export interface JobsDeleteOptionalParams 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; -} - -/** Optional parameters. */ -export interface JobsUpdateOptionalParams 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 JobsUpdateResponse = Job; - -/** Optional parameters. */ -export interface JobsStartOptionalParams 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 start operation. */ -export type JobsStartResponse = JobExecutionBase; - -/** Optional parameters. */ -export interface JobsStopExecutionOptionalParams - 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; -} +export type ContainerAppsStartResponse = ContainerApp; /** Optional parameters. */ -export interface JobsStopMultipleExecutionsOptionalParams +export interface ContainerAppsStopOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3364,46 +3894,22 @@ export interface JobsStopMultipleExecutionsOptionalParams resumeFrom?: string; } -/** Contains response data for the stopMultipleExecutions operation. */ -export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsListSecretsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSecrets operation. */ -export type JobsListSecretsResponse = JobSecretsCollection; +/** Contains response data for the stop operation. */ +export type ContainerAppsStopResponse = ContainerApp; /** Optional parameters. */ -export interface JobsListBySubscriptionNextOptionalParams +export interface ContainerAppsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listBySubscriptionNext operation. */ -export type JobsListBySubscriptionNextResponse = JobsCollection; +export type ContainerAppsListBySubscriptionNextResponse = ContainerAppCollection; /** Optional parameters. */ -export interface JobsListByResourceGroupNextOptionalParams +export interface ContainerAppsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroupNext operation. */ -export type JobsListByResourceGroupNextResponse = JobsCollection; - -/** Optional parameters. */ -export interface JobsExecutionsListOptionalParams - extends coreClient.OperationOptions { - /** The filter to apply on the operation. */ - filter?: string; -} - -/** Contains response data for the list operation. */ -export type JobsExecutionsListResponse = ContainerAppJobExecutions; - -/** Optional parameters. */ -export interface JobsExecutionsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; +export type ContainerAppsListByResourceGroupNextResponse = ContainerAppCollection; /** Optional parameters. */ export interface ContainerAppsRevisionsListRevisionsOptionalParams @@ -3542,6 +4048,144 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = AvailableOperations; +/** Optional parameters. */ +export interface JobsListBySubscriptionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscription operation. */ +export type JobsListBySubscriptionResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type JobsListByResourceGroupResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; + +/** Optional parameters. */ +export interface JobsCreateOrUpdateOptionalParams + 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 JobsCreateOrUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsDeleteOptionalParams 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; +} + +/** Optional parameters. */ +export interface JobsUpdateOptionalParams 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 JobsUpdateResponse = Job; + +/** Optional parameters. */ +export interface JobsStartOptionalParams 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 start operation. */ +export type JobsStartResponse = JobExecutionBase; + +/** Optional parameters. */ +export interface JobsStopExecutionOptionalParams + 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; +} + +/** Optional parameters. */ +export interface JobsStopMultipleExecutionsOptionalParams + 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 stopMultipleExecutions operation. */ +export type JobsStopMultipleExecutionsResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsListSecretsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSecrets operation. */ +export type JobsListSecretsResponse = JobSecretsCollection; + +/** Optional parameters. */ +export interface JobsListBySubscriptionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySubscriptionNext operation. */ +export type JobsListBySubscriptionNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type JobsListByResourceGroupNextResponse = JobsCollection; + +/** Optional parameters. */ +export interface JobsExecutionsListOptionalParams + extends coreClient.OperationOptions { + /** The filter to apply on the operation. */ + filter?: string; +} + +/** Contains response data for the list operation. */ +export type JobsExecutionsListResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobsExecutionsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type JobsExecutionsListNextResponse = ContainerAppJobExecutions; + +/** Optional parameters. */ +export interface JobExecutionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the jobExecution operation. */ +export type JobExecutionResponse = JobExecution; + +/** Optional parameters. */ +export interface GetVerificationIdOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getVerificationId operation. */ +export type GetVerificationIdResponse = { + /** The parsed response body. */ + body: string; +}; + /** Optional parameters. */ export interface ManagedEnvironmentsListBySubscriptionOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts index 49b918fc0a4a..1fdd4b7bf025 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/mappers.ts @@ -872,6 +872,13 @@ export const Login: coreClient.CompositeMapper = { className: "LoginRoutes" } }, + tokenStore: { + serializedName: "tokenStore", + type: { + name: "Composite", + className: "TokenStore" + } + }, preserveUrlFragmentsForLogins: { serializedName: "preserveUrlFragmentsForLogins", type: { @@ -922,6 +929,50 @@ export const LoginRoutes: coreClient.CompositeMapper = { } }; +export const TokenStore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenStore", + modelProperties: { + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + tokenRefreshExtensionHours: { + serializedName: "tokenRefreshExtensionHours", + type: { + name: "Number" + } + }, + azureBlobStorage: { + serializedName: "azureBlobStorage", + type: { + name: "Composite", + className: "BlobStorageTokenStore" + } + } + } + } +}; + +export const BlobStorageTokenStore: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BlobStorageTokenStore", + modelProperties: { + sasUrlSettingName: { + serializedName: "sasUrlSettingName", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const CookieExpiration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1427,26 +1478,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" } @@ -1455,19 +1506,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" } @@ -1476,101 +1529,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" - } - }, - dnsSuffix: { - serializedName: "dnsSuffix", - type: { - name: "String" - } - }, - certificateValue: { - serializedName: "certificateValue", - type: { - name: "ByteArray" - } - }, - certificatePassword: { - serializedName: "certificatePassword", - type: { - name: "String" + name: "Uuid" } }, - expirationDate: { - serializedName: "expirationDate", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { - name: "DateTime" + name: "Uuid" } }, - thumbprint: { - serializedName: "thumbprint", - readOnly: true, + type: { + serializedName: "type", + required: 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" } @@ -1579,10 +1620,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", @@ -1592,14 +1633,13 @@ export const CertificateCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Certificate" + className: "BuildResource" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -1608,237 +1648,209 @@ 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, - type: { - name: "String" - } - } - } - } -}; - -export const Secret: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Secret", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "String" - } - }, - identity: { - serializedName: "identity", - type: { - name: "String" - } - }, - keyVaultUrl: { - serializedName: "keyVaultUrl", + httpGet: { + serializedName: "httpGet", type: { - name: "String" + name: "Composite", + className: "HttpGet" } } } } }; -export const DaprMetadata: coreClient.CompositeMapper = { +export const HttpGet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DaprMetadata", + className: "HttpGet", modelProperties: { - name: { - serializedName: "name", + url: { + serializedName: "url", + required: true, type: { name: "String" } }, - value: { - serializedName: "value", + fileName: { + serializedName: "fileName", type: { name: "String" } }, - secretRef: { - serializedName: "secretRef", + headers: { + serializedName: "headers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -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" } @@ -1847,69 +1859,101 @@ export const DaprSecret: coreClient.CompositeMapper = { } }; -export const ConnectedEnvironmentStoragesCollection: coreClient.CompositeMapper = { +export const CustomDomainConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStoragesCollection", + className: "CustomDomainConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + customDomainVerificationId: { + serializedName: "customDomainVerificationId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ConnectedEnvironmentStorage" - } - } + name: "String" + } + }, + dnsSuffix: { + serializedName: "dnsSuffix", + type: { + name: "String" + } + }, + certificateValue: { + serializedName: "certificateValue", + type: { + name: "ByteArray" + } + }, + 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, + type: { + name: "String" } } } } }; -export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedEnvironmentStorageProperties", + className: "CheckNameAvailabilityRequest", modelProperties: { - azureFile: { - serializedName: "azureFile", + name: { + serializedName: "name", type: { - name: "Composite", - className: "AzureFileProperties" + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" } } } } }; -export const AzureFileProperties: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureFileProperties", + className: "CheckNameAvailabilityResponse", modelProperties: { - accountName: { - serializedName: "accountName", - type: { - name: "String" - } - }, - accountKey: { - serializedName: "accountKey", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "String" + name: "Boolean" } }, - accessMode: { - serializedName: "accessMode", + reason: { + serializedName: "reason", type: { name: "String" } }, - shareName: { - serializedName: "shareName", + message: { + serializedName: "message", type: { name: "String" } @@ -1918,10 +1962,10 @@ export const AzureFileProperties: coreClient.CompositeMapper = { } }; -export const ContainerAppCollection: coreClient.CompositeMapper = { +export const CertificateCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppCollection", + className: "CertificateCollection", modelProperties: { value: { serializedName: "value", @@ -1931,7 +1975,7 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ContainerApp" + className: "Certificate" } } } @@ -1947,89 +1991,366 @@ export const ContainerAppCollection: coreClient.CompositeMapper = { } }; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { +export const CertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServiceIdentity", + className: "CertificateProperties", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - type: { - serializedName: "type", - required: true, + password: { + serializedName: "password", type: { name: "String" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserAssignedIdentity" } - } - } - } - } - } -}; - -export const UserAssignedIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserAssignedIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", + subjectName: { + serializedName: "subjectName", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - clientId: { - serializedName: "clientId", + subjectAlternativeNames: { + serializedName: "subjectAlternativeNames", readOnly: true, - type: { - name: "Uuid" - } - } - } - } -}; - -export const Configuration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Configuration", - modelProperties: { - secrets: { - serializedName: "secrets", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Secret" + name: "String" } } } }, - activeRevisionsMode: { - defaultValue: "Single", - serializedName: "activeRevisionsMode", - type: { + value: { + serializedName: "value", + type: { + 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" + } + } + } + } +}; + +export const CertificatePatch: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CertificatePatch", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +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 Secret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Secret", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + identity: { + serializedName: "identity", + type: { + name: "String" + } + }, + keyVaultUrl: { + serializedName: "keyVaultUrl", + type: { + name: "String" + } + } + } + } +}; + +export const DaprMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + }, + secretRef: { + serializedName: "secretRef", + type: { + name: "String" + } + } + } + } +}; + +export const DaprSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DaprSecret" + } + } + } + } + } + } +}; + +export const DaprSecret: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprSecret", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + 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" + } + } + } + } + } + } +}; + +export const ConnectedEnvironmentStorageProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedEnvironmentStorageProperties", + modelProperties: { + azureFile: { + serializedName: "azureFile", + type: { + name: "Composite", + className: "AzureFileProperties" + } + } + } + } +}; + +export const AzureFileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureFileProperties", + modelProperties: { + accountName: { + serializedName: "accountName", + type: { + name: "String" + } + }, + accountKey: { + serializedName: "accountKey", + type: { + name: "String" + } + }, + accessMode: { + serializedName: "accessMode", + type: { + name: "String" + } + }, + shareName: { + serializedName: "shareName", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerApp" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const Configuration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Configuration", + modelProperties: { + secrets: { + serializedName: "secrets", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } + } + }, + activeRevisionsMode: { + defaultValue: "Single", + serializedName: "activeRevisionsMode", + type: { name: "String" } }, @@ -2064,6 +2385,13 @@ export const Configuration: coreClient.CompositeMapper = { type: { name: "Number" } + }, + service: { + serializedName: "service", + type: { + name: "Composite", + className: "Service" + } } } } @@ -2169,6 +2497,18 @@ export const Ingress: coreClient.CompositeMapper = { name: "Composite", className: "CorsPolicy" } + }, + additionalPortMappings: { + serializedName: "additionalPortMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IngressPortMapping" + } + } + } } } } @@ -2353,6 +2693,35 @@ export const CorsPolicy: coreClient.CompositeMapper = { } }; +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" + } + }, + exposedPort: { + serializedName: "exposedPort", + type: { + name: "Number" + } + } + } + } +}; + export const RegistryCredentials: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2445,6 +2814,22 @@ export const Dapr: coreClient.CompositeMapper = { } }; +export const Service: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Service", + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + } + } + } +}; + export const Template: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2456,6 +2841,12 @@ export const Template: coreClient.CompositeMapper = { name: "String" } }, + terminationGracePeriodSeconds: { + serializedName: "terminationGracePeriodSeconds", + type: { + name: "Number" + } + }, initContainers: { serializedName: "initContainers", type: { @@ -2498,6 +2889,18 @@ export const Template: coreClient.CompositeMapper = { } } } + }, + serviceBinds: { + serializedName: "serviceBinds", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceBind" + } + } + } } } } @@ -2648,6 +3051,12 @@ export const VolumeMount: coreClient.CompositeMapper = { type: { name: "String" } + }, + subPath: { + serializedName: "subPath", + type: { + name: "String" + } } } } @@ -3064,6 +3473,12 @@ export const Volume: coreClient.CompositeMapper = { } } } + }, + mountOptions: { + serializedName: "mountOptions", + type: { + name: "String" + } } } } @@ -3090,6 +3505,27 @@ export const SecretVolumeItem: coreClient.CompositeMapper = { } }; +export const ServiceBind: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceBind", + modelProperties: { + serviceId: { + serializedName: "serviceId", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const CustomHostnameAnalysisResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3339,10 +3775,10 @@ export const ContainerAppSecret: coreClient.CompositeMapper = { } }; -export const JobsCollection: coreClient.CompositeMapper = { +export const RevisionCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobsCollection", + className: "RevisionCollection", modelProperties: { value: { serializedName: "value", @@ -3352,7 +3788,7 @@ export const JobsCollection: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Job" + className: "Revision" } } } @@ -3368,160 +3804,324 @@ export const JobsCollection: coreClient.CompositeMapper = { } }; -export const JobConfiguration: coreClient.CompositeMapper = { +export const ReplicaContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfiguration", + className: "ReplicaContainer", modelProperties: { - secrets: { - serializedName: "secrets", + 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" + } + } + } + } +}; + +export const ReplicaCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicaCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Secret" + className: "Replica" } } } - }, - triggerType: { - defaultValue: "Manual", - serializedName: "triggerType", + } + } + } +}; + +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" } }, - replicaTimeout: { - serializedName: "replicaTimeout", - required: true, + description: { + serializedName: "description", + readOnly: true, type: { - name: "Number" + name: "String" } }, - replicaRetryLimit: { - serializedName: "replicaRetryLimit", + author: { + serializedName: "author", + readOnly: true, type: { - name: "Number" + name: "String" } }, - manualTriggerConfig: { - serializedName: "manualTriggerConfig", + category: { + serializedName: "category", + readOnly: true, type: { - name: "Composite", - className: "JobConfigurationManualTriggerConfig" + name: "String" } }, - scheduleTriggerConfig: { - serializedName: "scheduleTriggerConfig", + supportTopicList: { + serializedName: "supportTopicList", type: { - name: "Composite", - className: "JobConfigurationScheduleTriggerConfig" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DiagnosticSupportTopic" + } + } } }, - registries: { - serializedName: "registries", + analysisTypes: { + serializedName: "analysisTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "RegistryCredentials" + name: "String" } } } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + score: { + serializedName: "score", + readOnly: true, + type: { + name: "Number" + } } } } }; -export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { +export const DiagnosticSupportTopic: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationManualTriggerConfig", + className: "DiagnosticSupportTopic", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Number" + name: "String" } }, - parallelism: { - serializedName: "parallelism", + pesId: { + serializedName: "pesId", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { +export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobConfigurationScheduleTriggerConfig", + className: "DiagnosticsDataApiResponse", modelProperties: { - replicaCompletionCount: { - serializedName: "replicaCompletionCount", - type: { - name: "Number" - } - }, - cronExpression: { - serializedName: "cronExpression", - required: true, + table: { + serializedName: "table", type: { - name: "String" + name: "Composite", + className: "DiagnosticDataTableResponseObject" } }, - parallelism: { - serializedName: "parallelism", + renderingProperties: { + serializedName: "renderingProperties", type: { - name: "Number" + name: "Composite", + className: "DiagnosticRendering" } } } } }; -export const JobTemplate: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobTemplate", + className: "DiagnosticDataTableResponseObject", modelProperties: { - initContainers: { - serializedName: "initContainers", + tableName: { + serializedName: "tableName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InitContainer" - } - } + name: "String" } }, - containers: { - serializedName: "containers", + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Container" + className: "DiagnosticDataTableResponseColumn" } } } }, - volumes: { - serializedName: "volumes", + rows: { + serializedName: "rows", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Volume" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -3530,107 +4130,106 @@ export const JobTemplate: coreClient.CompositeMapper = { } }; -export const JobPatchProperties: coreClient.CompositeMapper = { +export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchProperties", + className: "DiagnosticDataTableResponseColumn", modelProperties: { - identity: { - serializedName: "identity", + columnName: { + serializedName: "columnName", type: { - name: "Composite", - className: "ManagedServiceIdentity" + name: "String" } }, - tags: { - serializedName: "tags", + dataType: { + serializedName: "dataType", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - properties: { - serializedName: "properties", + columnType: { + serializedName: "columnType", type: { - name: "Composite", - className: "JobPatchPropertiesProperties" + name: "String" } } } } }; -export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { +export const DiagnosticRendering: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobPatchPropertiesProperties", + className: "DiagnosticRendering", modelProperties: { - environmentId: { - serializedName: "environmentId", + type: { + serializedName: "type", type: { - name: "String" + name: "Number" } }, - configuration: { - serializedName: "configuration", + title: { + serializedName: "title", type: { - name: "Composite", - className: "JobConfiguration" + name: "String" } }, - template: { - serializedName: "template", + description: { + serializedName: "description", type: { - name: "Composite", - className: "JobTemplate" + name: "String" } }, - outboundIpAddresses: { - serializedName: "outboundIpAddresses", + isVisible: { + serializedName: "isVisible", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } - }, - eventStreamEndpoint: { - serializedName: "eventStreamEndpoint", + } + } + } +}; + +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 JobExecutionTemplate: coreClient.CompositeMapper = { +export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionTemplate", + className: "DiagnosticDataProviderMetadata", modelProperties: { - containers: { - serializedName: "containers", + providerName: { + serializedName: "providerName", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionContainer" - } - } + name: "String" } }, - initContainers: { - serializedName: "initContainers", + propertyBag: { + serializedName: "propertyBag", type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobExecutionContainer" + className: "DiagnosticDataProviderMetadataPropertyBagItem" } } } @@ -3639,132 +4238,116 @@ export const JobExecutionTemplate: coreClient.CompositeMapper = { } }; -export const JobExecutionContainer: coreClient.CompositeMapper = { +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: "JobExecutionContainer", + className: "VnetConfiguration", modelProperties: { - image: { - serializedName: "image", + internal: { + serializedName: "internal", type: { - name: "String" + name: "Boolean" } }, - name: { - serializedName: "name", + infrastructureSubnetId: { + serializedName: "infrastructureSubnetId", type: { name: "String" } }, - command: { - serializedName: "command", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - args: { - serializedName: "args", + dockerBridgeCidr: { + serializedName: "dockerBridgeCidr", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - env: { - serializedName: "env", + platformReservedCidr: { + serializedName: "platformReservedCidr", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EnvironmentVar" - } - } + name: "String" } }, - resources: { - serializedName: "resources", + platformReservedDnsIP: { + serializedName: "platformReservedDnsIP", type: { - name: "Composite", - className: "ContainerResources" + name: "String" } } } } }; -export const JobExecutionBase: coreClient.CompositeMapper = { +export const AppLogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionBase", + className: "AppLogsConfiguration", modelProperties: { - name: { - serializedName: "name", + destination: { + serializedName: "destination", type: { name: "String" } }, - id: { - serializedName: "id", + logAnalyticsConfiguration: { + serializedName: "logAnalyticsConfiguration", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsConfiguration" } } } } }; -export const JobExecutionNamesCollection: coreClient.CompositeMapper = { +export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionNamesCollection", + className: "LogAnalyticsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + customerId: { + serializedName: "customerId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecutionBase" - } - } + name: "String" + } + }, + sharedKey: { + serializedName: "sharedKey", + type: { + name: "String" } } } } }; -export const ContainerAppJobExecutions: coreClient.CompositeMapper = { +export const AppInsightsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContainerAppJobExecutions", + className: "AppInsightsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobExecution" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + connectionString: { + serializedName: "connectionString", type: { name: "String" } @@ -3773,73 +4356,92 @@ export const ContainerAppJobExecutions: coreClient.CompositeMapper = { } }; -export const JobExecution: coreClient.CompositeMapper = { +export const OpenTelemetryConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecution", + className: "OpenTelemetryConfiguration", modelProperties: { - name: { - serializedName: "name", + destinationsConfiguration: { + serializedName: "destinationsConfiguration", type: { - name: "String" + name: "Composite", + className: "DestinationsConfiguration" } }, - id: { - serializedName: "id", + tracesConfiguration: { + serializedName: "tracesConfiguration", type: { - name: "String" + name: "Composite", + className: "TracesConfiguration" } }, - type: { - serializedName: "type", + logsConfiguration: { + serializedName: "logsConfiguration", type: { - name: "String" + name: "Composite", + className: "LogsConfiguration" } }, - status: { - serializedName: "status", - readOnly: true, + metricsConfiguration: { + serializedName: "metricsConfiguration", type: { - name: "String" + name: "Composite", + className: "MetricsConfiguration" } - }, - startTime: { - serializedName: "startTime", + } + } + } +}; + +export const DestinationsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DestinationsConfiguration", + modelProperties: { + dataDogConfiguration: { + serializedName: "dataDogConfiguration", type: { - name: "DateTime" + name: "Composite", + className: "DataDogConfiguration" } - }, - endTime: { - serializedName: "endTime", + } + } + } +}; + +export const DataDogConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataDogConfiguration", + modelProperties: { + site: { + serializedName: "site", type: { - name: "DateTime" + name: "String" } }, - template: { - serializedName: "template", + key: { + serializedName: "key", type: { - name: "Composite", - className: "JobExecutionTemplate" + name: "String" } } } } }; -export const JobSecretsCollection: coreClient.CompositeMapper = { +export const TracesConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobSecretsCollection", + className: "TracesConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + destinations: { + serializedName: "destinations", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Secret" + name: "String" } } } @@ -3848,131 +4450,163 @@ export const JobSecretsCollection: coreClient.CompositeMapper = { } }; -export const RevisionCollection: coreClient.CompositeMapper = { +export const LogsConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RevisionCollection", + className: "LogsConfiguration", modelProperties: { - value: { - serializedName: "value", - required: true, + destinations: { + serializedName: "destinations", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Revision" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + } + } + } +}; + +export const MetricsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MetricsConfiguration", + modelProperties: { + destinations: { + serializedName: "destinations", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ReplicaContainer: coreClient.CompositeMapper = { +export const WorkloadProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaContainer", + className: "WorkloadProfile", modelProperties: { name: { serializedName: "name", + required: true, type: { name: "String" } }, - containerId: { - serializedName: "containerId", + workloadProfileType: { + serializedName: "workloadProfileType", + required: true, type: { name: "String" } }, - ready: { - serializedName: "ready", - type: { - name: "Boolean" - } - }, - started: { - serializedName: "started", + minimumCount: { + serializedName: "minimumCount", type: { - name: "Boolean" + name: "Number" } }, - restartCount: { - serializedName: "restartCount", + maximumCount: { + serializedName: "maximumCount", type: { name: "Number" } - }, - logStreamEndpoint: { - serializedName: "logStreamEndpoint", + } + } + } +}; + +export const KedaConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KedaConfiguration", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { name: "String" } - }, - execEndpoint: { - serializedName: "execEndpoint", + } + } + } +}; + +export const DaprConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DaprConfiguration", + modelProperties: { + version: { + serializedName: "version", readOnly: true, type: { - name: "String" + name: "String" + } + } + } + } +}; + +export const ManagedEnvironmentPropertiesPeerAuthentication: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication", + modelProperties: { + mtls: { + serializedName: "mtls", + type: { + name: "Composite", + className: "Mtls" } } } } }; -export const ReplicaCollection: coreClient.CompositeMapper = { +export const Mtls: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicaCollection", + className: "Mtls", modelProperties: { - value: { - serializedName: "value", - required: true, + enabled: { + serializedName: "enabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Replica" - } - } + name: "Boolean" } } } } }; -export const DiagnosticsCollection: coreClient.CompositeMapper = { +export const AvailableOperations: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsCollection", + className: "AvailableOperations", modelProperties: { value: { serializedName: "value", - required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Diagnostics" + className: "OperationDetail" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, type: { name: "String" } @@ -3981,314 +4615,372 @@ export const DiagnosticsCollection: coreClient.CompositeMapper = { } }; -export const DiagnosticsProperties: coreClient.CompositeMapper = { +export const OperationDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsProperties", + className: "OperationDetail", modelProperties: { - metadata: { - serializedName: "metadata", + name: { + serializedName: "name", type: { - name: "Composite", - className: "DiagnosticsDefinition" + name: "String" } }, - dataset: { - serializedName: "dataset", + isDataAction: { + serializedName: "isDataAction", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticsDataApiResponse" - } - } + name: "Boolean" } }, - status: { - serializedName: "status", + display: { + serializedName: "display", type: { name: "Composite", - className: "DiagnosticsStatus" + className: "OperationDisplay" } }, - dataProviderMetadata: { - serializedName: "dataProviderMetadata", + origin: { + serializedName: "origin", type: { - name: "Composite", - className: "DiagnosticDataProviderMetadata" + name: "String" } } } } }; -export const DiagnosticsDefinition: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDefinition", + className: "OperationDisplay", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, + provider: { + serializedName: "provider", type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, + resource: { + serializedName: "resource", type: { name: "String" } }, - author: { - serializedName: "author", - readOnly: true, + operation: { + serializedName: "operation", type: { name: "String" } }, - category: { - serializedName: "category", - readOnly: true, + description: { + serializedName: "description", type: { name: "String" } - }, - supportTopicList: { - serializedName: "supportTopicList", + } + } + } +}; + +export const JobsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticSupportTopic" + className: "Job" } } } }, - analysisTypes: { - serializedName: "analysisTypes", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobConfiguration", + modelProperties: { + secrets: { + serializedName: "secrets", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Secret" } } } }, - type: { - serializedName: "type", - readOnly: true, + triggerType: { + defaultValue: "Manual", + serializedName: "triggerType", + required: true, type: { name: "String" } }, - score: { - serializedName: "score", - readOnly: true, + replicaTimeout: { + serializedName: "replicaTimeout", + required: true, type: { name: "Number" } - } - } - } -}; - -export const DiagnosticSupportTopic: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DiagnosticSupportTopic", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, + }, + replicaRetryLimit: { + serializedName: "replicaRetryLimit", type: { - name: "String" + name: "Number" } }, - pesId: { - serializedName: "pesId", - readOnly: true, + manualTriggerConfig: { + serializedName: "manualTriggerConfig", type: { - name: "String" + 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" + } + } } } } } }; -export const DiagnosticsDataApiResponse: coreClient.CompositeMapper = { +export const JobConfigurationManualTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsDataApiResponse", + className: "JobConfigurationManualTriggerConfig", modelProperties: { - table: { - serializedName: "table", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "Composite", - className: "DiagnosticDataTableResponseObject" + name: "Number" } }, - renderingProperties: { - serializedName: "renderingProperties", + parallelism: { + serializedName: "parallelism", type: { - name: "Composite", - className: "DiagnosticRendering" + name: "Number" } } } } }; -export const DiagnosticDataTableResponseObject: coreClient.CompositeMapper = { +export const JobConfigurationScheduleTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseObject", + className: "JobConfigurationScheduleTriggerConfig", modelProperties: { - tableName: { - serializedName: "tableName", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - columns: { - serializedName: "columns", + cronExpression: { + serializedName: "cronExpression", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DiagnosticDataTableResponseColumn" - } - } + name: "String" } }, - rows: { - serializedName: "rows", + parallelism: { + serializedName: "parallelism", type: { - name: "Sequence", - element: { - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - } + name: "Number" } } } } }; -export const DiagnosticDataTableResponseColumn: coreClient.CompositeMapper = { +export const JobConfigurationEventTriggerConfig: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataTableResponseColumn", + className: "JobConfigurationEventTriggerConfig", modelProperties: { - columnName: { - serializedName: "columnName", + replicaCompletionCount: { + serializedName: "replicaCompletionCount", type: { - name: "String" + name: "Number" } }, - dataType: { - serializedName: "dataType", + parallelism: { + serializedName: "parallelism", type: { - name: "String" + name: "Number" } }, - columnType: { - serializedName: "columnType", + scale: { + serializedName: "scale", type: { - name: "String" + name: "Composite", + className: "JobScale" } } } } }; -export const DiagnosticRendering: coreClient.CompositeMapper = { +export const JobScale: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticRendering", + className: "JobScale", modelProperties: { - type: { - serializedName: "type", + pollingInterval: { + serializedName: "pollingInterval", type: { name: "Number" } }, - title: { - serializedName: "title", + minExecutions: { + defaultValue: 0, + serializedName: "minExecutions", type: { - name: "String" + name: "Number" } }, - description: { - serializedName: "description", + maxExecutions: { + defaultValue: 100, + serializedName: "maxExecutions", type: { - name: "String" + name: "Number" } }, - isVisible: { - serializedName: "isVisible", + rules: { + serializedName: "rules", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobScaleRule" + } + } } } } } }; -export const DiagnosticsStatus: coreClient.CompositeMapper = { +export const JobScaleRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticsStatus", + className: "JobScaleRule", modelProperties: { - message: { - serializedName: "message", + name: { + serializedName: "name", type: { name: "String" } }, - statusId: { - serializedName: "statusId", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" + } + }, + metadata: { + serializedName: "metadata", + type: { + name: "Dictionary", + value: { type: { name: "any" } } + } + }, + auth: { + serializedName: "auth", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScaleRuleAuth" + } + } } } } } }; -export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { +export const JobTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadata", + className: "JobTemplate", modelProperties: { - providerName: { - serializedName: "providerName", + initContainers: { + serializedName: "initContainers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InitContainer" + } + } } }, - propertyBag: { - serializedName: "propertyBag", + containers: { + serializedName: "containers", type: { name: "Sequence", element: { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem" + className: "Container" + } + } + } + }, + volumes: { + serializedName: "volumes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Volume" } } } @@ -4297,58 +4989,74 @@ export const DiagnosticDataProviderMetadata: coreClient.CompositeMapper = { } }; -export const DiagnosticDataProviderMetadataPropertyBagItem: coreClient.CompositeMapper = { +export const JobPatchProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DiagnosticDataProviderMetadataPropertyBagItem", + className: "JobPatchProperties", modelProperties: { - name: { - serializedName: "name", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "ManagedServiceIdentity" } }, - value: { - serializedName: "value", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "JobPatchPropertiesProperties" } } } } }; -export const VnetConfiguration: coreClient.CompositeMapper = { +export const JobPatchPropertiesProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VnetConfiguration", + className: "JobPatchPropertiesProperties", modelProperties: { - internal: { - serializedName: "internal", + environmentId: { + serializedName: "environmentId", type: { - name: "Boolean" + name: "String" } }, - infrastructureSubnetId: { - serializedName: "infrastructureSubnetId", + configuration: { + serializedName: "configuration", type: { - name: "String" + name: "Composite", + className: "JobConfiguration" } }, - dockerBridgeCidr: { - serializedName: "dockerBridgeCidr", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobTemplate" } }, - platformReservedCidr: { - serializedName: "platformReservedCidr", + outboundIpAddresses: { + serializedName: "outboundIpAddresses", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - platformReservedDnsIP: { - serializedName: "platformReservedDnsIP", + eventStreamEndpoint: { + serializedName: "eventStreamEndpoint", type: { name: "String" } @@ -4357,108 +5065,114 @@ export const VnetConfiguration: coreClient.CompositeMapper = { } }; -export const AppLogsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionTemplate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AppLogsConfiguration", + className: "JobExecutionTemplate", modelProperties: { - destination: { - serializedName: "destination", + containers: { + serializedName: "containers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } }, - logAnalyticsConfiguration: { - serializedName: "logAnalyticsConfiguration", + initContainers: { + serializedName: "initContainers", type: { - name: "Composite", - className: "LogAnalyticsConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionContainer" + } + } } } } } }; -export const LogAnalyticsConfiguration: coreClient.CompositeMapper = { +export const JobExecutionContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogAnalyticsConfiguration", + className: "JobExecutionContainer", modelProperties: { - customerId: { - serializedName: "customerId", + image: { + serializedName: "image", type: { name: "String" } }, - sharedKey: { - serializedName: "sharedKey", - type: { - name: "String" - } - } - } - } -}; - -export const WorkloadProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkloadProfile", - modelProperties: { name: { serializedName: "name", - required: true, type: { name: "String" } }, - workloadProfileType: { - serializedName: "workloadProfileType", - required: true, + command: { + serializedName: "command", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - minimumCount: { - serializedName: "minimumCount", + args: { + serializedName: "args", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + env: { + serializedName: "env", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EnvironmentVar" + } + } } }, - maximumCount: { - serializedName: "maximumCount", + resources: { + serializedName: "resources", type: { - name: "Number" + name: "Composite", + className: "ContainerResources" } } } } }; -export const KedaConfiguration: coreClient.CompositeMapper = { +export const JobExecutionBase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KedaConfiguration", + className: "JobExecutionBase", modelProperties: { - version: { - serializedName: "version", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } - } - } - } -}; - -export const DaprConfiguration: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DaprConfiguration", - modelProperties: { - version: { - serializedName: "version", - readOnly: true, + }, + id: { + serializedName: "id", type: { name: "String" } @@ -4467,25 +5181,27 @@ export const DaprConfiguration: coreClient.CompositeMapper = { } }; -export const AvailableOperations: coreClient.CompositeMapper = { +export const ContainerAppJobExecutions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableOperations", + className: "ContainerAppJobExecutions", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationDetail" + className: "JobExecution" } } } }, nextLink: { serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -4494,10 +5210,10 @@ export const AvailableOperations: coreClient.CompositeMapper = { } }; -export const OperationDetail: coreClient.CompositeMapper = { +export const JobExecution: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDetail", + className: "JobExecution", modelProperties: { name: { serializedName: "name", @@ -4505,56 +5221,64 @@ export const OperationDetail: coreClient.CompositeMapper = { name: "String" } }, - isDataAction: { - serializedName: "isDataAction", + id: { + serializedName: "id", type: { - name: "Boolean" + name: "String" } }, - display: { - serializedName: "display", + type: { + serializedName: "type", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } }, - origin: { - serializedName: "origin", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationDisplay", - modelProperties: { - provider: { - serializedName: "provider", + }, + startTime: { + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - resource: { - serializedName: "resource", + endTime: { + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - operation: { - serializedName: "operation", + template: { + serializedName: "template", type: { - name: "String" + name: "Composite", + className: "JobExecutionTemplate" } - }, - description: { - serializedName: "description", + } + } + } +}; + +export const JobSecretsCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobSecretsCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Secret" + } + } } } } @@ -4825,6 +5549,12 @@ export const GithubActionConfiguration: coreClient.CompositeMapper = { name: "String" } }, + githubPersonalAccessToken: { + serializedName: "githubPersonalAccessToken", + type: { + name: "String" + } + }, image: { serializedName: "image", type: { @@ -4909,6 +5639,12 @@ export const AzureCredentials: coreClient.CompositeMapper = { name: "String" } }, + kind: { + serializedName: "kind", + type: { + name: "String" + } + }, subscriptionId: { serializedName: "subscriptionId", type: { @@ -4919,6 +5655,28 @@ export const AzureCredentials: coreClient.CompositeMapper = { } }; +export const JobExecutionNamesCollection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionNamesCollection", + modelProperties: { + value: { + serializedName: "value", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecutionBase" + } + } + } + } + } + } +}; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5076,6 +5834,51 @@ export const BillingMeter: coreClient.CompositeMapper = { } }; +export const BuildResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + buildStatus: { + serializedName: "properties.buildStatus", + readOnly: true, + type: { + name: "String" + } + }, + destinationContainerRegistry: { + serializedName: "properties.destinationContainerRegistry", + type: { + name: "Composite", + className: "ContainerRegistryWithCustomImage" + } + }, + configuration: { + serializedName: "properties.configuration", + type: { + name: "Composite", + className: "BuildConfiguration" + } + }, + uploadEndpoint: { + serializedName: "properties.uploadEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const DaprComponent: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5244,6 +6047,13 @@ export const Revision: coreClient.CompositeMapper = { type: { name: "String" } + }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } } } } @@ -5262,6 +6072,20 @@ export const Replica: coreClient.CompositeMapper = { name: "DateTime" } }, + runningState: { + serializedName: "properties.runningState", + readOnly: true, + type: { + name: "String" + } + }, + runningStateDetails: { + serializedName: "properties.runningStateDetails", + readOnly: true, + type: { + name: "String" + } + }, containers: { serializedName: "properties.containers", type: { @@ -5273,6 +6097,18 @@ export const Replica: coreClient.CompositeMapper = { } } } + }, + initContainers: { + serializedName: "properties.initContainers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicaContainer" + } + } + } } } } @@ -5342,23 +6178,79 @@ export const SourceControl: coreClient.CompositeMapper = { name: "String" } }, - repoUrl: { - serializedName: "properties.repoUrl", + repoUrl: { + serializedName: "properties.repoUrl", + type: { + name: "String" + } + }, + branch: { + serializedName: "properties.branch", + type: { + name: "String" + } + }, + githubActionConfiguration: { + serializedName: "properties.githubActionConfiguration", + type: { + name: "Composite", + className: "GithubActionConfiguration" + } + } + } + } +}; + +export const BuilderResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuilderResource", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + buildComputeId: { + serializedName: "properties.buildComputeId", + readOnly: true, type: { name: "String" } }, - branch: { - serializedName: "properties.branch", + patchComputeId: { + serializedName: "properties.patchComputeId", + readOnly: true, type: { name: "String" } }, - githubActionConfiguration: { - serializedName: "properties.githubActionConfiguration", + containerRegistries: { + serializedName: "properties.containerRegistries", type: { - name: "Composite", - className: "GithubActionConfiguration" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ContainerRegistry" + } + } } } } @@ -5579,75 +6471,6 @@ export const ContainerAppAuthToken: coreClient.CompositeMapper = { } }; -export const Job: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Job", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - environmentId: { - serializedName: "properties.environmentId", - type: { - name: "String" - } - }, - workloadProfileName: { - serializedName: "properties.workloadProfileName", - 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, - type: { - name: "String" - } - } - } - } -}; - export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5714,6 +6537,20 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { 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: { @@ -5765,6 +6602,82 @@ export const ManagedEnvironment: coreClient.CompositeMapper = { type: { name: "String" } + }, + peerAuthentication: { + serializedName: "properties.peerAuthentication", + type: { + name: "Composite", + className: "ManagedEnvironmentPropertiesPeerAuthentication" + } + } + } + } +}; + +export const Job: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Job", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + environmentId: { + serializedName: "properties.environmentId", + type: { + name: "String" + } + }, + workloadProfileName: { + serializedName: "properties.workloadProfileName", + 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, + type: { + name: "String" + } } } } @@ -5811,6 +6724,81 @@ export const EnvironmentAuthToken: coreClient.CompositeMapper = { } }; +export const BuildersCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const BuildersUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BuildersUpdateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + 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", @@ -5856,6 +6844,36 @@ export const ContainerAppsUpdateHeaders: coreClient.CompositeMapper = { } }; +export const ContainerAppsStartHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStartHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ContainerAppsStopHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContainerAppsStopHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + export const JobsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts index d7bcee45d281..00942e7d3148 100644 --- a/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts +++ b/sdk/appcontainers/arm-appcontainers/src/models/parameters.ts @@ -13,6 +13,9 @@ import { } from "@azure/core-client"; import { AuthConfig as AuthConfigMapper, + BuilderResource as BuilderResourceMapper, + BuilderResourceUpdate as BuilderResourceUpdateMapper, + BuildResource as BuildResourceMapper, ConnectedEnvironment as ConnectedEnvironmentMapper, CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, Certificate as CertificateMapper, @@ -23,7 +26,6 @@ import { Job as JobMapper, JobPatchProperties as JobPatchPropertiesMapper, JobExecutionTemplate as JobExecutionTemplateMapper, - JobExecutionNamesCollection as JobExecutionNamesCollectionMapper, ManagedEnvironment as ManagedEnvironmentMapper, ManagedCertificate as ManagedCertificateMapper, ManagedCertificatePatch as ManagedCertificatePatchMapper, @@ -98,7 +100,7 @@ export const containerAppName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-11-01-preview", + defaultValue: "2023-05-02-preview", isConstant: true, serializedName: "api-version", type: { @@ -161,6 +163,53 @@ export const location: OperationURLParameter = { } }; +export const builderName: OperationURLParameter = { + parameterPath: "builderName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"), + MaxLength: 32, + MinLength: 2 + }, + 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" + } + } +}; + +export const buildEnvelope: OperationParameter = { + parameterPath: "buildEnvelope", + mapper: BuildResourceMapper +}; + export const connectedEnvironmentName: OperationURLParameter = { parameterPath: "connectedEnvironmentName", mapper: { @@ -250,53 +299,13 @@ export const customHostname: OperationQueryParameter = { } }; -export const jobName: OperationURLParameter = { - parameterPath: "jobName", - mapper: { - constraints: { - Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") - }, - serializedName: "jobName", - required: true, - type: { - name: "String" - } - } -}; - -export const jobEnvelope: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobMapper -}; - -export const jobName1: OperationURLParameter = { - parameterPath: "jobName", - mapper: { - serializedName: "jobName", - required: true, - type: { - name: "String" - } - } -}; - -export const jobEnvelope1: OperationParameter = { - parameterPath: "jobEnvelope", - mapper: JobPatchPropertiesMapper -}; - -export const template: OperationParameter = { - parameterPath: "template", - mapper: JobExecutionTemplateMapper -}; - -export const jobExecutionName: OperationURLParameter = { - parameterPath: "jobExecutionName", +export const containerAppName1: OperationURLParameter = { + parameterPath: "containerAppName", mapper: { constraints: { Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") }, - serializedName: "jobExecutionName", + serializedName: "containerAppName", required: true, type: { name: "String" @@ -304,11 +313,6 @@ export const jobExecutionName: OperationURLParameter = { } }; -export const jobExecutionName1: OperationParameter = { - parameterPath: "jobExecutionName", - mapper: JobExecutionNamesCollectionMapper -}; - export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { @@ -363,6 +367,49 @@ export const environmentName: OperationURLParameter = { } }; +export const jobName: OperationURLParameter = { + parameterPath: "jobName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobName", + required: true, + type: { + name: "String" + } + } +}; + +export const jobEnvelope: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobMapper +}; + +export const jobEnvelope1: OperationParameter = { + parameterPath: "jobEnvelope", + mapper: JobPatchPropertiesMapper +}; + +export const template: OperationParameter = { + parameterPath: "template", + mapper: JobExecutionTemplateMapper +}; + +export const jobExecutionName: OperationURLParameter = { + parameterPath: "jobExecutionName", + mapper: { + constraints: { + Pattern: new RegExp("^[-\\w\\._\\(\\)]+$") + }, + serializedName: "jobExecutionName", + required: true, + type: { + name: "String" + } + } +}; + export const environmentEnvelope1: OperationParameter = { parameterPath: "environmentEnvelope", mapper: ManagedEnvironmentMapper 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..1417cbd4f37b --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builders.ts @@ -0,0 +1,719 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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, + 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, void>> { + 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>(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.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + 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.DefaultErrorResponse + } + }, + requestBody: Parameters.builderEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + 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..091e4ad538f4 --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operations/builds.ts @@ -0,0 +1,508 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { 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 { + BuildResource, + BuildsListByBuilderResourceNextOptionalParams, + BuildsListByBuilderResourceOptionalParams, + BuildsListByBuilderResourceResponse, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams, + BuildsListByBuilderResourceNextResponse +} 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; + } + + /** + * 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 listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByBuilderResourcePagingAll( + 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.listByBuilderResourcePagingPage( + resourceGroupName, + builderName, + options, + settings + ); + } + }; + } + + private async *listByBuilderResourcePagingPage( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: BuildsListByBuilderResourceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByBuilderResource( + resourceGroupName, + builderName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByBuilderResourceNext( + resourceGroupName, + builderName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBuilderResourcePagingAll( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByBuilderResourcePagingPage( + 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 _listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, options }, + listByBuilderResourceOperationSpec + ); + } + + /** + * 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, void>> { + 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>(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(); + } + + /** + * ListByBuilderResourceNext + * @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 ListByBuilderResource method. + * @param options The options parameters. + */ + private _listByBuilderResourceNext( + resourceGroupName: string, + builderName: string, + nextLink: string, + options?: BuildsListByBuilderResourceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, builderName, nextLink, options }, + listByBuilderResourceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByBuilderResourceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; +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.DefaultErrorResponse + } + }, + 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.DefaultErrorResponse + } + }, + requestBody: Parameters.buildEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.builderName, + Parameters.buildName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByBuilderResourceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BuildCollection + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.builderName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts index 0293fbdf4e9c..282fdf98cfa7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/containerApps.ts @@ -40,6 +40,10 @@ import { ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStartResponse, + ContainerAppsStopOptionalParams, + ContainerAppsStopResponse, ContainerAppsListBySubscriptionNextResponse, ContainerAppsListByResourceGroupNextResponse } from "../models"; @@ -560,6 +564,188 @@ export class ContainerAppsImpl implements ContainerApps { ); } + /** + * Start a 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. + */ + async beginStart( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStartResponse + > + > { + 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, options }, + spec: startOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsStartResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Start a 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. + */ + async beginStartAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise { + const poller = await this.beginStart( + resourceGroupName, + containerAppName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Stop a 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. + */ + async beginStop( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStopResponse + > + > { + 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, options }, + spec: stopOperationSpec + }); + const poller = await createHttpPoller< + ContainerAppsStopResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Stop a 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. + */ + async beginStopAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + containerAppName, + options + ); + return poller.pollUntilDone(); + } + /** * ListBySubscriptionNext * @param nextLink The nextLink from the previous successful call to the ListBySubscription method. @@ -815,6 +1001,68 @@ const getAuthTokenOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ContainerApp + }, + 201: { + bodyMapper: Mappers.ContainerApp + }, + 202: { + bodyMapper: Mappers.ContainerApp + }, + 204: { + bodyMapper: Mappers.ContainerApp + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.containerAppName1 + ], + headerParameters: [Parameters.accept], + serializer +}; const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts index 7a650950fdbc..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/index.ts @@ -9,19 +9,21 @@ export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts index 6e20e44af0c2..5b5d12252c34 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobs.ts @@ -39,7 +39,6 @@ import { JobsStartOptionalParams, JobsStartResponse, JobsStopExecutionOptionalParams, - JobExecutionNamesCollection, JobsStopMultipleExecutionsOptionalParams, JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, @@ -215,7 +214,7 @@ export class JobsImpl implements Jobs { /** * Get the properties of a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ get( @@ -232,7 +231,7 @@ export class JobsImpl implements Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -306,7 +305,7 @@ export class JobsImpl implements Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -328,7 +327,7 @@ export class JobsImpl implements Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ async beginDelete( @@ -392,7 +391,7 @@ export class JobsImpl implements Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ async beginDeleteAndWait( @@ -407,7 +406,7 @@ export class JobsImpl implements Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -477,7 +476,7 @@ export class JobsImpl implements Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -499,7 +498,7 @@ export class JobsImpl implements Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param template Properties used to start a job instance. * @param options The options parameters. */ @@ -570,7 +569,7 @@ export class JobsImpl implements Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param template Properties used to start a job instance. * @param options The options parameters. */ @@ -592,7 +591,7 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -658,7 +657,7 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -680,14 +679,12 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ async beginStopMultipleExecutions( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise< SimplePollerLike< @@ -736,7 +733,7 @@ export class JobsImpl implements Jobs { const lro = createLroSpec({ sendOperationFn, - args: { resourceGroupName, jobName, jobExecutionName, options }, + args: { resourceGroupName, jobName, options }, spec: stopMultipleExecutionsOperationSpec }); const poller = await createHttpPoller< @@ -754,20 +751,17 @@ export class JobsImpl implements Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ async beginStopMultipleExecutionsAndWait( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise { const poller = await this.beginStopMultipleExecutions( resourceGroupName, jobName, - jobExecutionName, options ); return poller.pollUntilDone(); @@ -776,7 +770,7 @@ export class JobsImpl implements Jobs { /** * List secrets for a container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ listSecrets( @@ -911,7 +905,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -935,7 +929,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept], serializer @@ -967,7 +961,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.jobName1 + Parameters.jobName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1051,7 +1045,6 @@ const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DefaultErrorResponse } }, - requestBody: Parameters.jobExecutionName1, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, @@ -1059,8 +1052,7 @@ const stopMultipleExecutionsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.jobName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const listSecretsOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts index 46b05e90c511..fe4e4e00a8d9 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operations/jobsExecutions.ts @@ -37,7 +37,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ public list( @@ -113,7 +113,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ private _list( @@ -130,7 +130,7 @@ export class JobsExecutionsImpl implements JobsExecutions { /** * ListNext * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ 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..a51aa8373e5d --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builders.ts @@ -0,0 +1,139 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 +} 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, void>>; + /** + * 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..5dbf100a312f --- /dev/null +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/builds.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + BuildResource, + BuildsListByBuilderResourceOptionalParams, + BuildsGetOptionalParams, + BuildsGetResponse, + BuildsCreateOrUpdateOptionalParams, + BuildsCreateOrUpdateResponse, + BuildsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Builds. */ +export interface Builds { + /** + * 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. + */ + listByBuilderResource( + resourceGroupName: string, + builderName: string, + options?: BuildsListByBuilderResourceOptionalParams + ): PagedAsyncIterableIterator; + /** + * 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, void>>; + /** + * 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/containerApps.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts index fa70e90ca85c..3cf4b242883e 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/containerApps.ts @@ -24,7 +24,11 @@ import { ContainerAppsListSecretsOptionalParams, ContainerAppsListSecretsResponse, ContainerAppsGetAuthTokenOptionalParams, - ContainerAppsGetAuthTokenResponse + ContainerAppsGetAuthTokenResponse, + ContainerAppsStartOptionalParams, + ContainerAppsStartResponse, + ContainerAppsStopOptionalParams, + ContainerAppsStopResponse } from "../models"; /// @@ -174,4 +178,58 @@ export interface ContainerApps { containerAppName: string, options?: ContainerAppsGetAuthTokenOptionalParams ): Promise; + /** + * Start a 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. + */ + beginStart( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStartResponse + > + >; + /** + * Start a 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. + */ + beginStartAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStartOptionalParams + ): Promise; + /** + * Stop a 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. + */ + beginStop( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ContainerAppsStopResponse + > + >; + /** + * Stop a 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. + */ + beginStopAndWait( + resourceGroupName: string, + containerAppName: string, + options?: ContainerAppsStopOptionalParams + ): Promise; } diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts index 7a650950fdbc..2cf675e30017 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/index.ts @@ -9,19 +9,21 @@ export * from "./containerAppsAuthConfigs"; export * from "./availableWorkloadProfiles"; export * from "./billingMeters"; +export * from "./builders"; +export * from "./builds"; export * from "./connectedEnvironments"; export * from "./connectedEnvironmentsCertificates"; export * from "./connectedEnvironmentsDaprComponents"; export * from "./connectedEnvironmentsStorages"; export * from "./containerApps"; -export * from "./jobs"; -export * from "./jobsExecutions"; export * from "./containerAppsRevisions"; export * from "./containerAppsRevisionReplicas"; export * from "./containerAppsDiagnostics"; export * from "./managedEnvironmentDiagnostics"; export * from "./managedEnvironmentsDiagnostics"; export * from "./operations"; +export * from "./jobs"; +export * from "./jobsExecutions"; export * from "./managedEnvironments"; export * from "./certificates"; export * from "./managedCertificates"; diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts index 2540edf36f78..3ca9e17927c7 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobs.ts @@ -24,7 +24,6 @@ import { JobsStartOptionalParams, JobsStartResponse, JobsStopExecutionOptionalParams, - JobExecutionNamesCollection, JobsStopMultipleExecutionsOptionalParams, JobsStopMultipleExecutionsResponse, JobsListSecretsOptionalParams, @@ -53,7 +52,7 @@ export interface Jobs { /** * Get the properties of a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ get( @@ -64,7 +63,7 @@ export interface Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -82,7 +81,7 @@ export interface Jobs { /** * Create or Update a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -95,7 +94,7 @@ export interface Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ beginDelete( @@ -106,7 +105,7 @@ export interface Jobs { /** * Delete a Container Apps Job. * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ beginDeleteAndWait( @@ -117,7 +116,7 @@ export interface Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -132,7 +131,7 @@ export interface Jobs { /** * Patches a Container Apps Job using JSON Merge Patch * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobEnvelope Properties used to create a container apps job * @param options The options parameters. */ @@ -145,7 +144,7 @@ export interface Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param template Properties used to start a job instance. * @param options The options parameters. */ @@ -160,7 +159,7 @@ export interface Jobs { /** * Start a Container Apps Job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param template Properties used to start a job instance. * @param options The options parameters. */ @@ -173,7 +172,7 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -186,7 +185,7 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param jobExecutionName Job execution name. * @param options The options parameters. */ @@ -199,14 +198,12 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ beginStopMultipleExecutions( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise< SimplePollerLike< @@ -217,20 +214,18 @@ export interface Jobs { /** * Terminates execution of a running container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. - * @param jobExecutionName List of all job executions that should be stopped. + * @param jobName Job Name * @param options The options parameters. */ beginStopMultipleExecutionsAndWait( resourceGroupName: string, jobName: string, - jobExecutionName: JobExecutionNamesCollection, options?: JobsStopMultipleExecutionsOptionalParams ): Promise; /** * List secrets for a container apps job * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ listSecrets( diff --git a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts index ba8d707255f1..9da5d6ea33fb 100644 --- a/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts +++ b/sdk/appcontainers/arm-appcontainers/src/operationsInterfaces/jobsExecutions.ts @@ -15,7 +15,7 @@ export interface JobsExecutions { /** * Get a Container Apps Job's executions * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Container Apps Job. + * @param jobName Job Name * @param options The options parameters. */ list( 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 a9454b0124aa..000000000000 --- a/sdk/appcontainers/arm-appcontainers/test/appcontainers_examples.spec.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the 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 = { - 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 -}; - -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("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); - 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); - 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..25aeb3ebcc36 --- /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"