diff --git a/sdk/containerregistry/arm-containerregistry/CHANGELOG.md b/sdk/containerregistry/arm-containerregistry/CHANGELOG.md index 996c25de15f3..c52c6db394ae 100644 --- a/sdk/containerregistry/arm-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/arm-containerregistry/CHANGELOG.md @@ -1,20 +1,12 @@ # Release History - -## 10.1.0-beta.5 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - -## 10.1.0-beta.4 (2022-11-18) + +## 11.0.0-beta.1 (2023-01-12) **Features** + - Added operation group CacheRules - Added operation group ConnectedRegistries + - Added operation group CredentialSets - Added operation group ExportPipelines - Added operation group ImportPipelines - Added operation group PipelineRuns @@ -25,17 +17,47 @@ - Added Interface ActivationProperties - Added Interface ActiveDirectoryObject - Added Interface AgentPool + - Added Interface AuthCredential - Added Interface AzureADAuthenticationAsArmPolicy + - Added Interface CacheRule + - Added Interface CacheRulesCreateHeaders + - Added Interface CacheRulesCreateOptionalParams + - Added Interface CacheRulesDeleteHeaders + - Added Interface CacheRulesDeleteOptionalParams + - Added Interface CacheRulesGetOptionalParams + - Added Interface CacheRulesListNextOptionalParams + - Added Interface CacheRulesListOptionalParams + - Added Interface CacheRulesListResult + - Added Interface CacheRulesUpdateHeaders + - Added Interface CacheRulesUpdateOptionalParams + - Added Interface CacheRuleUpdateParameters + - Added Interface ConnectedRegistriesCreateHeaders - Added Interface ConnectedRegistriesCreateOptionalParams + - Added Interface ConnectedRegistriesDeactivateHeaders - Added Interface ConnectedRegistriesDeactivateOptionalParams + - Added Interface ConnectedRegistriesDeleteHeaders - Added Interface ConnectedRegistriesDeleteOptionalParams - Added Interface ConnectedRegistriesGetOptionalParams - Added Interface ConnectedRegistriesListNextOptionalParams - Added Interface ConnectedRegistriesListOptionalParams + - Added Interface ConnectedRegistriesUpdateHeaders - Added Interface ConnectedRegistriesUpdateOptionalParams - Added Interface ConnectedRegistry - Added Interface ConnectedRegistryListResult - Added Interface ConnectedRegistryUpdateParameters + - Added Interface CredentialHealth + - Added Interface CredentialSet + - Added Interface CredentialSetListResult + - Added Interface CredentialSetsCreateHeaders + - Added Interface CredentialSetsCreateOptionalParams + - Added Interface CredentialSetsDeleteHeaders + - Added Interface CredentialSetsDeleteOptionalParams + - Added Interface CredentialSetsGetOptionalParams + - Added Interface CredentialSetsListNextOptionalParams + - Added Interface CredentialSetsListOptionalParams + - Added Interface CredentialSetsUpdateHeaders + - Added Interface CredentialSetsUpdateOptionalParams + - Added Interface CredentialSetUpdateParameters - Added Interface DockerBuildRequest - Added Interface DockerBuildStep - Added Interface DockerBuildStepUpdateParameters @@ -45,7 +67,9 @@ - Added Interface Event_2 - Added Interface ExportPipeline - Added Interface ExportPipelineListResult + - Added Interface ExportPipelinesCreateHeaders - Added Interface ExportPipelinesCreateOptionalParams + - Added Interface ExportPipelinesDeleteHeaders - Added Interface ExportPipelinesDeleteOptionalParams - Added Interface ExportPipelinesGetOptionalParams - Added Interface ExportPipelinesListNextOptionalParams @@ -58,7 +82,9 @@ - Added Interface GenerateCredentialsResult - Added Interface ImportPipeline - Added Interface ImportPipelineListResult + - Added Interface ImportPipelinesCreateHeaders - Added Interface ImportPipelinesCreateOptionalParams + - Added Interface ImportPipelinesDeleteHeaders - Added Interface ImportPipelinesDeleteOptionalParams - Added Interface ImportPipelinesGetOptionalParams - Added Interface ImportPipelinesListNextOptionalParams @@ -71,7 +97,9 @@ - Added Interface PipelineRunListResult - Added Interface PipelineRunRequest - Added Interface PipelineRunResponse + - Added Interface PipelineRunsCreateHeaders - Added Interface PipelineRunsCreateOptionalParams + - Added Interface PipelineRunsDeleteHeaders - Added Interface PipelineRunsDeleteOptionalParams - Added Interface PipelineRunsGetOptionalParams - Added Interface PipelineRunsListNextOptionalParams @@ -83,18 +111,31 @@ - Added Interface PipelineTriggerDescriptor - Added Interface PipelineTriggerProperties - Added Interface PrivateEndpointConnection + - Added Interface PrivateEndpointConnectionsCreateOrUpdateHeaders + - Added Interface PrivateEndpointConnectionsDeleteHeaders - Added Interface ProgressProperties + - Added Interface RegistriesCreateHeaders + - Added Interface RegistriesDeleteHeaders + - Added Interface RegistriesGenerateCredentialsHeaders - Added Interface RegistriesGenerateCredentialsOptionalParams + - Added Interface RegistriesImportImageHeaders + - Added Interface RegistriesUpdateHeaders - Added Interface Registry - Added Interface Replication + - Added Interface ReplicationsCreateHeaders + - Added Interface ReplicationsDeleteHeaders + - Added Interface ReplicationsUpdateHeaders - Added Interface Run - Added Interface ScopeMap - Added Interface ScopeMapListResult + - Added Interface ScopeMapsCreateHeaders - Added Interface ScopeMapsCreateOptionalParams + - Added Interface ScopeMapsDeleteHeaders - Added Interface ScopeMapsDeleteOptionalParams - Added Interface ScopeMapsGetOptionalParams - Added Interface ScopeMapsListNextOptionalParams - Added Interface ScopeMapsListOptionalParams + - Added Interface ScopeMapsUpdateHeaders - Added Interface ScopeMapsUpdateOptionalParams - Added Interface ScopeMapUpdateParameters - Added Interface SoftDeletePolicy @@ -111,17 +152,28 @@ - Added Interface TokenCredentialsProperties - Added Interface TokenListResult - Added Interface TokenPassword + - Added Interface TokensCreateHeaders - Added Interface TokensCreateOptionalParams + - Added Interface TokensDeleteHeaders - Added Interface TokensDeleteOptionalParams - Added Interface TokensGetOptionalParams - Added Interface TokensListNextOptionalParams - Added Interface TokensListOptionalParams + - Added Interface TokensUpdateHeaders - Added Interface TokensUpdateOptionalParams - Added Interface TokenUpdateParameters - Added Interface Webhook + - Added Interface WebhooksCreateHeaders + - Added Interface WebhooksDeleteHeaders + - Added Interface WebhooksUpdateHeaders - Added Type Alias ActivationStatus - Added Type Alias AuditLogStatus - Added Type Alias AzureADAuthenticationAsArmPolicyStatus + - Added Type Alias CacheRulesCreateResponse + - Added Type Alias CacheRulesGetResponse + - Added Type Alias CacheRulesListNextResponse + - Added Type Alias CacheRulesListResponse + - Added Type Alias CacheRulesUpdateResponse - Added Type Alias CertificateType - Added Type Alias ConnectedRegistriesCreateResponse - Added Type Alias ConnectedRegistriesGetResponse @@ -130,6 +182,13 @@ - Added Type Alias ConnectedRegistriesUpdateResponse - Added Type Alias ConnectedRegistryMode - Added Type Alias ConnectionState + - Added Type Alias CredentialHealthStatus + - Added Type Alias CredentialName + - Added Type Alias CredentialSetsCreateResponse + - Added Type Alias CredentialSetsGetResponse + - Added Type Alias CredentialSetsListNextResponse + - Added Type Alias CredentialSetsListResponse + - Added Type Alias CredentialSetsUpdateResponse - Added Type Alias ExportPipelinesCreateResponse - Added Type Alias ExportPipelinesGetResponse - Added Type Alias ExportPipelinesListNextResponse @@ -165,18 +224,14 @@ - Interface Policies has a new optional parameter azureADAuthenticationAsArmPolicy - Interface Policies has a new optional parameter softDeletePolicy - Interface RegistryUpdateParameters has a new optional parameter anonymousPullEnabled - - Class ContainerRegistryManagementClient has a new parameter connectedRegistries - - Class ContainerRegistryManagementClient has a new parameter exportPipelines - - Class ContainerRegistryManagementClient has a new parameter importPipelines - - Class ContainerRegistryManagementClient has a new parameter pipelineRuns - - Class ContainerRegistryManagementClient has a new parameter scopeMaps - - Class ContainerRegistryManagementClient has a new parameter tokens - Added Enum KnownActivationStatus - Added Enum KnownAuditLogStatus - Added Enum KnownAzureADAuthenticationAsArmPolicyStatus - Added Enum KnownCertificateType - Added Enum KnownConnectedRegistryMode - Added Enum KnownConnectionState + - Added Enum KnownCredentialHealthStatus + - Added Enum KnownCredentialName - Added Enum KnownLogLevel - Added Enum KnownPipelineOptions - Added Enum KnownPipelineRunSourceType @@ -186,6 +241,12 @@ - Added Enum KnownTokenCertificateName - Added Enum KnownTokenPasswordName - Added Enum KnownTokenStatus + - Added function getContinuationToken + +**Breaking Changes** + + - Interface RunsListNextOptionalParams no longer has parameter filter + - Interface RunsListNextOptionalParams no longer has parameter top ## 10.0.0 (2021-12-28) diff --git a/sdk/containerregistry/arm-containerregistry/LICENSE b/sdk/containerregistry/arm-containerregistry/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/containerregistry/arm-containerregistry/LICENSE +++ b/sdk/containerregistry/arm-containerregistry/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/containerregistry/arm-containerregistry/_meta.json b/sdk/containerregistry/arm-containerregistry/_meta.json index 543898ce13af..a32efb5cafed 100644 --- a/sdk/containerregistry/arm-containerregistry/_meta.json +++ b/sdk/containerregistry/arm-containerregistry/_meta.json @@ -1,8 +1,8 @@ { - "commit": "20df2424a278ca19437e437a7dbf3a7857a0dd9d", + "commit": "6d859b77c6378a5a186c8adf69cac60776d537bb", "readme": "specification/containerregistry/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --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\\containerregistry\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.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/containerregistry/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.0", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/containerregistry/arm-containerregistry/package.json b/sdk/containerregistry/arm-containerregistry/package.json index da3a036efa3c..d956dd036a6a 100644 --- a/sdk/containerregistry/arm-containerregistry/package.json +++ b/sdk/containerregistry/arm-containerregistry/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerRegistryManagementClient.", - "version": "10.1.0-beta.5", + "version": "11.0.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerregistry?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md b/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md index ee44c1ef3d8b..e546bdbc780d 100644 --- a/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md +++ b/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md @@ -146,6 +146,14 @@ export interface Argument { // @public export type AuditLogStatus = string; +// @public +export interface AuthCredential { + readonly credentialHealth?: CredentialHealth; + name?: CredentialName; + passwordSecretIdentifier?: string; + usernameSecretIdentifier?: string; +} + // @public export interface AuthInfo { expiresIn?: number; @@ -205,6 +213,101 @@ export interface BaseImageTriggerUpdateParameters { updateTriggerPayloadType?: UpdateTriggerPayloadType; } +// @public +export interface CacheRule extends ProxyResource { + readonly creationDate?: Date; + credentialSetResourceId?: string; + readonly provisioningState?: ProvisioningState; + sourceRepository?: string; + targetRepository?: string; +} + +// @public +export interface CacheRules { + beginCreate(resourceGroupName: string, registryName: string, cacheRuleName: string, cacheRuleCreateParameters: CacheRule, options?: CacheRulesCreateOptionalParams): Promise, CacheRulesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, cacheRuleName: string, cacheRuleCreateParameters: CacheRule, options?: CacheRulesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, cacheRuleName: string, options?: CacheRulesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, cacheRuleName: string, options?: CacheRulesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, registryName: string, cacheRuleName: string, cacheRuleUpdateParameters: CacheRuleUpdateParameters, options?: CacheRulesUpdateOptionalParams): Promise, CacheRulesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, registryName: string, cacheRuleName: string, cacheRuleUpdateParameters: CacheRuleUpdateParameters, options?: CacheRulesUpdateOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, cacheRuleName: string, options?: CacheRulesGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: CacheRulesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CacheRulesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface CacheRulesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CacheRulesCreateResponse = CacheRule; + +// @public +export interface CacheRulesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface CacheRulesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CacheRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CacheRulesGetResponse = CacheRule; + +// @public +export interface CacheRulesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CacheRulesListNextResponse = CacheRulesListResult; + +// @public +export interface CacheRulesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CacheRulesListResponse = CacheRulesListResult; + +// @public +export interface CacheRulesListResult { + nextLink?: string; + value?: CacheRule[]; +} + +// @public +export interface CacheRulesUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface CacheRulesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CacheRulesUpdateResponse = CacheRule; + +// @public +export interface CacheRuleUpdateParameters { + credentialSetResourceId?: string; +} + // @public export interface CallbackConfig { customHeaders?: { @@ -230,6 +333,12 @@ export interface ConnectedRegistries { list(resourceGroupName: string, registryName: string, options?: ConnectedRegistriesListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ConnectedRegistriesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ConnectedRegistriesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -239,12 +348,24 @@ export interface ConnectedRegistriesCreateOptionalParams extends coreClient.Oper // @public export type ConnectedRegistriesCreateResponse = ConnectedRegistry; +// @public +export interface ConnectedRegistriesDeactivateHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedRegistriesDeactivateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface ConnectedRegistriesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ConnectedRegistriesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -260,7 +381,6 @@ export type ConnectedRegistriesGetResponse = ConnectedRegistry; // @public export interface ConnectedRegistriesListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; } // @public @@ -274,6 +394,12 @@ export interface ConnectedRegistriesListOptionalParams extends coreClient.Operat // @public export type ConnectedRegistriesListResponse = ConnectedRegistryListResult; +// @public +export interface ConnectedRegistriesUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ConnectedRegistriesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -330,8 +456,12 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient // (undocumented) agentPools: AgentPools; // (undocumented) + cacheRules: CacheRules; + // (undocumented) connectedRegistries: ConnectedRegistries; // (undocumented) + credentialSets: CredentialSets; + // (undocumented) exportPipelines: ExportPipelines; // (undocumented) importPipelines: ImportPipelines; @@ -370,6 +500,19 @@ export interface ContainerRegistryManagementClientOptionalParams extends coreCli // @public export type CreatedByType = string; +// @public +export interface CredentialHealth { + errorCode?: string; + errorMessage?: string; + status?: CredentialHealthStatus; +} + +// @public +export type CredentialHealthStatus = string; + +// @public +export type CredentialName = string; + // @public export interface Credentials { customRegistries?: { @@ -378,6 +521,102 @@ export interface Credentials { sourceRegistry?: SourceRegistryCredentials; } +// @public +export interface CredentialSet extends ProxyResource { + authCredentials?: AuthCredential[]; + readonly creationDate?: Date; + identity?: IdentityProperties; + loginServer?: string; + readonly provisioningState?: ProvisioningState; +} + +// @public +export interface CredentialSetListResult { + nextLink?: string; + value?: CredentialSet[]; +} + +// @public +export interface CredentialSets { + beginCreate(resourceGroupName: string, registryName: string, credentialSetName: string, credentialSetCreateParameters: CredentialSet, options?: CredentialSetsCreateOptionalParams): Promise, CredentialSetsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, credentialSetName: string, credentialSetCreateParameters: CredentialSet, options?: CredentialSetsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, credentialSetName: string, options?: CredentialSetsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, credentialSetName: string, options?: CredentialSetsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, registryName: string, credentialSetName: string, credentialSetUpdateParameters: CredentialSetUpdateParameters, options?: CredentialSetsUpdateOptionalParams): Promise, CredentialSetsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, registryName: string, credentialSetName: string, credentialSetUpdateParameters: CredentialSetUpdateParameters, options?: CredentialSetsUpdateOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, credentialSetName: string, options?: CredentialSetsGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: CredentialSetsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface CredentialSetsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface CredentialSetsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CredentialSetsCreateResponse = CredentialSet; + +// @public +export interface CredentialSetsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface CredentialSetsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface CredentialSetsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialSetsGetResponse = CredentialSet; + +// @public +export interface CredentialSetsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialSetsListNextResponse = CredentialSetListResult; + +// @public +export interface CredentialSetsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CredentialSetsListResponse = CredentialSetListResult; + +// @public +export interface CredentialSetsUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface CredentialSetsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CredentialSetsUpdateResponse = CredentialSet; + +// @public +export interface CredentialSetUpdateParameters { + authCredentials?: AuthCredential[]; + identity?: IdentityProperties; +} + // @public export interface CustomRegistryCredentials { identity?: string; @@ -553,6 +792,12 @@ export interface ExportPipelines { list(resourceGroupName: string, registryName: string, options?: ExportPipelinesListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ExportPipelinesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ExportPipelinesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -562,6 +807,12 @@ export interface ExportPipelinesCreateOptionalParams extends coreClient.Operatio // @public export type ExportPipelinesCreateResponse = ExportPipeline; +// @public +export interface ExportPipelinesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ExportPipelinesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -711,6 +962,12 @@ export interface ImportPipelines { list(resourceGroupName: string, registryName: string, options?: ImportPipelinesListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ImportPipelinesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ImportPipelinesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -720,6 +977,12 @@ export interface ImportPipelinesCreateOptionalParams extends coreClient.Operatio // @public export type ImportPipelinesCreateResponse = ImportPipeline; +// @public +export interface ImportPipelinesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ImportPipelinesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -877,6 +1140,17 @@ export enum KnownCreatedByType { User = "User" } +// @public +export enum KnownCredentialHealthStatus { + Healthy = "Healthy", + Unhealthy = "Unhealthy" +} + +// @public +export enum KnownCredentialName { + Credential1 = "Credential1" +} + // @public export enum KnownDefaultAction { Allow = "Allow", @@ -1299,6 +1573,12 @@ export interface PipelineRuns { list(resourceGroupName: string, registryName: string, options?: PipelineRunsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface PipelineRunsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface PipelineRunsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1308,6 +1588,12 @@ export interface PipelineRunsCreateOptionalParams extends coreClient.OperationOp // @public export type PipelineRunsCreateResponse = PipelineRun; +// @public +export interface PipelineRunsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface PipelineRunsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1431,6 +1717,12 @@ export interface PrivateEndpointConnections { list(resourceGroupName: string, registryName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface PrivateEndpointConnectionsCreateOrUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1440,6 +1732,12 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends // @public export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +// @public +export interface PrivateEndpointConnectionsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1552,6 +1850,12 @@ export interface RegistriesCheckNameAvailabilityOptionalParams extends coreClien // @public export type RegistriesCheckNameAvailabilityResponse = RegistryNameStatus; +// @public +export interface RegistriesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface RegistriesCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1561,12 +1865,24 @@ export interface RegistriesCreateOptionalParams extends coreClient.OperationOpti // @public export type RegistriesCreateResponse = Registry; +// @public +export interface RegistriesDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface RegistriesDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export interface RegistriesGenerateCredentialsHeaders { + // (undocumented) + location?: string; +} + // @public export interface RegistriesGenerateCredentialsOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1597,6 +1913,12 @@ export type RegistriesGetPrivateLinkResourceResponse = PrivateLinkResource; // @public export type RegistriesGetResponse = Registry; +// @public +export interface RegistriesImportImageHeaders { + // (undocumented) + location?: string; +} + // @public export interface RegistriesImportImageOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1675,6 +1997,12 @@ export interface RegistriesScheduleRunOptionalParams extends coreClient.Operatio // @public export type RegistriesScheduleRunResponse = Run; +// @public +export interface RegistriesUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface RegistriesUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1795,6 +2123,12 @@ export interface Replications { list(resourceGroupName: string, registryName: string, options?: ReplicationsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ReplicationsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ReplicationsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1804,6 +2138,12 @@ export interface ReplicationsCreateOptionalParams extends coreClient.OperationOp // @public export type ReplicationsCreateResponse = Replication; +// @public +export interface ReplicationsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ReplicationsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1831,6 +2171,12 @@ export interface ReplicationsListOptionalParams extends coreClient.OperationOpti // @public export type ReplicationsListResponse = ReplicationListResult; +// @public +export interface ReplicationsUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ReplicationsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1975,8 +2321,6 @@ export type RunsGetResponse = Run; // @public export interface RunsListNextOptionalParams extends coreClient.OperationOptions { - filter?: string; - top?: number; } // @public @@ -2038,6 +2382,12 @@ export interface ScopeMaps { list(resourceGroupName: string, registryName: string, options?: ScopeMapsListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ScopeMapsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ScopeMapsCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2047,6 +2397,12 @@ export interface ScopeMapsCreateOptionalParams extends coreClient.OperationOptio // @public export type ScopeMapsCreateResponse = ScopeMap; +// @public +export interface ScopeMapsDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface ScopeMapsDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2074,6 +2430,12 @@ export interface ScopeMapsListOptionalParams extends coreClient.OperationOptions // @public export type ScopeMapsListResponse = ScopeMapListResult; +// @public +export interface ScopeMapsUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface ScopeMapsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2578,6 +2940,12 @@ export interface Tokens { list(resourceGroupName: string, registryName: string, options?: TokensListOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface TokensCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface TokensCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2587,6 +2955,12 @@ export interface TokensCreateOptionalParams extends coreClient.OperationOptions // @public export type TokensCreateResponse = Token; +// @public +export interface TokensDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface TokensDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2617,6 +2991,12 @@ export type TokensListResponse = TokenListResult; // @public export type TokenStatus = string; +// @public +export interface TokensUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface TokensUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2721,6 +3101,12 @@ export interface Webhooks { ping(resourceGroupName: string, registryName: string, webhookName: string, options?: WebhooksPingOptionalParams): Promise; } +// @public +export interface WebhooksCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface WebhooksCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2730,6 +3116,12 @@ export interface WebhooksCreateOptionalParams extends coreClient.OperationOption // @public export type WebhooksCreateResponse = Webhook; +// @public +export interface WebhooksDeleteHeaders { + // (undocumented) + location?: string; +} + // @public export interface WebhooksDeleteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2788,6 +3180,12 @@ export type WebhooksPingResponse = EventInfo; // @public export type WebhookStatus = string; +// @public +export interface WebhooksUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + // @public export interface WebhooksUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts index 49e8f36f2e7d..b6a8010cbb46 100644 --- a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts +++ b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts @@ -10,7 +10,9 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + CacheRulesImpl, ConnectedRegistriesImpl, + CredentialSetsImpl, ExportPipelinesImpl, RegistriesImpl, ImportPipelinesImpl, @@ -27,7 +29,9 @@ import { TasksImpl } from "./operations"; import { + CacheRules, ConnectedRegistries, + CredentialSets, ExportPipelines, Registries, ImportPipelines, @@ -52,7 +56,7 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient /** * Initializes a new instance of the ContainerRegistryManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The Microsoft Azure subscription ID. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param options The parameter options */ constructor( @@ -76,7 +80,7 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-containerregistry/10.1.0-beta.5`; + const packageDetails = `azsdk-js-arm-containerregistry/11.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -129,7 +133,9 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; + this.cacheRules = new CacheRulesImpl(this); this.connectedRegistries = new ConnectedRegistriesImpl(this); + this.credentialSets = new CredentialSetsImpl(this); this.exportPipelines = new ExportPipelinesImpl(this); this.registries = new RegistriesImpl(this); this.importPipelines = new ImportPipelinesImpl(this); @@ -146,7 +152,9 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient this.tasks = new TasksImpl(this); } + cacheRules: CacheRules; connectedRegistries: ConnectedRegistries; + credentialSets: CredentialSets; exportPipelines: ExportPipelines; registries: Registries; importPipelines: ImportPipelines; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/index.ts b/sdk/containerregistry/arm-containerregistry/src/models/index.ts index b7b66e2d8030..f5a129a200f7 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/index.ts @@ -25,6 +25,88 @@ export type TaskStepUpdateParametersUnion = | FileTaskStepUpdateParameters | EncodedTaskStepUpdateParameters; +/** The result of a request to list cache rules for a container registry. */ +export interface CacheRulesListResult { + /** The list of cache rules. */ + value?: CacheRule[]; + /** If provided, client must use NextLink URI to request next list of cache rules. */ + nextLink?: string; +} + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. */ +export interface ProxyResource { + /** + * The resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: LastModifiedByType; + /** The timestamp of resource modification (UTC). */ + lastModifiedAt?: Date; +} + +/** An error response from the Azure Container Registry service. */ +export interface ErrorResponse { + /** Azure container registry build API error body. */ + error?: ErrorResponseBody; +} + +/** An error response from the Azure Container Registry service. */ +export interface ErrorResponseBody { + /** error code. */ + code: string; + /** error message. */ + message: string; + /** target of the particular error. */ + target?: string; + /** an array of additional nested error response info objects, as described by this contract. */ + details?: InnerErrorDescription[]; +} + +/** inner error. */ +export interface InnerErrorDescription { + /** error code. */ + code: string; + /** error message. */ + message: string; + /** target of the particular error. */ + target?: string; +} + +/** The parameters for updating a cache rule. */ +export interface CacheRuleUpdateParameters { + /** The ARM resource ID of the credential store which is associated with the Cache rule. */ + credentialSetResourceId?: string; +} + /** The result of a request to list connected registries for a container registry. */ export interface ConnectedRegistryListResult { /** The list of connected registries. Since this list may be incomplete, the nextLink field should be used to request the next list of connected registries. */ @@ -151,74 +233,6 @@ export interface StatusDetailProperties { readonly correlationId?: string; } -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. */ -export interface ProxyResource { - /** - * The resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Metadata pertaining to creation and last modification of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly systemData?: SystemData; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: LastModifiedByType; - /** The timestamp of resource modification (UTC). */ - lastModifiedAt?: Date; -} - -/** An error response from the Azure Container Registry service. */ -export interface ErrorResponse { - /** Azure container registry build API error body. */ - error?: ErrorResponseBody; -} - -/** An error response from the Azure Container Registry service. */ -export interface ErrorResponseBody { - /** error code. */ - code: string; - /** error message. */ - message: string; - /** target of the particular error. */ - target?: string; - /** an array of additional nested error response info objects, as described by this contract. */ - details?: InnerErrorDescription[]; -} - -/** inner error. */ -export interface InnerErrorDescription { - /** error code. */ - code: string; - /** error message. */ - message: string; - /** target of the particular error. */ - target?: string; -} - /** The parameters for updating a connected registry. */ export interface ConnectedRegistryUpdateParameters { /** The sync properties of the connected registry with its parent. */ @@ -241,11 +255,11 @@ export interface SyncUpdateProperties { messageTtl?: string; } -/** The result of a request to list export pipelines for a container registry. */ -export interface ExportPipelineListResult { - /** The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. */ - value?: ExportPipeline[]; - /** The URI that can be used to request the next list of pipeline runs. */ +/** The result of a request to list credential sets for a container registry. */ +export interface CredentialSetListResult { + /** The list of credential sets. Since this list may be incomplete, the nextLink field should be used to request the next list of credential sets. */ + value?: CredentialSet[]; + /** The URI that can be used to request the next list of credential sets. */ nextLink?: string; } @@ -273,6 +287,50 @@ export interface UserIdentityProperties { clientId?: string; } +/** Authentication credential stored for an upstream. */ +export interface AuthCredential { + /** The name of the credential. */ + name?: CredentialName; + /** KeyVault Secret URI for accessing the username. */ + usernameSecretIdentifier?: string; + /** KeyVault Secret URI for accessing the password. */ + passwordSecretIdentifier?: string; + /** + * This provides data pertaining to the health of the auth credential. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly credentialHealth?: CredentialHealth; +} + +/** The health of the auth credential. */ +export interface CredentialHealth { + /** The health status of credential. */ + status?: CredentialHealthStatus; + /** Error code representing the health check error. */ + errorCode?: string; + /** Descriptive message representing the health check error. */ + errorMessage?: string; +} + +/** The parameters for updating a credential set */ +export interface CredentialSetUpdateParameters { + /** Identities associated with the resource. This is used to access the KeyVault secrets. */ + identity?: IdentityProperties; + /** + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + authCredentials?: AuthCredential[]; +} + +/** The result of a request to list export pipelines for a container registry. */ +export interface ExportPipelineListResult { + /** The list of export pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of export pipelines. */ + value?: ExportPipeline[]; + /** The URI that can be used to request the next list of pipeline runs. */ + nextLink?: string; +} + /** The properties of the export pipeline target. */ export interface ExportPipelineTargetProperties { /** The type of target for the export pipeline. */ @@ -1612,6 +1670,29 @@ export interface OverrideTaskStepProperties { updateTriggerToken?: string; } +/** An object that represents a cache rule for a container registry. */ +export interface CacheRule extends ProxyResource { + /** The ARM resource ID of the credential store which is associated with the cache rule. */ + credentialSetResourceId?: string; + /** Source repository pulled from upstream. */ + sourceRepository?: string; + /** + * Target repository specified in docker pull command. + * Eg: docker pull myregistry.azurecr.io/{targetRepository}:{tag} + */ + targetRepository?: string; + /** + * The creation date of the cache rule. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationDate?: Date; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + /** An object that represents a connected registry for a container registry. */ export interface ConnectedRegistry extends ProxyResource { /** @@ -1658,6 +1739,29 @@ export interface ConnectedRegistry extends ProxyResource { notificationsList?: string[]; } +/** An object that represents a credential set resource for a container registry. */ +export interface CredentialSet extends ProxyResource { + /** Identities associated with the resource. This is used to access the KeyVault secrets. */ + identity?: IdentityProperties; + /** The credentials are stored for this upstream or login server. */ + loginServer?: string; + /** + * List of authentication credentials stored for an upstream. + * Usually consists of a primary and an optional secondary credential. + */ + authCredentials?: AuthCredential[]; + /** + * The creation date of credential store resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationDate?: Date; + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + /** An object that represents an export pipeline for a container registry. */ export interface ExportPipeline extends ProxyResource { /** The location of the export pipeline. */ @@ -2184,6 +2288,181 @@ export interface EncodedTaskStepUpdateParameters values?: SetValue[]; } +/** Defines headers for CacheRules_create operation. */ +export interface CacheRulesCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for CacheRules_delete operation. */ +export interface CacheRulesDeleteHeaders { + location?: string; +} + +/** Defines headers for CacheRules_update operation. */ +export interface CacheRulesUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ConnectedRegistries_create operation. */ +export interface ConnectedRegistriesCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ConnectedRegistries_delete operation. */ +export interface ConnectedRegistriesDeleteHeaders { + location?: string; +} + +/** Defines headers for ConnectedRegistries_update operation. */ +export interface ConnectedRegistriesUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ConnectedRegistries_deactivate operation. */ +export interface ConnectedRegistriesDeactivateHeaders { + location?: string; +} + +/** Defines headers for CredentialSets_create operation. */ +export interface CredentialSetsCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for CredentialSets_delete operation. */ +export interface CredentialSetsDeleteHeaders { + location?: string; +} + +/** Defines headers for CredentialSets_update operation. */ +export interface CredentialSetsUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ExportPipelines_create operation. */ +export interface ExportPipelinesCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ExportPipelines_delete operation. */ +export interface ExportPipelinesDeleteHeaders { + location?: string; +} + +/** Defines headers for Registries_importImage operation. */ +export interface RegistriesImportImageHeaders { + location?: string; +} + +/** Defines headers for Registries_create operation. */ +export interface RegistriesCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Registries_delete operation. */ +export interface RegistriesDeleteHeaders { + location?: string; +} + +/** Defines headers for Registries_update operation. */ +export interface RegistriesUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Registries_generateCredentials operation. */ +export interface RegistriesGenerateCredentialsHeaders { + location?: string; +} + +/** Defines headers for ImportPipelines_create operation. */ +export interface ImportPipelinesCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ImportPipelines_delete operation. */ +export interface ImportPipelinesDeleteHeaders { + location?: string; +} + +/** Defines headers for PipelineRuns_create operation. */ +export interface PipelineRunsCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for PipelineRuns_delete operation. */ +export interface PipelineRunsDeleteHeaders { + location?: string; +} + +/** Defines headers for PrivateEndpointConnections_createOrUpdate operation. */ +export interface PrivateEndpointConnectionsCreateOrUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for PrivateEndpointConnections_delete operation. */ +export interface PrivateEndpointConnectionsDeleteHeaders { + location?: string; +} + +/** Defines headers for Replications_create operation. */ +export interface ReplicationsCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Replications_delete operation. */ +export interface ReplicationsDeleteHeaders { + location?: string; +} + +/** Defines headers for Replications_update operation. */ +export interface ReplicationsUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ScopeMaps_create operation. */ +export interface ScopeMapsCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for ScopeMaps_delete operation. */ +export interface ScopeMapsDeleteHeaders { + location?: string; +} + +/** Defines headers for ScopeMaps_update operation. */ +export interface ScopeMapsUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Tokens_create operation. */ +export interface TokensCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Tokens_delete operation. */ +export interface TokensDeleteHeaders { + location?: string; +} + +/** Defines headers for Tokens_update operation. */ +export interface TokensUpdateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Webhooks_create operation. */ +export interface WebhooksCreateHeaders { + azureAsyncOperation?: string; +} + +/** Defines headers for Webhooks_delete operation. */ +export interface WebhooksDeleteHeaders { + location?: string; +} + +/** Defines headers for Webhooks_update operation. */ +export interface WebhooksUpdateHeaders { + azureAsyncOperation?: string; +} + /** Known values of {@link ProvisioningState} that the service accepts. */ export enum KnownProvisioningState { /** Creating */ @@ -2214,6 +2493,54 @@ export enum KnownProvisioningState { */ export type ProvisioningState = string; +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link LastModifiedByType} that the service accepts. */ +export enum KnownLastModifiedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for LastModifiedByType. \ + * {@link KnownLastModifiedByType} can be used interchangeably with LastModifiedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type LastModifiedByType = string; + /** Known values of {@link ConnectedRegistryMode} that the service accepts. */ export enum KnownConnectedRegistryMode { /** ReadWrite */ @@ -2358,53 +2685,38 @@ export enum KnownAuditLogStatus { */ export type AuditLogStatus = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Known values of {@link CredentialName} that the service accepts. */ +export enum KnownCredentialName { + /** Credential1 */ + Credential1 = "Credential1" } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for CredentialName. \ + * {@link KnownCredentialName} can be used interchangeably with CredentialName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Credential1** */ -export type CreatedByType = string; +export type CredentialName = string; -/** Known values of {@link LastModifiedByType} that the service accepts. */ -export enum KnownLastModifiedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" +/** Known values of {@link CredentialHealthStatus} that the service accepts. */ +export enum KnownCredentialHealthStatus { + /** Healthy */ + Healthy = "Healthy", + /** Unhealthy */ + Unhealthy = "Unhealthy" } /** - * Defines values for LastModifiedByType. \ - * {@link KnownLastModifiedByType} can be used interchangeably with LastModifiedByType, + * Defines values for CredentialHealthStatus. \ + * {@link KnownCredentialHealthStatus} can be used interchangeably with CredentialHealthStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Healthy** \ + * **Unhealthy** */ -export type LastModifiedByType = string; +export type CredentialHealthStatus = string; /** Known values of {@link PipelineOptions} that the service accepts. */ export enum KnownPipelineOptions { @@ -3209,6 +3521,60 @@ export type ResourceIdentityType = /** Defines values for PasswordName. */ export type PasswordName = "password" | "password2"; +/** Optional parameters. */ +export interface CacheRulesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type CacheRulesListResponse = CacheRulesListResult; + +/** Optional parameters. */ +export interface CacheRulesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CacheRulesGetResponse = CacheRule; + +/** Optional parameters. */ +export interface CacheRulesCreateOptionalParams + 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 create operation. */ +export type CacheRulesCreateResponse = CacheRule; + +/** Optional parameters. */ +export interface CacheRulesDeleteOptionalParams + 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 CacheRulesUpdateOptionalParams + 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 CacheRulesUpdateResponse = CacheRule; + +/** Optional parameters. */ +export interface CacheRulesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type CacheRulesListNextResponse = CacheRulesListResult; + /** Optional parameters. */ export interface ConnectedRegistriesListOptionalParams extends coreClient.OperationOptions { @@ -3270,13 +3636,64 @@ export interface ConnectedRegistriesDeactivateOptionalParams /** Optional parameters. */ export interface ConnectedRegistriesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ConnectedRegistriesListNextResponse = ConnectedRegistryListResult; + +/** Optional parameters. */ +export interface CredentialSetsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type CredentialSetsListResponse = CredentialSetListResult; + +/** Optional parameters. */ +export interface CredentialSetsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CredentialSetsGetResponse = CredentialSet; + +/** Optional parameters. */ +export interface CredentialSetsCreateOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that describes a subset of connectedRegistries to return. The parameters that can be filtered are parent.id (the resource id of the connectedRegistry parent), mode, and connectionState. The supported operator is eq. */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } +/** Contains response data for the create operation. */ +export type CredentialSetsCreateResponse = CredentialSet; + +/** Optional parameters. */ +export interface CredentialSetsDeleteOptionalParams + 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 CredentialSetsUpdateOptionalParams + 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 CredentialSetsUpdateResponse = CredentialSet; + +/** Optional parameters. */ +export interface CredentialSetsListNextOptionalParams + extends coreClient.OperationOptions {} + /** Contains response data for the listNext operation. */ -export type ConnectedRegistriesListNextResponse = ConnectedRegistryListResult; +export type CredentialSetsListNextResponse = CredentialSetListResult; /** Optional parameters. */ export interface ExportPipelinesListOptionalParams @@ -3965,12 +4382,7 @@ export interface RunsCancelOptionalParams extends coreClient.OperationOptions { /** Optional parameters. */ export interface RunsListNextOptionalParams - extends coreClient.OperationOptions { - /** The runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. */ - filter?: string; - /** $top is supported for get list of runs, which limits the maximum number of runs to return. */ - top?: number; -} + extends coreClient.OperationOptions {} /** Contains response data for the listNext operation. */ export type RunsListNextResponse = RunListResult; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts index 6884ca540069..8691d6002745 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts @@ -8,6 +8,216 @@ import * as coreClient from "@azure/core-client"; +export const CacheRulesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRulesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CacheRule" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ErrorResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponseBody" + } + } + } + } +}; + +export const ErrorResponseBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorResponseBody", + modelProperties: { + code: { + serializedName: "code", + required: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + required: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + }, + details: { + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InnerErrorDescription" + } + } + } + } + } + } +}; + +export const InnerErrorDescription: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InnerErrorDescription", + modelProperties: { + code: { + serializedName: "code", + required: true, + type: { + name: "String" + } + }, + message: { + serializedName: "message", + required: true, + type: { + name: "String" + } + }, + target: { + serializedName: "target", + type: { + name: "String" + } + } + } + } +}; + +export const CacheRuleUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRuleUpdateParameters", + modelProperties: { + credentialSetResourceId: { + serializedName: "properties.credentialSetResourceId", + type: { + name: "String" + } + } + } + } +}; + export const ConnectedRegistryListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -258,138 +468,140 @@ export const StatusDetailProperties: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const ConnectedRegistryUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "ConnectedRegistryUpdateParameters", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + syncProperties: { + serializedName: "properties.syncProperties", type: { - name: "String" + name: "Composite", + className: "SyncUpdateProperties" } }, - name: { - serializedName: "name", - readOnly: true, + logging: { + serializedName: "properties.logging", type: { - name: "String" + name: "Composite", + className: "LoggingProperties" } }, - type: { - serializedName: "type", - readOnly: true, + clientTokenIds: { + serializedName: "properties.clientTokenIds", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - systemData: { - serializedName: "systemData", + notificationsList: { + serializedName: "properties.notificationsList", type: { - name: "Composite", - className: "SystemData" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const SystemData: coreClient.CompositeMapper = { +export const SyncUpdateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "SyncUpdateProperties", modelProperties: { - createdBy: { - serializedName: "createdBy", + schedule: { + serializedName: "schedule", type: { name: "String" } }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String" - } - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + syncWindow: { + serializedName: "syncWindow", type: { - name: "String" + name: "TimeSpan" } }, - lastModifiedAt: { - serializedName: "lastModifiedAt", + messageTtl: { + serializedName: "messageTtl", type: { - name: "DateTime" + name: "TimeSpan" } } } } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const CredentialSetListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "CredentialSetListResult", modelProperties: { - error: { - serializedName: "error", + value: { + serializedName: "value", type: { - name: "Composite", - className: "ErrorResponseBody" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CredentialSet" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" } } } } }; -export const ErrorResponseBody: coreClient.CompositeMapper = { +export const IdentityProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponseBody", + className: "IdentityProperties", modelProperties: { - code: { - serializedName: "code", - required: true, + principalId: { + serializedName: "principalId", type: { name: "String" } }, - message: { - serializedName: "message", - required: true, + tenantId: { + serializedName: "tenantId", type: { name: "String" } }, - target: { - serializedName: "target", + type: { + serializedName: "type", type: { - name: "String" + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] } }, - details: { - serializedName: "details", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InnerErrorDescription" - } + name: "Dictionary", + value: { + type: { name: "Composite", className: "UserIdentityProperties" } } } } @@ -397,27 +609,19 @@ export const ErrorResponseBody: coreClient.CompositeMapper = { } }; -export const InnerErrorDescription: coreClient.CompositeMapper = { +export const UserIdentityProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InnerErrorDescription", + className: "UserIdentityProperties", modelProperties: { - code: { - serializedName: "code", - required: true, - type: { - name: "String" - } - }, - message: { - serializedName: "message", - required: true, + principalId: { + serializedName: "principalId", type: { name: "String" } }, - target: { - serializedName: "target", + clientId: { + serializedName: "clientId", type: { name: "String" } @@ -426,160 +630,114 @@ export const InnerErrorDescription: coreClient.CompositeMapper = { } }; -export const ConnectedRegistryUpdateParameters: coreClient.CompositeMapper = { +export const AuthCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedRegistryUpdateParameters", + className: "AuthCredential", modelProperties: { - syncProperties: { - serializedName: "properties.syncProperties", + name: { + serializedName: "name", type: { - name: "Composite", - className: "SyncUpdateProperties" + name: "String" } }, - logging: { - serializedName: "properties.logging", + usernameSecretIdentifier: { + serializedName: "usernameSecretIdentifier", type: { - name: "Composite", - className: "LoggingProperties" + name: "String" } }, - clientTokenIds: { - serializedName: "properties.clientTokenIds", + passwordSecretIdentifier: { + serializedName: "passwordSecretIdentifier", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - notificationsList: { - serializedName: "properties.notificationsList", + credentialHealth: { + serializedName: "credentialHealth", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "CredentialHealth" } } } } }; -export const SyncUpdateProperties: coreClient.CompositeMapper = { +export const CredentialHealth: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncUpdateProperties", + className: "CredentialHealth", modelProperties: { - schedule: { - serializedName: "schedule", + status: { + serializedName: "status", type: { name: "String" } }, - syncWindow: { - serializedName: "syncWindow", + errorCode: { + serializedName: "errorCode", type: { - name: "TimeSpan" + name: "String" } }, - messageTtl: { - serializedName: "messageTtl", + errorMessage: { + serializedName: "errorMessage", type: { - name: "TimeSpan" + name: "String" } } } } }; -export const ExportPipelineListResult: coreClient.CompositeMapper = { +export const CredentialSetUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExportPipelineListResult", + className: "CredentialSetUpdateParameters", modelProperties: { - value: { - serializedName: "value", + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + authCredentials: { + serializedName: "properties.authCredentials", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ExportPipeline" + className: "AuthCredential" } } } - }, - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } } } } }; -export const IdentityProperties: coreClient.CompositeMapper = { +export const ExportPipelineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IdentityProperties", + className: "ExportPipelineListResult", modelProperties: { - principalId: { - serializedName: "principalId", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned, UserAssigned", - "None" - ] - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + value: { + serializedName: "value", type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportPipeline" + } } } - } - } - } -}; - -export const UserIdentityProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - type: { - name: "String" - } }, - clientId: { - serializedName: "clientId", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -4345,46 +4503,88 @@ export const OverrideTaskStepProperties: coreClient.CompositeMapper = { } }; -export const ConnectedRegistry: coreClient.CompositeMapper = { +export const CacheRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectedRegistry", + className: "CacheRule", modelProperties: { ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + credentialSetResourceId: { + serializedName: "properties.credentialSetResourceId", type: { name: "String" } }, - mode: { - serializedName: "properties.mode", + sourceRepository: { + serializedName: "properties.sourceRepository", type: { name: "String" } }, - version: { - serializedName: "properties.version", - readOnly: true, + targetRepository: { + serializedName: "properties.targetRepository", type: { name: "String" } }, - connectionState: { - serializedName: "properties.connectionState", + creationDate: { + serializedName: "properties.creationDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - lastActivityTime: { - serializedName: "properties.lastActivityTime", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "DateTime" + name: "String" } - }, + } + } + } +}; + +export const ConnectedRegistry: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedRegistry", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + }, + mode: { + serializedName: "properties.mode", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "String" + } + }, + connectionState: { + serializedName: "properties.connectionState", + readOnly: true, + type: { + name: "String" + } + }, + lastActivityTime: { + serializedName: "properties.lastActivityTime", + readOnly: true, + type: { + name: "DateTime" + } + }, activation: { serializedName: "properties.activation", type: { @@ -4452,6 +4652,55 @@ export const ConnectedRegistry: coreClient.CompositeMapper = { } }; +export const CredentialSet: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialSet", + modelProperties: { + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + loginServer: { + serializedName: "properties.loginServer", + type: { + name: "String" + } + }, + authCredentials: { + serializedName: "properties.authCredentials", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AuthCredential" + } + } + } + }, + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ExportPipeline: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5861,6 +6110,531 @@ export const EncodedTaskStepUpdateParameters: coreClient.CompositeMapper = { } }; +export const CacheRulesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRulesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CacheRulesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRulesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CacheRulesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRulesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedRegistriesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedRegistriesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedRegistriesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedRegistriesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedRegistriesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedRegistriesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ConnectedRegistriesDeactivateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectedRegistriesDeactivateHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CredentialSetsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialSetsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const CredentialSetsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialSetsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const CredentialSetsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialSetsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ExportPipelinesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExportPipelinesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ExportPipelinesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExportPipelinesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RegistriesImportImageHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistriesImportImageHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RegistriesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistriesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const RegistriesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistriesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const RegistriesUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistriesUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const RegistriesGenerateCredentialsHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistriesGenerateCredentialsHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ImportPipelinesCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportPipelinesCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ImportPipelinesDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportPipelinesDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineRunsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineRunsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PipelineRunsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineRunsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsCreateOrUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsCreateOrUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeMapsCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeMapsCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeMapsDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeMapsDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeMapsUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeMapsUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TokensCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokensCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const TokensDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokensDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const TokensUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokensUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const WebhooksCreateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhooksCreateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + +export const WebhooksDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhooksDeleteHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const WebhooksUpdateHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhooksUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String" + } + } + } + } +}; + export let discriminators = { RunRequest: RunRequest, TaskStepProperties: TaskStepProperties, diff --git a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts index ab7bf7143151..688c101b9014 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts @@ -12,8 +12,12 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + CacheRule as CacheRuleMapper, + CacheRuleUpdateParameters as CacheRuleUpdateParametersMapper, ConnectedRegistry as ConnectedRegistryMapper, ConnectedRegistryUpdateParameters as ConnectedRegistryUpdateParametersMapper, + CredentialSet as CredentialSetMapper, + CredentialSetUpdateParameters as CredentialSetUpdateParametersMapper, ExportPipeline as ExportPipelineMapper, ImportImageParameters as ImportImageParametersMapper, RegistryNameCheckRequest as RegistryNameCheckRequestMapper, @@ -69,7 +73,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-02-01-preview", + defaultValue: "2023-01-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -84,7 +88,7 @@ export const subscriptionId: OperationURLParameter = { serializedName: "subscriptionId", required: true, type: { - name: "String" + name: "Uuid" } } }; @@ -93,6 +97,7 @@ export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { constraints: { + MaxLength: 90, MinLength: 1 }, serializedName: "resourceGroupName", @@ -119,6 +124,56 @@ export const registryName: OperationURLParameter = { } }; +export const cacheRuleName: OperationURLParameter = { + parameterPath: "cacheRuleName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "cacheRuleName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const cacheRuleCreateParameters: OperationParameter = { + parameterPath: "cacheRuleCreateParameters", + mapper: CacheRuleMapper +}; + +export const cacheRuleUpdateParameters: OperationParameter = { + parameterPath: "cacheRuleUpdateParameters", + mapper: CacheRuleUpdateParametersMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { @@ -145,18 +200,6 @@ export const connectedRegistryName: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - export const connectedRegistryCreateParameters: OperationParameter = { parameterPath: "connectedRegistryCreateParameters", mapper: ConnectedRegistryMapper @@ -167,16 +210,30 @@ export const connectedRegistryUpdateParameters: OperationParameter = { mapper: ConnectedRegistryUpdateParametersMapper }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const credentialSetName: OperationURLParameter = { + parameterPath: "credentialSetName", mapper: { - serializedName: "nextLink", + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "credentialSetName", required: true, type: { name: "String" } - }, - skipEncoding: true + } +}; + +export const credentialSetCreateParameters: OperationParameter = { + parameterPath: "credentialSetCreateParameters", + mapper: CredentialSetMapper +}; + +export const credentialSetUpdateParameters: OperationParameter = { + parameterPath: "credentialSetUpdateParameters", + mapper: CredentialSetUpdateParametersMapper }; export const exportPipelineName: OperationURLParameter = { @@ -246,6 +303,20 @@ export const runRequest: OperationParameter = { mapper: RunRequestMapper }; +export const resourceGroupName1: OperationURLParameter = { + parameterPath: "resourceGroupName", + mapper: { + constraints: { + MinLength: 1 + }, + serializedName: "resourceGroupName", + required: true, + type: { + name: "String" + } + } +}; + export const apiVersion1: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts index 33f5e5001a2d..977750a14a0b 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts @@ -502,8 +502,8 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.agentPoolName ], headerParameters: [Parameters.accept], @@ -535,8 +535,8 @@ const createOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.agentPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -560,8 +560,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.agentPoolName ], headerParameters: [Parameters.accept], @@ -593,8 +593,8 @@ const updateOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.agentPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -617,8 +617,8 @@ const listOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer @@ -639,8 +639,8 @@ const getQueueStatusOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.agentPoolName ], headerParameters: [Parameters.accept], @@ -657,13 +657,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, - Parameters.nextLink + Parameters.nextLink, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/cacheRules.ts b/sdk/containerregistry/arm-containerregistry/src/operations/cacheRules.ts new file mode 100644 index 000000000000..4a4fba6f9c08 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/cacheRules.ts @@ -0,0 +1,634 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { CacheRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClient } from "../containerRegistryManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + CacheRule, + CacheRulesListNextOptionalParams, + CacheRulesListOptionalParams, + CacheRulesListResponse, + CacheRulesGetOptionalParams, + CacheRulesGetResponse, + CacheRulesCreateOptionalParams, + CacheRulesCreateResponse, + CacheRulesDeleteOptionalParams, + CacheRuleUpdateParameters, + CacheRulesUpdateOptionalParams, + CacheRulesUpdateResponse, + CacheRulesListNextResponse +} from "../models"; + +/// +/** Class containing CacheRules operations. */ +export class CacheRulesImpl implements CacheRules { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class CacheRules class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all cache rule resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + registryName: string, + options?: CacheRulesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, registryName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + registryName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + registryName: string, + options?: CacheRulesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CacheRulesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, registryName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + registryName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + registryName: string, + options?: CacheRulesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all cache rule resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + registryName: string, + options?: CacheRulesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of the specified cache rule resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, cacheRuleName, options }, + getOperationSpec + ); + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleCreateParameters: CacheRule, + options?: CacheRulesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CacheRulesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleCreateParameters, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleCreateParameters: CacheRule, + options?: CacheRulesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a cache rule resource from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, registryName, cacheRuleName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a cache rule resource from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + cacheRuleName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleUpdateParameters: CacheRuleUpdateParameters, + options?: CacheRulesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CacheRulesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleUpdateParameters, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleUpdateParameters: CacheRuleUpdateParameters, + options?: CacheRulesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleUpdateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + registryName: string, + nextLink: string, + options?: CacheRulesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheRulesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.cacheRuleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CacheRule + }, + 201: { + bodyMapper: Mappers.CacheRule + }, + 202: { + bodyMapper: Mappers.CacheRule + }, + 204: { + bodyMapper: Mappers.CacheRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.cacheRuleCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.cacheRuleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.cacheRuleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/cacheRules/{cacheRuleName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CacheRule + }, + 201: { + bodyMapper: Mappers.CacheRule + }, + 202: { + bodyMapper: Mappers.CacheRule + }, + 204: { + bodyMapper: Mappers.CacheRule + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.cacheRuleUpdateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.cacheRuleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CacheRulesListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/connectedRegistries.ts b/sdk/containerregistry/arm-containerregistry/src/operations/connectedRegistries.ts index 64afef671c7d..969be0331208 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/connectedRegistries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/connectedRegistries.ts @@ -47,7 +47,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Lists all connected registries for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -123,7 +123,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Lists all connected registries for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -140,7 +140,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Gets the properties of the connected registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -159,7 +159,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Creates a connected registry for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. @@ -229,7 +229,8 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -237,7 +238,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Creates a connected registry for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. @@ -262,7 +263,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Deletes a connected registry from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -319,7 +320,8 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -327,7 +329,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Deletes a connected registry from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -349,7 +351,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Updates a connected registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. @@ -419,7 +421,8 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -427,7 +430,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Updates a connected registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. @@ -452,7 +455,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Deactivates the connected registry instance. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -509,7 +512,8 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -517,7 +521,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * Deactivates the connected registry instance. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -539,7 +543,7 @@ export class ConnectedRegistriesImpl implements ConnectedRegistries { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -731,7 +735,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/credentialSets.ts b/sdk/containerregistry/arm-containerregistry/src/operations/credentialSets.ts new file mode 100644 index 000000000000..65aff22f8573 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/credentialSets.ts @@ -0,0 +1,634 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { CredentialSets } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { ContainerRegistryManagementClient } from "../containerRegistryManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + CredentialSet, + CredentialSetsListNextOptionalParams, + CredentialSetsListOptionalParams, + CredentialSetsListResponse, + CredentialSetsGetOptionalParams, + CredentialSetsGetResponse, + CredentialSetsCreateOptionalParams, + CredentialSetsCreateResponse, + CredentialSetsDeleteOptionalParams, + CredentialSetUpdateParameters, + CredentialSetsUpdateOptionalParams, + CredentialSetsUpdateResponse, + CredentialSetsListNextResponse +} from "../models"; + +/// +/** Class containing CredentialSets operations. */ +export class CredentialSetsImpl implements CredentialSets { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class CredentialSets class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all credential set resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + registryName: string, + options?: CredentialSetsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, registryName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage( + resourceGroupName, + registryName, + options, + settings + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + registryName: string, + options?: CredentialSetsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: CredentialSetsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, registryName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + registryName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + registryName: string, + options?: CredentialSetsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all credential set resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + registryName: string, + options?: CredentialSetsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of the specified credential set resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, credentialSetName, options }, + getOperationSpec + ); + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetCreateParameters: CredentialSet, + options?: CredentialSetsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CredentialSetsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + registryName, + credentialSetName, + credentialSetCreateParameters, + options + }, + createOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetCreateParameters: CredentialSet, + options?: CredentialSetsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + credentialSetName, + credentialSetCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a credential set from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { resourceGroupName, registryName, credentialSetName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a credential set from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + credentialSetName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetUpdateParameters: CredentialSetUpdateParameters, + options?: CredentialSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CredentialSetsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = 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 = new LroImpl( + sendOperation, + { + resourceGroupName, + registryName, + credentialSetName, + credentialSetUpdateParameters, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetUpdateParameters: CredentialSetUpdateParameters, + options?: CredentialSetsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + registryName, + credentialSetName, + credentialSetUpdateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + registryName: string, + nextLink: string, + options?: CredentialSetsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialSetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialSet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.credentialSetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CredentialSet + }, + 201: { + bodyMapper: Mappers.CredentialSet + }, + 202: { + bodyMapper: Mappers.CredentialSet + }, + 204: { + bodyMapper: Mappers.CredentialSet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.credentialSetCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.credentialSetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.credentialSetName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/credentialSets/{credentialSetName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CredentialSet + }, + 201: { + bodyMapper: Mappers.CredentialSet + }, + 202: { + bodyMapper: Mappers.CredentialSet + }, + 204: { + bodyMapper: Mappers.CredentialSet + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.credentialSetUpdateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.credentialSetName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CredentialSetListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts index 246c9843ca0b..726734a10f4b 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts @@ -43,7 +43,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Lists all export pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -119,7 +119,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Lists all export pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -136,7 +136,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Gets the properties of the export pipeline. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. @@ -155,7 +155,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Creates an export pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param exportPipelineCreateParameters The parameters for creating an export pipeline. @@ -225,7 +225,8 @@ export class ExportPipelinesImpl implements ExportPipelines { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -233,7 +234,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Creates an export pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param exportPipelineCreateParameters The parameters for creating an export pipeline. @@ -258,7 +259,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Deletes an export pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. @@ -315,7 +316,8 @@ export class ExportPipelinesImpl implements ExportPipelines { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -323,7 +325,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * Deletes an export pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. @@ -345,7 +347,7 @@ export class ExportPipelinesImpl implements ExportPipelines { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -479,7 +481,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts index ae145bbc5959..18ac12165c85 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts @@ -43,7 +43,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Lists all import pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -119,7 +119,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Lists all import pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -136,7 +136,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Gets the properties of the import pipeline. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. @@ -155,7 +155,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Creates an import pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param importPipelineCreateParameters The parameters for creating an import pipeline. @@ -225,7 +225,8 @@ export class ImportPipelinesImpl implements ImportPipelines { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -233,7 +234,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Creates an import pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param importPipelineCreateParameters The parameters for creating an import pipeline. @@ -258,7 +259,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Deletes an import pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. @@ -315,7 +316,8 @@ export class ImportPipelinesImpl implements ImportPipelines { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -323,7 +325,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * Deletes an import pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. @@ -345,7 +347,7 @@ export class ImportPipelinesImpl implements ImportPipelines { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -479,7 +481,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts index 91121ffb11ec..a031cd3d488d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts @@ -6,7 +6,9 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./cacheRules"; export * from "./connectedRegistries"; +export * from "./credentialSets"; export * from "./exportPipelines"; export * from "./registries"; export * from "./importPipelines"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/operations.ts b/sdk/containerregistry/arm-containerregistry/src/operations/operations.ts index 25a018e27851..140cb37f24ef 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/operations.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/operations.ts @@ -137,7 +137,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts index 37035f5360f1..a7f815c3fc1d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts @@ -43,7 +43,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Lists all the pipeline runs for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -119,7 +119,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Lists all the pipeline runs for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -136,7 +136,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Gets the detailed information for a given pipeline run. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. @@ -155,7 +155,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Creates a pipeline run for a container registry with the specified parameters - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param pipelineRunCreateParameters The parameters for creating a pipeline run. @@ -225,7 +225,8 @@ export class PipelineRunsImpl implements PipelineRuns { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -233,7 +234,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Creates a pipeline run for a container registry with the specified parameters - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param pipelineRunCreateParameters The parameters for creating a pipeline run. @@ -258,7 +259,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Deletes a pipeline run from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. @@ -315,7 +316,8 @@ export class PipelineRunsImpl implements PipelineRuns { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -323,7 +325,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * Deletes a pipeline run from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. @@ -345,7 +347,7 @@ export class PipelineRunsImpl implements PipelineRuns { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -479,7 +481,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts index 45332b43292e..e7bfde981eb8 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts @@ -44,7 +44,7 @@ export class PrivateEndpointConnectionsImpl /** * List all private endpoint connections in a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -120,7 +120,7 @@ export class PrivateEndpointConnectionsImpl /** * List all private endpoint connections in a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -137,7 +137,7 @@ export class PrivateEndpointConnectionsImpl /** * Get the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -161,7 +161,7 @@ export class PrivateEndpointConnectionsImpl /** * Update the state of specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The parameters for creating a private endpoint connection. @@ -231,7 +231,8 @@ export class PrivateEndpointConnectionsImpl ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -239,7 +240,7 @@ export class PrivateEndpointConnectionsImpl /** * Update the state of specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The parameters for creating a private endpoint connection. @@ -264,7 +265,7 @@ export class PrivateEndpointConnectionsImpl /** * Deletes the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -326,7 +327,8 @@ export class PrivateEndpointConnectionsImpl ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -334,7 +336,7 @@ export class PrivateEndpointConnectionsImpl /** * Deletes the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -356,7 +358,7 @@ export class PrivateEndpointConnectionsImpl /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -469,7 +471,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnectionListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts index 583bed9968ca..1f5cb4aa2938 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts @@ -131,7 +131,7 @@ export class RegistriesImpl implements Registries { /** * Lists all the container registries under the specified resource group. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ public listByResourceGroup( @@ -200,7 +200,7 @@ export class RegistriesImpl implements Registries { /** * Lists the private link resources for a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -284,7 +284,7 @@ export class RegistriesImpl implements Registries { /** * Copies an image to this container registry from the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param parameters The parameters specifying the image to copy and the source container registry. * @param options The options parameters. @@ -341,7 +341,8 @@ export class RegistriesImpl implements Registries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -349,7 +350,7 @@ export class RegistriesImpl implements Registries { /** * Copies an image to this container registry from the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param parameters The parameters specifying the image to copy and the source container registry. * @param options The options parameters. @@ -397,7 +398,7 @@ export class RegistriesImpl implements Registries { /** * Lists all the container registries under the specified resource group. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ private _listByResourceGroup( @@ -412,7 +413,7 @@ export class RegistriesImpl implements Registries { /** * Gets the properties of the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -429,7 +430,7 @@ export class RegistriesImpl implements Registries { /** * Creates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registry The parameters for creating a container registry. * @param options The options parameters. @@ -491,7 +492,8 @@ export class RegistriesImpl implements Registries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -499,7 +501,7 @@ export class RegistriesImpl implements Registries { /** * Creates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registry The parameters for creating a container registry. * @param options The options parameters. @@ -521,7 +523,7 @@ export class RegistriesImpl implements Registries { /** * Deletes a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -576,7 +578,8 @@ export class RegistriesImpl implements Registries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -584,7 +587,7 @@ export class RegistriesImpl implements Registries { /** * Deletes a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -603,7 +606,7 @@ export class RegistriesImpl implements Registries { /** * Updates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registryUpdateParameters The parameters for updating a container registry. * @param options The options parameters. @@ -665,7 +668,8 @@ export class RegistriesImpl implements Registries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -673,7 +677,7 @@ export class RegistriesImpl implements Registries { /** * Updates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registryUpdateParameters The parameters for updating a container registry. * @param options The options parameters. @@ -695,7 +699,7 @@ export class RegistriesImpl implements Registries { /** * Gets the quota usages for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -712,7 +716,7 @@ export class RegistriesImpl implements Registries { /** * Lists the private link resources for a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -729,7 +733,7 @@ export class RegistriesImpl implements Registries { /** * Gets a private link resource by a specified group name for a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param groupName The name of the private link resource. * @param options The options parameters. @@ -748,7 +752,7 @@ export class RegistriesImpl implements Registries { /** * Lists the login credentials for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -765,7 +769,7 @@ export class RegistriesImpl implements Registries { /** * Regenerates one of the login credentials for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- * password or password2. @@ -790,7 +794,7 @@ export class RegistriesImpl implements Registries { /** * Generate keys for a token of a specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param generateCredentialsParameters The parameters for generating credentials. * @param options The options parameters. @@ -857,7 +861,8 @@ export class RegistriesImpl implements Registries { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -865,7 +870,7 @@ export class RegistriesImpl implements Registries { /** * Generate keys for a token of a specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param generateCredentialsParameters The parameters for generating credentials. * @param options The options parameters. @@ -1011,7 +1016,7 @@ export class RegistriesImpl implements Registries { /** * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @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. */ @@ -1028,7 +1033,7 @@ export class RegistriesImpl implements Registries { /** * ListPrivateLinkResourcesNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the ListPrivateLinkResources * method. @@ -1367,8 +1372,8 @@ const scheduleRunOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1390,8 +1395,8 @@ const getBuildSourceUploadUrlOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer @@ -1404,7 +1409,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.RegistryListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1421,7 +1425,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.RegistryListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1439,7 +1442,6 @@ const listPrivateLinkResourcesNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateLinkResourceListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts b/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts index 06e8fa6cb151..8854a757c594 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts @@ -46,7 +46,7 @@ export class ReplicationsImpl implements Replications { /** * Lists all the replications for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -122,7 +122,7 @@ export class ReplicationsImpl implements Replications { /** * Lists all the replications for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -139,7 +139,7 @@ export class ReplicationsImpl implements Replications { /** * Gets the properties of the specified replication. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -158,7 +158,7 @@ export class ReplicationsImpl implements Replications { /** * Creates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replication The parameters for creating a replication. @@ -228,7 +228,8 @@ export class ReplicationsImpl implements Replications { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -236,7 +237,7 @@ export class ReplicationsImpl implements Replications { /** * Creates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replication The parameters for creating a replication. @@ -261,7 +262,7 @@ export class ReplicationsImpl implements Replications { /** * Deletes a replication from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -318,7 +319,8 @@ export class ReplicationsImpl implements Replications { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -326,7 +328,7 @@ export class ReplicationsImpl implements Replications { /** * Deletes a replication from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -348,7 +350,7 @@ export class ReplicationsImpl implements Replications { /** * Updates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replicationUpdateParameters The parameters for updating a replication. @@ -418,7 +420,8 @@ export class ReplicationsImpl implements Replications { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -426,7 +429,7 @@ export class ReplicationsImpl implements Replications { /** * Updates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replicationUpdateParameters The parameters for updating a replication. @@ -451,7 +454,7 @@ export class ReplicationsImpl implements Replications { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -595,7 +598,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ReplicationListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts index b7b1f723b1ca..8041fc03d985 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts @@ -394,8 +394,8 @@ const listOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer @@ -416,8 +416,8 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.runId ], headerParameters: [Parameters.accept], @@ -449,8 +449,8 @@ const updateOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.runId ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -473,8 +473,8 @@ const getLogSasUrlOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.runId ], headerParameters: [Parameters.accept], @@ -497,8 +497,8 @@ const cancelOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.runId ], headerParameters: [Parameters.accept], @@ -515,13 +515,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.filter, Parameters.apiVersion1, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, - Parameters.nextLink + Parameters.nextLink, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts b/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts index 4c78e70578a1..aa64ca19816f 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts @@ -46,7 +46,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Lists all the scope maps for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -122,7 +122,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Lists all the scope maps for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -139,7 +139,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Gets the properties of the specified scope map. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -158,7 +158,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Creates a scope map for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapCreateParameters The parameters for creating a scope map. @@ -228,7 +228,8 @@ export class ScopeMapsImpl implements ScopeMaps { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -236,7 +237,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Creates a scope map for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapCreateParameters The parameters for creating a scope map. @@ -261,7 +262,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Deletes a scope map from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -318,7 +319,8 @@ export class ScopeMapsImpl implements ScopeMaps { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -326,7 +328,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Deletes a scope map from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -348,7 +350,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Updates a scope map with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapUpdateParameters The parameters for updating a scope map. @@ -418,7 +420,8 @@ export class ScopeMapsImpl implements ScopeMaps { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -426,7 +429,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * Updates a scope map with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapUpdateParameters The parameters for updating a scope map. @@ -451,7 +454,7 @@ export class ScopeMapsImpl implements ScopeMaps { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -619,7 +622,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts index 9ce3c99f1ad1..33056018da22 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts @@ -502,8 +502,8 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskRunName ], headerParameters: [Parameters.accept], @@ -535,8 +535,8 @@ const createOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskRunName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -560,8 +560,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskRunName ], headerParameters: [Parameters.accept], @@ -593,8 +593,8 @@ const updateOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskRunName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -617,8 +617,8 @@ const getDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskRunName ], headerParameters: [Parameters.accept], @@ -640,8 +640,8 @@ const listOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer @@ -657,13 +657,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, - Parameters.nextLink + Parameters.nextLink, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts index 8c02ff1a177a..db9afe760fab 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts @@ -502,8 +502,8 @@ const listOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.registryName + Parameters.registryName, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer @@ -524,8 +524,8 @@ const getOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskName ], headerParameters: [Parameters.accept], @@ -557,8 +557,8 @@ const createOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -582,8 +582,8 @@ const deleteOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskName ], headerParameters: [Parameters.accept], @@ -615,8 +615,8 @@ const updateOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -639,8 +639,8 @@ const getDetailsOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, + Parameters.resourceGroupName1, Parameters.taskName ], headerParameters: [Parameters.accept], @@ -657,13 +657,12 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.registryName, - Parameters.nextLink + Parameters.nextLink, + Parameters.resourceGroupName1 ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts b/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts index 24d7ddf01c8f..a4a221bd631d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts @@ -46,7 +46,7 @@ export class TokensImpl implements Tokens { /** * Lists all the tokens for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -122,7 +122,7 @@ export class TokensImpl implements Tokens { /** * Lists all the tokens for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -139,7 +139,7 @@ export class TokensImpl implements Tokens { /** * Gets the properties of the specified token. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -158,7 +158,7 @@ export class TokensImpl implements Tokens { /** * Creates a token for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenCreateParameters The parameters for creating a token. @@ -225,7 +225,8 @@ export class TokensImpl implements Tokens { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -233,7 +234,7 @@ export class TokensImpl implements Tokens { /** * Creates a token for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenCreateParameters The parameters for creating a token. @@ -258,7 +259,7 @@ export class TokensImpl implements Tokens { /** * Deletes a token from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -315,7 +316,8 @@ export class TokensImpl implements Tokens { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -323,7 +325,7 @@ export class TokensImpl implements Tokens { /** * Deletes a token from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -345,7 +347,7 @@ export class TokensImpl implements Tokens { /** * Updates a token with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenUpdateParameters The parameters for updating a token. @@ -412,7 +414,8 @@ export class TokensImpl implements Tokens { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -420,7 +423,7 @@ export class TokensImpl implements Tokens { /** * Updates a token with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenUpdateParameters The parameters for updating a token. @@ -445,7 +448,7 @@ export class TokensImpl implements Tokens { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -613,7 +616,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts b/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts index c11e48aa1e78..7e4dade256f0 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts @@ -56,7 +56,7 @@ export class WebhooksImpl implements Webhooks { /** * Lists all the webhooks for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -132,7 +132,7 @@ export class WebhooksImpl implements Webhooks { /** * Lists recent events for the specified webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -225,7 +225,7 @@ export class WebhooksImpl implements Webhooks { /** * Lists all the webhooks for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -242,7 +242,7 @@ export class WebhooksImpl implements Webhooks { /** * Gets the properties of the specified webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -261,7 +261,7 @@ export class WebhooksImpl implements Webhooks { /** * Creates a webhook for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookCreateParameters The parameters for creating a webhook. @@ -331,7 +331,8 @@ export class WebhooksImpl implements Webhooks { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -339,7 +340,7 @@ export class WebhooksImpl implements Webhooks { /** * Creates a webhook for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookCreateParameters The parameters for creating a webhook. @@ -364,7 +365,7 @@ export class WebhooksImpl implements Webhooks { /** * Deletes a webhook from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -421,7 +422,8 @@ export class WebhooksImpl implements Webhooks { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -429,7 +431,7 @@ export class WebhooksImpl implements Webhooks { /** * Deletes a webhook from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -451,7 +453,7 @@ export class WebhooksImpl implements Webhooks { /** * Updates a webhook with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookUpdateParameters The parameters for updating a webhook. @@ -521,7 +523,8 @@ export class WebhooksImpl implements Webhooks { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -529,7 +532,7 @@ export class WebhooksImpl implements Webhooks { /** * Updates a webhook with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookUpdateParameters The parameters for updating a webhook. @@ -554,7 +557,7 @@ export class WebhooksImpl implements Webhooks { /** * Triggers a ping event to be sent to the webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -573,7 +576,7 @@ export class WebhooksImpl implements Webhooks { /** * Lists recent events for the specified webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -592,7 +595,7 @@ export class WebhooksImpl implements Webhooks { /** * Gets the configuration of service URI and custom headers for the webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -611,7 +614,7 @@ export class WebhooksImpl implements Webhooks { /** * ListNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. @@ -630,7 +633,7 @@ export class WebhooksImpl implements Webhooks { /** * ListEventsNext - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param nextLink The nextLink from the previous successful call to the ListEvents method. @@ -836,7 +839,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WebhookListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -855,7 +857,6 @@ const listEventsNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.EventListResult } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/cacheRules.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/cacheRules.ts new file mode 100644 index 000000000000..ccf148378062 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/cacheRules.ts @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + CacheRule, + CacheRulesListOptionalParams, + CacheRulesGetOptionalParams, + CacheRulesGetResponse, + CacheRulesCreateOptionalParams, + CacheRulesCreateResponse, + CacheRulesDeleteOptionalParams, + CacheRuleUpdateParameters, + CacheRulesUpdateOptionalParams, + CacheRulesUpdateResponse +} from "../models"; + +/// +/** Interface representing a CacheRules. */ +export interface CacheRules { + /** + * Lists all cache rule resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + registryName: string, + options?: CacheRulesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified cache rule resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesGetOptionalParams + ): Promise; + /** + * Creates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleCreateParameters: CacheRule, + options?: CacheRulesCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CacheRulesCreateResponse + > + >; + /** + * Creates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleCreateParameters The parameters for creating a cache rule. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleCreateParameters: CacheRule, + options?: CacheRulesCreateOptionalParams + ): Promise; + /** + * Deletes a cache rule resource from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a cache rule resource from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + options?: CacheRulesDeleteOptionalParams + ): Promise; + /** + * Updates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleUpdateParameters: CacheRuleUpdateParameters, + options?: CacheRulesUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CacheRulesUpdateResponse + > + >; + /** + * Updates a cache rule for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param cacheRuleName The name of the cache rule. + * @param cacheRuleUpdateParameters The parameters for updating a cache rule. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + cacheRuleName: string, + cacheRuleUpdateParameters: CacheRuleUpdateParameters, + options?: CacheRulesUpdateOptionalParams + ): Promise; +} diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/connectedRegistries.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/connectedRegistries.ts index e4e3d805a9e6..f449917417ba 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/connectedRegistries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/connectedRegistries.ts @@ -27,7 +27,7 @@ import { export interface ConnectedRegistries { /** * Lists all connected registries for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -38,7 +38,7 @@ export interface ConnectedRegistries { ): PagedAsyncIterableIterator; /** * Gets the properties of the connected registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -51,7 +51,7 @@ export interface ConnectedRegistries { ): Promise; /** * Creates a connected registry for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. @@ -71,7 +71,7 @@ export interface ConnectedRegistries { >; /** * Creates a connected registry for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. @@ -86,7 +86,7 @@ export interface ConnectedRegistries { ): Promise; /** * Deletes a connected registry from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -99,7 +99,7 @@ export interface ConnectedRegistries { ): Promise, void>>; /** * Deletes a connected registry from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -112,7 +112,7 @@ export interface ConnectedRegistries { ): Promise; /** * Updates a connected registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. @@ -132,7 +132,7 @@ export interface ConnectedRegistries { >; /** * Updates a connected registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. @@ -147,7 +147,7 @@ export interface ConnectedRegistries { ): Promise; /** * Deactivates the connected registry instance. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. @@ -160,7 +160,7 @@ export interface ConnectedRegistries { ): Promise, void>>; /** * Deactivates the connected registry instance. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param connectedRegistryName The name of the connected registry. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/credentialSets.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/credentialSets.ts new file mode 100644 index 000000000000..486b9374ed4f --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/credentialSets.ts @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + CredentialSet, + CredentialSetsListOptionalParams, + CredentialSetsGetOptionalParams, + CredentialSetsGetResponse, + CredentialSetsCreateOptionalParams, + CredentialSetsCreateResponse, + CredentialSetsDeleteOptionalParams, + CredentialSetUpdateParameters, + CredentialSetsUpdateOptionalParams, + CredentialSetsUpdateResponse +} from "../models"; + +/// +/** Interface representing a CredentialSets. */ +export interface CredentialSets { + /** + * Lists all credential set resources for the specified container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + registryName: string, + options?: CredentialSetsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the specified credential set resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsGetOptionalParams + ): Promise; + /** + * Creates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetCreateParameters: CredentialSet, + options?: CredentialSetsCreateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CredentialSetsCreateResponse + > + >; + /** + * Creates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetCreateParameters The parameters for creating a credential set. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetCreateParameters: CredentialSet, + options?: CredentialSetsCreateOptionalParams + ): Promise; + /** + * Deletes a credential set from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a credential set from a container registry. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + options?: CredentialSetsDeleteOptionalParams + ): Promise; + /** + * Updates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetUpdateParameters: CredentialSetUpdateParameters, + options?: CredentialSetsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CredentialSetsUpdateResponse + > + >; + /** + * Updates a credential set for a container registry with the specified parameters. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param registryName The name of the container registry. + * @param credentialSetName The name of the credential set. + * @param credentialSetUpdateParameters The parameters for updating a credential set. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + credentialSetName: string, + credentialSetUpdateParameters: CredentialSetUpdateParameters, + options?: CredentialSetsUpdateOptionalParams + ): Promise; +} diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/exportPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/exportPipelines.ts index 10a274453990..009e4380b264 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/exportPipelines.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/exportPipelines.ts @@ -23,7 +23,7 @@ import { export interface ExportPipelines { /** * Lists all export pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -34,7 +34,7 @@ export interface ExportPipelines { ): PagedAsyncIterableIterator; /** * Gets the properties of the export pipeline. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. @@ -47,7 +47,7 @@ export interface ExportPipelines { ): Promise; /** * Creates an export pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param exportPipelineCreateParameters The parameters for creating an export pipeline. @@ -67,7 +67,7 @@ export interface ExportPipelines { >; /** * Creates an export pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param exportPipelineCreateParameters The parameters for creating an export pipeline. @@ -82,7 +82,7 @@ export interface ExportPipelines { ): Promise; /** * Deletes an export pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. @@ -95,7 +95,7 @@ export interface ExportPipelines { ): Promise, void>>; /** * Deletes an export pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param exportPipelineName The name of the export pipeline. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts index 4bba6e44007d..52ed6c067435 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts @@ -23,7 +23,7 @@ import { export interface ImportPipelines { /** * Lists all import pipelines for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -34,7 +34,7 @@ export interface ImportPipelines { ): PagedAsyncIterableIterator; /** * Gets the properties of the import pipeline. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. @@ -47,7 +47,7 @@ export interface ImportPipelines { ): Promise; /** * Creates an import pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param importPipelineCreateParameters The parameters for creating an import pipeline. @@ -67,7 +67,7 @@ export interface ImportPipelines { >; /** * Creates an import pipeline for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param importPipelineCreateParameters The parameters for creating an import pipeline. @@ -82,7 +82,7 @@ export interface ImportPipelines { ): Promise; /** * Deletes an import pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. @@ -95,7 +95,7 @@ export interface ImportPipelines { ): Promise, void>>; /** * Deletes an import pipeline from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param importPipelineName The name of the import pipeline. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts index 91121ffb11ec..a031cd3d488d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts @@ -6,7 +6,9 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./cacheRules"; export * from "./connectedRegistries"; +export * from "./credentialSets"; export * from "./exportPipelines"; export * from "./registries"; export * from "./importPipelines"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts index cbfd4e6fc119..2a3c6bf9bc3a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts @@ -23,7 +23,7 @@ import { export interface PipelineRuns { /** * Lists all the pipeline runs for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -34,7 +34,7 @@ export interface PipelineRuns { ): PagedAsyncIterableIterator; /** * Gets the detailed information for a given pipeline run. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. @@ -47,7 +47,7 @@ export interface PipelineRuns { ): Promise; /** * Creates a pipeline run for a container registry with the specified parameters - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param pipelineRunCreateParameters The parameters for creating a pipeline run. @@ -67,7 +67,7 @@ export interface PipelineRuns { >; /** * Creates a pipeline run for a container registry with the specified parameters - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param pipelineRunCreateParameters The parameters for creating a pipeline run. @@ -82,7 +82,7 @@ export interface PipelineRuns { ): Promise; /** * Deletes a pipeline run from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. @@ -95,7 +95,7 @@ export interface PipelineRuns { ): Promise, void>>; /** * Deletes a pipeline run from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param pipelineRunName The name of the pipeline run. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/privateEndpointConnections.ts index 1f9162ba41fb..788f9e56b579 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/privateEndpointConnections.ts @@ -23,7 +23,7 @@ import { export interface PrivateEndpointConnections { /** * List all private endpoint connections in a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -34,7 +34,7 @@ export interface PrivateEndpointConnections { ): PagedAsyncIterableIterator; /** * Get the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -47,7 +47,7 @@ export interface PrivateEndpointConnections { ): Promise; /** * Update the state of specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The parameters for creating a private endpoint connection. @@ -67,7 +67,7 @@ export interface PrivateEndpointConnections { >; /** * Update the state of specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param privateEndpointConnection The parameters for creating a private endpoint connection. @@ -82,7 +82,7 @@ export interface PrivateEndpointConnections { ): Promise; /** * Deletes the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. @@ -95,7 +95,7 @@ export interface PrivateEndpointConnections { ): Promise, void>>; /** * Deletes the specified private endpoint connection associated with the container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param privateEndpointConnectionName The name of the private endpoint connection. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/registries.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/registries.ts index aab401654796..7901698b0828 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/registries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/registries.ts @@ -58,7 +58,7 @@ export interface Registries { ): PagedAsyncIterableIterator; /** * Lists all the container registries under the specified resource group. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The options parameters. */ listByResourceGroup( @@ -67,7 +67,7 @@ export interface Registries { ): PagedAsyncIterableIterator; /** * Lists the private link resources for a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -78,7 +78,7 @@ export interface Registries { ): PagedAsyncIterableIterator; /** * Copies an image to this container registry from the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param parameters The parameters specifying the image to copy and the source container registry. * @param options The options parameters. @@ -91,7 +91,7 @@ export interface Registries { ): Promise, void>>; /** * Copies an image to this container registry from the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param parameters The parameters specifying the image to copy and the source container registry. * @param options The options parameters. @@ -114,7 +114,7 @@ export interface Registries { ): Promise; /** * Gets the properties of the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -125,7 +125,7 @@ export interface Registries { ): Promise; /** * Creates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registry The parameters for creating a container registry. * @param options The options parameters. @@ -143,7 +143,7 @@ export interface Registries { >; /** * Creates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registry The parameters for creating a container registry. * @param options The options parameters. @@ -156,7 +156,7 @@ export interface Registries { ): Promise; /** * Deletes a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -167,7 +167,7 @@ export interface Registries { ): Promise, void>>; /** * Deletes a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -178,7 +178,7 @@ export interface Registries { ): Promise; /** * Updates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registryUpdateParameters The parameters for updating a container registry. * @param options The options parameters. @@ -196,7 +196,7 @@ export interface Registries { >; /** * Updates a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param registryUpdateParameters The parameters for updating a container registry. * @param options The options parameters. @@ -209,7 +209,7 @@ export interface Registries { ): Promise; /** * Gets the quota usages for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -220,7 +220,7 @@ export interface Registries { ): Promise; /** * Gets a private link resource by a specified group name for a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param groupName The name of the private link resource. * @param options The options parameters. @@ -233,7 +233,7 @@ export interface Registries { ): Promise; /** * Lists the login credentials for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -244,7 +244,7 @@ export interface Registries { ): Promise; /** * Regenerates one of the login credentials for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param regenerateCredentialParameters Specifies name of the password which should be regenerated -- * password or password2. @@ -258,7 +258,7 @@ export interface Registries { ): Promise; /** * Generate keys for a token of a specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param generateCredentialsParameters The parameters for generating credentials. * @param options The options parameters. @@ -276,7 +276,7 @@ export interface Registries { >; /** * Generate keys for a token of a specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param generateCredentialsParameters The parameters for generating credentials. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/replications.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/replications.ts index d6a3010ba783..b2630c552ec1 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/replications.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/replications.ts @@ -26,7 +26,7 @@ import { export interface Replications { /** * Lists all the replications for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface Replications { ): PagedAsyncIterableIterator; /** * Gets the properties of the specified replication. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -50,7 +50,7 @@ export interface Replications { ): Promise; /** * Creates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replication The parameters for creating a replication. @@ -70,7 +70,7 @@ export interface Replications { >; /** * Creates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replication The parameters for creating a replication. @@ -85,7 +85,7 @@ export interface Replications { ): Promise; /** * Deletes a replication from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -98,7 +98,7 @@ export interface Replications { ): Promise, void>>; /** * Deletes a replication from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param options The options parameters. @@ -111,7 +111,7 @@ export interface Replications { ): Promise; /** * Updates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replicationUpdateParameters The parameters for updating a replication. @@ -131,7 +131,7 @@ export interface Replications { >; /** * Updates a replication for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param replicationName The name of the replication. * @param replicationUpdateParameters The parameters for updating a replication. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/scopeMaps.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/scopeMaps.ts index c8d7e91c41d0..4b05bf2f5257 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/scopeMaps.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/scopeMaps.ts @@ -26,7 +26,7 @@ import { export interface ScopeMaps { /** * Lists all the scope maps for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface ScopeMaps { ): PagedAsyncIterableIterator; /** * Gets the properties of the specified scope map. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -50,7 +50,7 @@ export interface ScopeMaps { ): Promise; /** * Creates a scope map for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapCreateParameters The parameters for creating a scope map. @@ -70,7 +70,7 @@ export interface ScopeMaps { >; /** * Creates a scope map for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapCreateParameters The parameters for creating a scope map. @@ -85,7 +85,7 @@ export interface ScopeMaps { ): Promise; /** * Deletes a scope map from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -98,7 +98,7 @@ export interface ScopeMaps { ): Promise, void>>; /** * Deletes a scope map from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param options The options parameters. @@ -111,7 +111,7 @@ export interface ScopeMaps { ): Promise; /** * Updates a scope map with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapUpdateParameters The parameters for updating a scope map. @@ -131,7 +131,7 @@ export interface ScopeMaps { >; /** * Updates a scope map with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param scopeMapName The name of the scope map. * @param scopeMapUpdateParameters The parameters for updating a scope map. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/tokens.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/tokens.ts index 3842697d99b3..89a2285e45d6 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/tokens.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/tokens.ts @@ -26,7 +26,7 @@ import { export interface Tokens { /** * Lists all the tokens for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -37,7 +37,7 @@ export interface Tokens { ): PagedAsyncIterableIterator; /** * Gets the properties of the specified token. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -50,7 +50,7 @@ export interface Tokens { ): Promise; /** * Creates a token for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenCreateParameters The parameters for creating a token. @@ -67,7 +67,7 @@ export interface Tokens { >; /** * Creates a token for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenCreateParameters The parameters for creating a token. @@ -82,7 +82,7 @@ export interface Tokens { ): Promise; /** * Deletes a token from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -95,7 +95,7 @@ export interface Tokens { ): Promise, void>>; /** * Deletes a token from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param options The options parameters. @@ -108,7 +108,7 @@ export interface Tokens { ): Promise; /** * Updates a token with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenUpdateParameters The parameters for updating a token. @@ -125,7 +125,7 @@ export interface Tokens { >; /** * Updates a token with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param tokenName The name of the token. * @param tokenUpdateParameters The parameters for updating a token. diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/webhooks.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/webhooks.ts index 5b6410d8480a..96da4c1e171a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/webhooks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/webhooks.ts @@ -33,7 +33,7 @@ import { export interface Webhooks { /** * Lists all the webhooks for the specified container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param options The options parameters. */ @@ -44,7 +44,7 @@ export interface Webhooks { ): PagedAsyncIterableIterator; /** * Lists recent events for the specified webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -57,7 +57,7 @@ export interface Webhooks { ): PagedAsyncIterableIterator; /** * Gets the properties of the specified webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -70,7 +70,7 @@ export interface Webhooks { ): Promise; /** * Creates a webhook for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookCreateParameters The parameters for creating a webhook. @@ -90,7 +90,7 @@ export interface Webhooks { >; /** * Creates a webhook for a container registry with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookCreateParameters The parameters for creating a webhook. @@ -105,7 +105,7 @@ export interface Webhooks { ): Promise; /** * Deletes a webhook from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -118,7 +118,7 @@ export interface Webhooks { ): Promise, void>>; /** * Deletes a webhook from a container registry. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -131,7 +131,7 @@ export interface Webhooks { ): Promise; /** * Updates a webhook with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookUpdateParameters The parameters for updating a webhook. @@ -151,7 +151,7 @@ export interface Webhooks { >; /** * Updates a webhook with the specified parameters. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param webhookUpdateParameters The parameters for updating a webhook. @@ -166,7 +166,7 @@ export interface Webhooks { ): Promise; /** * Triggers a ping event to be sent to the webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. @@ -179,7 +179,7 @@ export interface Webhooks { ): Promise; /** * Gets the configuration of service URI and custom headers for the webhook. - * @param resourceGroupName The name of the resource group to which the container registry belongs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param registryName The name of the container registry. * @param webhookName The name of the webhook. * @param options The options parameters. diff --git a/sdk/containerregistry/arm-containerregistry/src/pagingHelper.ts b/sdk/containerregistry/arm-containerregistry/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/containerregistry/arm-containerregistry/src/pagingHelper.ts +++ b/sdk/containerregistry/arm-containerregistry/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/containerregistry/arm-containerregistry/test/sampleTest.ts b/sdk/containerregistry/arm-containerregistry/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/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/containerregistry/arm-containerregistry/tsconfig.json b/sdk/containerregistry/arm-containerregistry/tsconfig.json index 87bcf4efb4f3..3e6ae96443f3 100644 --- a/sdk/containerregistry/arm-containerregistry/tsconfig.json +++ b/sdk/containerregistry/arm-containerregistry/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerregistry": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"