diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6d33bf3b27f3..61b2f856d30b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3825,7 +3825,7 @@ packages: dependencies: semver: 7.5.1 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230523 + typescript: 5.2.0-dev.20230524 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8368,14 +8368,20 @@ packages: hasBin: true dev: false + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/5.0.4: resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} engines: {node: '>=12.20'} hasBin: true dev: false - /typescript/5.2.0-dev.20230523: - resolution: {integrity: sha512-LrDMumdesS4xcmqzEwLqbg33EtWQeSSXqrydFklXphBiv5+aETXiyUnUStkje8syf4+6j0MQTW0KzijiLS+rew==} + /typescript/5.2.0-dev.20230524: + resolution: {integrity: sha512-1XzSUJCt31jm7jIZ3vBKzK46ZxnmqX2VdVg/dur9AIaz9WmidrABs7F8H8d4onpIV8RYD/L6xW6MXR5EHjl+LA==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -10752,7 +10758,7 @@ packages: dev: false file:projects/arm-containerregistry.tgz: - resolution: {integrity: sha512-UMr08I5LCo+VPxd/9Lz9T036Ev12nFD/YZTfeg6HYd+/dRKIbbvu6SopfMiUnFtOiUm8LG9foga3137c+hJ4yw==, tarball: file:projects/arm-containerregistry.tgz} + resolution: {integrity: sha512-B9P9PPU44gzL22mWZTZULnv/iPGeMPAX5akWk9baKYdBjVJpMR0gCrg9cFFTT5v9liR5NXYan93PDKHVIT7Bkg==, tarball: file:projects/arm-containerregistry.tgz} name: '@rush-temp/arm-containerregistry' version: 0.0.0 dependencies: @@ -10773,7 +10779,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_ehqevut6loiv2j3zjuhqc62mru tslib: 2.5.2 - typescript: 5.0.4 + typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: - supports-color diff --git a/sdk/containerregistry/arm-containerregistry/CHANGELOG.md b/sdk/containerregistry/arm-containerregistry/CHANGELOG.md index df1519e16334..ee812b63ddc1 100644 --- a/sdk/containerregistry/arm-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/arm-containerregistry/CHANGELOG.md @@ -1,15 +1,165 @@ # Release History + +## 10.2.0-beta.1 (2023-05-25) + +**Features** -## 10.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group CacheRules + - Added operation group ConnectedRegistries + - Added operation group CredentialSets + - Added operation group ExportPipelines + - Added operation group ImportPipelines + - Added operation group PipelineRuns + - Added Interface ActivationProperties + - 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 ExportPipeline + - Added Interface ExportPipelineListResult + - Added Interface ExportPipelinesCreateHeaders + - Added Interface ExportPipelinesCreateOptionalParams + - Added Interface ExportPipelinesDeleteHeaders + - Added Interface ExportPipelinesDeleteOptionalParams + - Added Interface ExportPipelinesGetOptionalParams + - Added Interface ExportPipelinesListNextOptionalParams + - Added Interface ExportPipelinesListOptionalParams + - Added Interface ExportPipelineTargetProperties + - Added Interface ImportPipeline + - Added Interface ImportPipelineListResult + - Added Interface ImportPipelinesCreateHeaders + - Added Interface ImportPipelinesCreateOptionalParams + - Added Interface ImportPipelinesDeleteHeaders + - Added Interface ImportPipelinesDeleteOptionalParams + - Added Interface ImportPipelinesGetOptionalParams + - Added Interface ImportPipelinesListNextOptionalParams + - Added Interface ImportPipelinesListOptionalParams + - Added Interface ImportPipelineSourceProperties + - Added Interface LoggingProperties + - Added Interface LoginServerProperties + - Added Interface ParentProperties + - Added Interface PipelineRun + - 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 + - Added Interface PipelineRunsListOptionalParams + - Added Interface PipelineRunSourceProperties + - Added Interface PipelineRunTargetProperties + - Added Interface PipelineSourceTriggerDescriptor + - Added Interface PipelineSourceTriggerProperties + - Added Interface PipelineTriggerDescriptor + - Added Interface PipelineTriggerProperties + - Added Interface ProgressProperties + - Added Interface SoftDeletePolicy + - Added Interface StatusDetailProperties + - Added Interface SyncProperties + - Added Interface SyncUpdateProperties + - Added Interface TlsCertificateProperties + - Added Interface TlsProperties + - 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 + - Added Type Alias ConnectedRegistriesListNextResponse + - Added Type Alias ConnectedRegistriesListResponse + - 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 + - Added Type Alias ExportPipelinesListResponse + - Added Type Alias ImportPipelinesCreateResponse + - Added Type Alias ImportPipelinesGetResponse + - Added Type Alias ImportPipelinesListNextResponse + - Added Type Alias ImportPipelinesListResponse + - Added Type Alias LogLevel + - Added Type Alias PipelineOptions + - Added Type Alias PipelineRunsCreateResponse + - Added Type Alias PipelineRunsGetResponse + - Added Type Alias PipelineRunsListNextResponse + - Added Type Alias PipelineRunsListResponse + - Added Type Alias PipelineRunSourceType + - Added Type Alias PipelineRunTargetType + - Added Type Alias PipelineSourceType + - Added Type Alias TlsStatus + - Interface Policies has a new optional parameter azureADAuthenticationAsArmPolicy + - Interface Policies has a new optional parameter softDeletePolicy + - Interface Registry has a new optional parameter anonymousPullEnabled + - Interface RegistryUpdateParameters has a new optional parameter anonymousPullEnabled + - 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 + - Added Enum KnownPipelineRunTargetType + - Added Enum KnownPipelineSourceType + - Added Enum KnownTlsStatus + + ## 10.1.0 (2023-03-21) **Features** diff --git a/sdk/containerregistry/arm-containerregistry/README.md b/sdk/containerregistry/arm-containerregistry/README.md index 80150a6ae8ac..d33f73c6a797 100644 --- a/sdk/containerregistry/arm-containerregistry/README.md +++ b/sdk/containerregistry/arm-containerregistry/README.md @@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerregistry/arm-containerregistry) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerregistry) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerregistry) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerregistry?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/containerregistry/arm-containerregistry/_meta.json b/sdk/containerregistry/arm-containerregistry/_meta.json index 7b00b971d697..a78f93780c56 100644 --- a/sdk/containerregistry/arm-containerregistry/_meta.json +++ b/sdk/containerregistry/arm-containerregistry/_meta.json @@ -1,8 +1,8 @@ { - "commit": "ddcde53422ff186f5b69fb32338ecac3d11c3bca", + "commit": "9eba6eb27c98106f70168a7a8842f30c308fa81a", "readme": "specification/containerregistry/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerregistry\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.10 --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.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/containerregistry/arm-containerregistry/package.json b/sdk/containerregistry/arm-containerregistry/package.json index a7661a17b32a..e51cd595edc2 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.1", + "version": "10.2.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~5.0.0", + "typescript": "~4.8.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "dotenv": "^16.0.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerregistry/arm-containerregistry", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerregistry?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerregistry/arm-containerregistry" +} \ 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 9de776fdab9c..12910e73b29e 100644 --- a/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md +++ b/sdk/containerregistry/arm-containerregistry/review/arm-containerregistry.api.md @@ -16,6 +16,14 @@ export type Action = string; // @public export type ActionsRequired = string; +// @public +export interface ActivationProperties { + readonly status?: ActivationStatus; +} + +// @public +export type ActivationStatus = string; + // @public export interface ActiveDirectoryObject { objectId?: string; @@ -135,6 +143,17 @@ export interface Argument { value: string; } +// @public +export type AuditLogStatus = string; + +// @public +export interface AuthCredential { + readonly credentialHealth?: CredentialHealth; + name?: CredentialName; + passwordSecretIdentifier?: string; + usernameSecretIdentifier?: string; +} + // @public export interface AuthInfo { expiresIn?: number; @@ -153,6 +172,14 @@ export interface AuthInfoUpdateParameters { tokenType?: TokenType; } +// @public +export interface AzureADAuthenticationAsArmPolicy { + status?: AzureADAuthenticationAsArmPolicyStatus; +} + +// @public +export type AzureADAuthenticationAsArmPolicyStatus = string; + // @public export interface BaseImageDependency { digest?: string; @@ -186,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?: { @@ -194,6 +316,135 @@ export interface CallbackConfig { serviceUri: string; } +// @public +export type CertificateType = string; + +// @public +export interface ConnectedRegistries { + beginCreate(resourceGroupName: string, registryName: string, connectedRegistryName: string, connectedRegistryCreateParameters: ConnectedRegistry, options?: ConnectedRegistriesCreateOptionalParams): Promise, ConnectedRegistriesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, connectedRegistryName: string, connectedRegistryCreateParameters: ConnectedRegistry, options?: ConnectedRegistriesCreateOptionalParams): Promise; + beginDeactivate(resourceGroupName: string, registryName: string, connectedRegistryName: string, options?: ConnectedRegistriesDeactivateOptionalParams): Promise, void>>; + beginDeactivateAndWait(resourceGroupName: string, registryName: string, connectedRegistryName: string, options?: ConnectedRegistriesDeactivateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, connectedRegistryName: string, options?: ConnectedRegistriesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, connectedRegistryName: string, options?: ConnectedRegistriesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, registryName: string, connectedRegistryName: string, connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, options?: ConnectedRegistriesUpdateOptionalParams): Promise, ConnectedRegistriesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, registryName: string, connectedRegistryName: string, connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, options?: ConnectedRegistriesUpdateOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, connectedRegistryName: string, options?: ConnectedRegistriesGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: ConnectedRegistriesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ConnectedRegistriesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface ConnectedRegistriesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @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; + updateIntervalInMs?: number; +} + +// @public +export interface ConnectedRegistriesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedRegistriesGetResponse = ConnectedRegistry; + +// @public +export interface ConnectedRegistriesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ConnectedRegistriesListNextResponse = ConnectedRegistryListResult; + +// @public +export interface ConnectedRegistriesListOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ConnectedRegistriesListResponse = ConnectedRegistryListResult; + +// @public +export interface ConnectedRegistriesUpdateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface ConnectedRegistriesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ConnectedRegistriesUpdateResponse = ConnectedRegistry; + +// @public +export interface ConnectedRegistry extends ProxyResource { + readonly activation?: ActivationProperties; + clientTokenIds?: string[]; + readonly connectionState?: ConnectionState; + readonly lastActivityTime?: Date; + logging?: LoggingProperties; + loginServer?: LoginServerProperties; + mode?: ConnectedRegistryMode; + notificationsList?: string[]; + parent?: ParentProperties; + readonly provisioningState?: ProvisioningState; + readonly statusDetails?: StatusDetailProperties[]; + readonly version?: string; +} + +// @public +export interface ConnectedRegistryListResult { + nextLink?: string; + value?: ConnectedRegistry[]; +} + +// @public +export type ConnectedRegistryMode = string; + +// @public +export interface ConnectedRegistryUpdateParameters { + clientTokenIds?: string[]; + logging?: LoggingProperties; + notificationsList?: string[]; + syncProperties?: SyncUpdateProperties; +} + +// @public +export type ConnectionState = string; + // @public export type ConnectionStatus = string; @@ -205,8 +456,20 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient // (undocumented) agentPools: AgentPools; // (undocumented) + cacheRules: CacheRules; + // (undocumented) + connectedRegistries: ConnectedRegistries; + // (undocumented) + credentialSets: CredentialSets; + // (undocumented) + exportPipelines: ExportPipelines; + // (undocumented) + importPipelines: ImportPipelines; + // (undocumented) operations: Operations; // (undocumented) + pipelineRuns: PipelineRuns; + // (undocumented) privateEndpointConnections: PrivateEndpointConnections; // (undocumented) registries: Registries; @@ -237,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?: { @@ -245,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; @@ -363,36 +735,116 @@ export interface EventContent { } // @public -export interface EventInfo { - id?: string; -} +export interface EventInfo { + id?: string; +} + +// @public +export interface EventListResult { + nextLink?: string; + value?: Event_2[]; +} + +// @public +export interface EventRequestMessage { + content?: EventContent; + headers?: { + [propertyName: string]: string; + }; + method?: string; + requestUri?: string; + version?: string; +} + +// @public +export interface EventResponseMessage { + content?: string; + headers?: { + [propertyName: string]: string; + }; + reasonPhrase?: string; + statusCode?: string; + version?: string; +} + +// @public +export interface ExportPipeline extends ProxyResource { + identity?: IdentityProperties; + location?: string; + options?: PipelineOptions[]; + readonly provisioningState?: ProvisioningState; + target?: ExportPipelineTargetProperties; +} + +// @public +export interface ExportPipelineListResult { + nextLink?: string; + value?: ExportPipeline[]; +} + +// @public +export interface ExportPipelines { + beginCreate(resourceGroupName: string, registryName: string, exportPipelineName: string, exportPipelineCreateParameters: ExportPipeline, options?: ExportPipelinesCreateOptionalParams): Promise, ExportPipelinesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, exportPipelineName: string, exportPipelineCreateParameters: ExportPipeline, options?: ExportPipelinesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: ExportPipelinesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: ExportPipelinesDeleteOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, exportPipelineName: string, options?: ExportPipelinesGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: ExportPipelinesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExportPipelinesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface ExportPipelinesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExportPipelinesCreateResponse = ExportPipeline; + +// @public +export interface ExportPipelinesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ExportPipelinesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ExportPipelinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExportPipelinesGetResponse = ExportPipeline; // @public -export interface EventListResult { - nextLink?: string; - value?: Event_2[]; +export interface ExportPipelinesListNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface EventRequestMessage { - content?: EventContent; - headers?: { - [propertyName: string]: string; - }; - method?: string; - requestUri?: string; - version?: string; +export type ExportPipelinesListNextResponse = ExportPipelineListResult; + +// @public +export interface ExportPipelinesListOptionalParams extends coreClient.OperationOptions { } // @public -export interface EventResponseMessage { - content?: string; - headers?: { - [propertyName: string]: string; - }; - reasonPhrase?: string; - statusCode?: string; - version?: string; +export type ExportPipelinesListResponse = ExportPipelineListResult; + +// @public +export interface ExportPipelineTargetProperties { + keyVaultUri: string; + type?: string; + uri?: string; } // @public @@ -484,6 +936,87 @@ export interface ImportImageParameters { // @public export type ImportMode = string; +// @public +export interface ImportPipeline extends ProxyResource { + identity?: IdentityProperties; + location?: string; + options?: PipelineOptions[]; + readonly provisioningState?: ProvisioningState; + source?: ImportPipelineSourceProperties; + trigger?: PipelineTriggerProperties; +} + +// @public +export interface ImportPipelineListResult { + nextLink?: string; + value?: ImportPipeline[]; +} + +// @public +export interface ImportPipelines { + beginCreate(resourceGroupName: string, registryName: string, importPipelineName: string, importPipelineCreateParameters: ImportPipeline, options?: ImportPipelinesCreateOptionalParams): Promise, ImportPipelinesCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, importPipelineName: string, importPipelineCreateParameters: ImportPipeline, options?: ImportPipelinesCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, importPipelineName: string, options?: ImportPipelinesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, importPipelineName: string, options?: ImportPipelinesDeleteOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, importPipelineName: string, options?: ImportPipelinesGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: ImportPipelinesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ImportPipelinesCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface ImportPipelinesCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ImportPipelinesCreateResponse = ImportPipeline; + +// @public +export interface ImportPipelinesDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface ImportPipelinesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ImportPipelinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImportPipelinesGetResponse = ImportPipeline; + +// @public +export interface ImportPipelinesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImportPipelinesListNextResponse = ImportPipelineListResult; + +// @public +export interface ImportPipelinesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ImportPipelinesListResponse = ImportPipelineListResult; + +// @public +export interface ImportPipelineSourceProperties { + keyVaultUri: string; + type?: PipelineSourceType; + uri?: string; +} + // @public (undocumented) export interface ImportSource { credentials?: ImportSourceCredentials; @@ -531,6 +1064,12 @@ export enum KnownActionsRequired { Recreate = "Recreate" } +// @public +export enum KnownActivationStatus { + Active = "Active", + Inactive = "Inactive" +} + // @public export enum KnownArchitecture { Amd64 = "amd64", @@ -540,6 +1079,18 @@ export enum KnownArchitecture { X86 = "x86" } +// @public +export enum KnownAuditLogStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + +// @public +export enum KnownAzureADAuthenticationAsArmPolicyStatus { + Disabled = "disabled", + Enabled = "enabled" +} + // @public export enum KnownBaseImageDependencyType { BuildTime = "BuildTime", @@ -552,6 +1103,27 @@ export enum KnownBaseImageTriggerType { Runtime = "Runtime" } +// @public +export enum KnownCertificateType { + LocalDirectory = "LocalDirectory" +} + +// @public +export enum KnownConnectedRegistryMode { + Mirror = "Mirror", + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite", + Registry = "Registry" +} + +// @public +export enum KnownConnectionState { + Offline = "Offline", + Online = "Online", + Syncing = "Syncing", + Unhealthy = "Unhealthy" +} + // @public export enum KnownConnectionStatus { Approved = "Approved", @@ -568,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", @@ -600,6 +1183,15 @@ export enum KnownLastModifiedByType { User = "User" } +// @public +export enum KnownLogLevel { + Debug = "Debug", + Error = "Error", + Information = "Information", + None = "None", + Warning = "Warning" +} + // @public export enum KnownNetworkRuleBypassOptions { AzureServices = "AzureServices", @@ -612,6 +1204,29 @@ export enum KnownOS { Windows = "Windows" } +// @public +export enum KnownPipelineOptions { + ContinueOnErrors = "ContinueOnErrors", + DeleteSourceBlobOnSuccess = "DeleteSourceBlobOnSuccess", + OverwriteBlobs = "OverwriteBlobs", + OverwriteTags = "OverwriteTags" +} + +// @public +export enum KnownPipelineRunSourceType { + AzureStorageBlob = "AzureStorageBlob" +} + +// @public +export enum KnownPipelineRunTargetType { + AzureStorageBlob = "AzureStorageBlob" +} + +// @public +export enum KnownPipelineSourceType { + AzureStorageBlobContainer = "AzureStorageBlobContainer" +} + // @public export enum KnownPolicyStatus { Disabled = "disabled", @@ -713,6 +1328,12 @@ export enum KnownTaskStatus { Enabled = "Enabled" } +// @public +export enum KnownTlsStatus { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownTokenCertificateName { Certificate1 = "certificate1", @@ -785,6 +1406,21 @@ export enum KnownZoneRedundancy { // @public export type LastModifiedByType = string; +// @public +export interface LoggingProperties { + auditLogStatus?: AuditLogStatus; + logLevel?: LogLevel; +} + +// @public +export interface LoginServerProperties { + readonly host?: string; + readonly tls?: TlsProperties; +} + +// @public +export type LogLevel = string; + // @public export type NetworkRuleBypassOptions = string; @@ -878,9 +1514,154 @@ export interface PackageType { name?: string; } +// @public +export interface ParentProperties { + id?: string; + syncProperties: SyncProperties; +} + // @public export type PasswordName = "password" | "password2"; +// @public +export type PipelineOptions = string; + +// @public +export interface PipelineRun extends ProxyResource { + forceUpdateTag?: string; + readonly provisioningState?: ProvisioningState; + request?: PipelineRunRequest; + readonly response?: PipelineRunResponse; +} + +// @public +export interface PipelineRunListResult { + nextLink?: string; + value?: PipelineRun[]; +} + +// @public +export interface PipelineRunRequest { + artifacts?: string[]; + catalogDigest?: string; + pipelineResourceId?: string; + source?: PipelineRunSourceProperties; + target?: PipelineRunTargetProperties; +} + +// @public +export interface PipelineRunResponse { + catalogDigest?: string; + finishTime?: Date; + importedArtifacts?: string[]; + pipelineRunErrorMessage?: string; + progress?: ProgressProperties; + source?: ImportPipelineSourceProperties; + startTime?: Date; + status?: string; + target?: ExportPipelineTargetProperties; + trigger?: PipelineTriggerDescriptor; +} + +// @public +export interface PipelineRuns { + beginCreate(resourceGroupName: string, registryName: string, pipelineRunName: string, pipelineRunCreateParameters: PipelineRun, options?: PipelineRunsCreateOptionalParams): Promise, PipelineRunsCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, registryName: string, pipelineRunName: string, pipelineRunCreateParameters: PipelineRun, options?: PipelineRunsCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: PipelineRunsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: PipelineRunsDeleteOptionalParams): Promise; + get(resourceGroupName: string, registryName: string, pipelineRunName: string, options?: PipelineRunsGetOptionalParams): Promise; + list(resourceGroupName: string, registryName: string, options?: PipelineRunsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface PipelineRunsCreateHeaders { + // (undocumented) + azureAsyncOperation?: string; +} + +// @public +export interface PipelineRunsCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type PipelineRunsCreateResponse = PipelineRun; + +// @public +export interface PipelineRunsDeleteHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface PipelineRunsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface PipelineRunsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelineRunsGetResponse = PipelineRun; + +// @public +export interface PipelineRunsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelineRunsListNextResponse = PipelineRunListResult; + +// @public +export interface PipelineRunsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type PipelineRunsListResponse = PipelineRunListResult; + +// @public (undocumented) +export interface PipelineRunSourceProperties { + name?: string; + type?: PipelineRunSourceType; +} + +// @public +export type PipelineRunSourceType = string; + +// @public (undocumented) +export interface PipelineRunTargetProperties { + name?: string; + type?: PipelineRunTargetType; +} + +// @public +export type PipelineRunTargetType = string; + +// @public (undocumented) +export interface PipelineSourceTriggerDescriptor { + timestamp?: Date; +} + +// @public (undocumented) +export interface PipelineSourceTriggerProperties { + status: TriggerStatus; +} + +// @public +export type PipelineSourceType = string; + +// @public (undocumented) +export interface PipelineTriggerDescriptor { + sourceTrigger?: PipelineSourceTriggerDescriptor; +} + +// @public (undocumented) +export interface PipelineTriggerProperties { + sourceTrigger?: PipelineSourceTriggerProperties; +} + // @public export interface PlatformProperties { architecture?: Architecture; @@ -897,9 +1678,11 @@ export interface PlatformUpdateParameters { // @public export interface Policies { + azureADAuthenticationAsArmPolicy?: AzureADAuthenticationAsArmPolicy; exportPolicy?: ExportPolicy; quarantinePolicy?: QuarantinePolicy; retentionPolicy?: RetentionPolicy; + softDeletePolicy?: SoftDeletePolicy; trustPolicy?: TrustPolicy; } @@ -1005,6 +1788,11 @@ export interface PrivateLinkServiceConnectionState { status?: ConnectionStatus; } +// @public (undocumented) +export interface ProgressProperties { + percentage?: string; +} + // @public export type ProvisioningState = string; @@ -1227,6 +2015,7 @@ export type RegistriesUpdateResponse = Registry; // @public export interface Registry extends Resource { adminUserEnabled?: boolean; + anonymousPullEnabled?: boolean; readonly creationDate?: Date; dataEndpointEnabled?: boolean; readonly dataEndpointHostNames?: string[]; @@ -1278,6 +2067,7 @@ export interface RegistryPassword { // @public export interface RegistryUpdateParameters { adminUserEnabled?: boolean; + anonymousPullEnabled?: boolean; dataEndpointEnabled?: boolean; encryption?: EncryptionProperty; identity?: IdentityProperties; @@ -1689,6 +2479,13 @@ export type SkuName = string; // @public export type SkuTier = string; +// @public +export interface SoftDeletePolicy { + readonly lastUpdatedTime?: Date; + retentionDays?: number; + status?: PolicyStatus; +} + // @public export interface Source { addr?: string; @@ -1765,6 +2562,15 @@ export interface Status { readonly timestamp?: Date; } +// @public +export interface StatusDetailProperties { + readonly code?: string; + readonly correlationId?: string; + readonly description?: string; + readonly timestamp?: Date; + readonly type?: string; +} + // @public export type StepType = string; @@ -1773,6 +2579,23 @@ export interface StorageAccountProperties { id: string; } +// @public +export interface SyncProperties { + readonly gatewayEndpoint?: string; + readonly lastSyncTime?: Date; + messageTtl: string; + schedule?: string; + syncWindow?: string; + tokenId: string; +} + +// @public +export interface SyncUpdateProperties { + messageTtl?: string; + schedule?: string; + syncWindow?: string; +} + // @public export interface SystemData { createdAt?: Date; @@ -2044,6 +2867,21 @@ export interface TimerTriggerUpdateParameters { status?: TriggerStatus; } +// @public +export interface TlsCertificateProperties { + readonly location?: string; + readonly type?: CertificateType; +} + +// @public +export interface TlsProperties { + readonly certificate?: TlsCertificateProperties; + readonly status?: TlsStatus; +} + +// @public +export type TlsStatus = string; + // @public export interface Token extends ProxyResource { readonly creationDate?: Date; diff --git a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts index 9dbee0188530..86d56f7ae15a 100644 --- a/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts +++ b/sdk/containerregistry/arm-containerregistry/src/containerRegistryManagementClient.ts @@ -10,8 +10,14 @@ 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, OperationsImpl, + PipelineRunsImpl, PrivateEndpointConnectionsImpl, ReplicationsImpl, ScopeMapsImpl, @@ -23,8 +29,14 @@ import { TasksImpl } from "./operations"; import { + CacheRules, + ConnectedRegistries, + CredentialSets, + ExportPipelines, Registries, + ImportPipelines, Operations, + PipelineRuns, PrivateEndpointConnections, Replications, ScopeMaps, @@ -68,7 +80,7 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient credential: credentials }; - const packageDetails = `azsdk-js-arm-containerregistry/10.1.1`; + const packageDetails = `azsdk-js-arm-containerregistry/10.2.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -121,8 +133,14 @@ 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); this.operations = new OperationsImpl(this); + this.pipelineRuns = new PipelineRunsImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.replications = new ReplicationsImpl(this); this.scopeMaps = new ScopeMapsImpl(this); @@ -134,8 +152,14 @@ export class ContainerRegistryManagementClient extends coreClient.ServiceClient this.tasks = new TasksImpl(this); } + cacheRules: CacheRules; + connectedRegistries: ConnectedRegistries; + credentialSets: CredentialSets; + exportPipelines: ExportPipelines; registries: Registries; + importPipelines: ImportPipelines; operations: Operations; + pipelineRuns: PipelineRuns; privateEndpointConnections: PrivateEndpointConnections; replications: Replications; scopeMaps: ScopeMaps; diff --git a/sdk/containerregistry/arm-containerregistry/src/models/index.ts b/sdk/containerregistry/arm-containerregistry/src/models/index.ts index a5d259413c81..f5a129a200f7 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/index.ts @@ -25,6 +25,326 @@ 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. */ + value?: ConnectedRegistry[]; + /** The URI that can be used to request the next list of connected registries. */ + nextLink?: string; +} + +/** The activation properties of the connected registry. */ +export interface ActivationProperties { + /** + * The activation status of the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ActivationStatus; +} + +/** The properties of the connected registry parent. */ +export interface ParentProperties { + /** The resource ID of the parent to which the connected registry will be associated. */ + id?: string; + /** The sync properties of the connected registry with its parent. */ + syncProperties: SyncProperties; +} + +/** The sync properties of the connected registry with its parent. */ +export interface SyncProperties { + /** The resource ID of the ACR token used to authenticate the connected registry to its parent during sync. */ + tokenId: string; + /** The cron expression indicating the schedule that the connected registry will sync with its parent. */ + schedule?: string; + /** The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. */ + syncWindow?: string; + /** The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. */ + messageTtl: string; + /** + * The last time a sync occurred between the connected registry and its parent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastSyncTime?: Date; + /** + * The gateway endpoint used by the connected registry to communicate with its parent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayEndpoint?: string; +} + +/** The login server properties of the connected registry. */ +export interface LoginServerProperties { + /** + * The host of the connected registry. Can be FQDN or IP. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly host?: string; + /** + * The TLS properties of the connected registry login server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tls?: TlsProperties; +} + +/** The TLS properties of the connected registry login server. */ +export interface TlsProperties { + /** + * Indicates whether HTTPS is enabled for the login server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: TlsStatus; + /** + * The certificate used to configure HTTPS for the login server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly certificate?: TlsCertificateProperties; +} + +/** The TLS certificate properties of the connected registry login server. */ +export interface TlsCertificateProperties { + /** + * The type of certificate location. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: CertificateType; + /** + * Indicates the location of the certificates. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; +} + +/** The logging properties of the connected registry. */ +export interface LoggingProperties { + /** The verbosity of logs persisted on the connected registry. */ + logLevel?: LogLevel; + /** Indicates whether audit logs are enabled on the connected registry. */ + auditLogStatus?: AuditLogStatus; +} + +/** The status detail properties of the connected registry. */ +export interface StatusDetailProperties { + /** + * The component of the connected registry corresponding to the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The code of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The description of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * The timestamp of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timestamp?: Date; + /** + * The correlation ID of the status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly correlationId?: string; +} + +/** The parameters for updating a connected registry. */ +export interface ConnectedRegistryUpdateParameters { + /** The sync properties of the connected registry with its parent. */ + syncProperties?: SyncUpdateProperties; + /** The logging properties of the connected registry. */ + logging?: LoggingProperties; + /** The list of the ACR token resource IDs used to authenticate clients to the connected registry. */ + clientTokenIds?: string[]; + /** The list of notifications subscription information for the connected registry. */ + notificationsList?: string[]; +} + +/** The parameters for updating the sync properties of the connected registry with its parent. */ +export interface SyncUpdateProperties { + /** The cron expression indicating the schedule that the connected registry will sync with its parent. */ + schedule?: string; + /** The time window during which sync is enabled for each schedule occurrence. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. */ + syncWindow?: string; + /** The period of time for which a message is available to sync before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. */ + messageTtl?: string; +} + +/** 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; +} + +/** Managed identity for the resource. */ +export interface IdentityProperties { + /** The principal ID of resource identity. */ + principalId?: string; + /** The tenant ID of resource. */ + tenantId?: string; + /** The identity type. */ + type?: ResourceIdentityType; + /** + * The list of user identities associated with the resource. The user identity + * dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + */ + userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; +} + +export interface UserIdentityProperties { + /** The principal id of user assigned identity. */ + principalId?: string; + /** The client id of user assigned identity. */ + 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. */ + type?: string; + /** + * The target uri of the export pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + uri?: string; + /** They key vault secret uri to obtain the target storage SAS token. */ + keyVaultUri: string; +} + export interface ImportImageParameters { /** The source of the image. */ source: ImportSource; @@ -59,6 +379,38 @@ export interface ImportSourceCredentials { password: string; } +/** The result of a request to list import pipelines for a container registry. */ +export interface ImportPipelineListResult { + /** The list of import pipelines. Since this list may be incomplete, the nextLink field should be used to request the next list of import pipelines. */ + value?: ImportPipeline[]; + /** The URI that can be used to request the next list of pipeline runs. */ + nextLink?: string; +} + +/** The properties of the import pipeline source. */ +export interface ImportPipelineSourceProperties { + /** The type of source for the import pipeline. */ + type?: PipelineSourceType; + /** + * The source uri of the import pipeline. + * When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + * When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName" + */ + uri?: string; + /** They key vault secret uri to obtain the source storage SAS token. */ + keyVaultUri: string; +} + +export interface PipelineTriggerProperties { + /** The source trigger properties of the pipeline. */ + sourceTrigger?: PipelineSourceTriggerProperties; +} + +export interface PipelineSourceTriggerProperties { + /** The current status of the source trigger. */ + status: TriggerStatus; +} + /** The result of a request to list container registry operations. */ export interface OperationListResult { /** The list of container registry operations. Since this list may be incomplete, the nextLink field should be used to request the next list of operations. */ @@ -148,6 +500,86 @@ export interface RegistryNameStatus { message?: string; } +/** The result of a request to list pipeline runs for a container registry. */ +export interface PipelineRunListResult { + /** The list of pipeline runs. Since this list may be incomplete, the nextLink field should be used to request the next list of pipeline runs. */ + value?: PipelineRun[]; + /** The URI that can be used to request the next list of pipeline runs. */ + nextLink?: string; +} + +/** The request properties provided for a pipeline run. */ +export interface PipelineRunRequest { + /** The resource ID of the pipeline to run. */ + pipelineResourceId?: string; + /** + * List of source artifacts to be transferred by the pipeline. + * Specify an image by repository ('hello-world'). This will use the 'latest' tag. + * Specify an image by tag ('hello-world:latest'). + * Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + */ + artifacts?: string[]; + /** The source properties of the pipeline run. */ + source?: PipelineRunSourceProperties; + /** The target properties of the pipeline run. */ + target?: PipelineRunTargetProperties; + /** The digest of the tar used to transfer the artifacts. */ + catalogDigest?: string; +} + +export interface PipelineRunSourceProperties { + /** The type of the source. */ + type?: PipelineRunSourceType; + /** The name of the source. */ + name?: string; +} + +export interface PipelineRunTargetProperties { + /** The type of the target. */ + type?: PipelineRunTargetType; + /** The name of the target. */ + name?: string; +} + +/** The response properties returned for a pipeline run. */ +export interface PipelineRunResponse { + /** The current status of the pipeline run. */ + status?: string; + /** The artifacts imported in the pipeline run. */ + importedArtifacts?: string[]; + /** The current progress of the copy operation. */ + progress?: ProgressProperties; + /** The time the pipeline run started. */ + startTime?: Date; + /** The time the pipeline run finished. */ + finishTime?: Date; + /** The source of the pipeline run. */ + source?: ImportPipelineSourceProperties; + /** The target of the pipeline run. */ + target?: ExportPipelineTargetProperties; + /** The digest of the tar used to transfer the artifacts. */ + catalogDigest?: string; + /** The trigger that caused the pipeline run. */ + trigger?: PipelineTriggerDescriptor; + /** The detailed error message for the pipeline run in the case of failure. */ + pipelineRunErrorMessage?: string; +} + +export interface ProgressProperties { + /** The percentage complete of the copy operation. */ + percentage?: string; +} + +export interface PipelineTriggerDescriptor { + /** The source trigger that caused the pipeline run. */ + sourceTrigger?: PipelineSourceTriggerDescriptor; +} + +export interface PipelineSourceTriggerDescriptor { + /** The timestamp when the source update happened. */ + timestamp?: Date; +} + /** The result of a request to list private endpoint connections for a container registry. */ export interface PrivateEndpointConnectionListResult { /** The list of private endpoint connections. Since this list may be incomplete, the nextLink field should be used to request the next list of private endpoint connections. */ @@ -172,46 +604,6 @@ export interface PrivateLinkServiceConnectionState { actionsRequired?: ActionsRequired; } -/** 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; -} - /** The result of a request to list container registries. */ export interface RegistryListResult { /** The list of container registries. Since this list may be incomplete, the nextLink field should be used to request the next list of container registries. */ @@ -231,30 +623,6 @@ export interface Sku { readonly tier?: SkuTier; } -/** Managed identity for the resource. */ -export interface IdentityProperties { - /** The principal ID of resource identity. */ - principalId?: string; - /** The tenant ID of resource. */ - tenantId?: string; - /** The identity type. */ - type?: ResourceIdentityType; - /** - * The list of user identities associated with the resource. The user identity - * dictionary key references will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ - * providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; -} - -export interface UserIdentityProperties { - /** The principal id of user assigned identity. */ - principalId?: string; - /** The client id of user assigned identity. */ - clientId?: string; -} - /** The status of an Azure resource at the time the operation was called. */ export interface Status { /** @@ -300,6 +668,10 @@ export interface Policies { retentionPolicy?: RetentionPolicy; /** The export policy for a container registry. */ exportPolicy?: ExportPolicy; + /** The policy for using ARM audience token for a container registry. */ + azureADAuthenticationAsArmPolicy?: AzureADAuthenticationAsArmPolicy; + /** The soft delete policy for a container registry. */ + softDeletePolicy?: SoftDeletePolicy; } /** The quarantine policy for a container registry. */ @@ -335,6 +707,25 @@ export interface ExportPolicy { status?: ExportPolicyStatus; } +/** The policy for using ARM audience token for a container registry. */ +export interface AzureADAuthenticationAsArmPolicy { + /** The value that indicates whether the policy is enabled or not. */ + status?: AzureADAuthenticationAsArmPolicyStatus; +} + +/** The soft delete policy for a container registry */ +export interface SoftDeletePolicy { + /** The number of days after which a soft-deleted item is permanently deleted. */ + retentionDays?: number; + /** + * The timestamp when the policy was last updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedTime?: Date; + /** The value that indicates whether the policy is enabled or not. */ + status?: PolicyStatus; +} + export interface EncryptionProperty { /** Indicates whether or not the encryption is enabled for container registry. */ status?: EncryptionStatus; @@ -414,6 +805,8 @@ export interface RegistryUpdateParameters { publicNetworkAccess?: PublicNetworkAccess; /** Whether to allow trusted Azure services to access a network restricted registry. */ networkRuleBypassOptions?: NetworkRuleBypassOptions; + /** Enables registry-wide pull from unauthenticated clients. */ + anonymousPullEnabled?: boolean; } /** The result of a request to get container registry quota usages. */ @@ -461,34 +854,6 @@ export interface PrivateLinkResource { requiredZoneNames?: string[]; } -/** 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 response from the ListCredentials operation. */ export interface RegistryListCredentialsResult { /** The username for a container registry. */ @@ -1277,32 +1642,178 @@ export interface Argument { isSecret?: boolean; } -/** The properties of a overridable value that can be passed to a task template. */ -export interface SetValue { - /** The name of the overridable value. */ - name: string; - /** The overridable value. */ - value: string; - /** Flag to indicate whether the value represents a secret or not. */ - isSecret?: boolean; +/** The properties of a overridable value that can be passed to a task template. */ +export interface SetValue { + /** The name of the overridable value. */ + name: string; + /** The overridable value. */ + value: string; + /** Flag to indicate whether the value represents a secret or not. */ + isSecret?: boolean; +} + +export interface OverrideTaskStepProperties { + /** The source context against which run has to be queued. */ + contextPath?: string; + /** The file against which run has to be queued. */ + file?: string; + /** + * Gets or sets the collection of override arguments to be used when + * executing a build step. + */ + arguments?: Argument[]; + /** The name of the target build stage for the docker build. */ + target?: string; + /** The collection of overridable values that can be passed when running a Task. */ + values?: SetValue[]; + /** Base64 encoded update trigger token that will be attached with the base image trigger webhook. */ + 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 { + /** + * Provisioning state of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; + /** The mode of the connected registry resource that indicates the permissions of the registry. */ + mode?: ConnectedRegistryMode; + /** + * The current version of ACR runtime on the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: string; + /** + * The current connection state of the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly connectionState?: ConnectionState; + /** + * The last activity time of the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastActivityTime?: Date; + /** + * The activation properties of the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activation?: ActivationProperties; + /** The parent of the connected registry. */ + parent?: ParentProperties; + /** The list of the ACR token resource IDs used to authenticate clients to the connected registry. */ + clientTokenIds?: string[]; + /** The login server properties of the connected registry. */ + loginServer?: LoginServerProperties; + /** The logging properties of the connected registry. */ + logging?: LoggingProperties; + /** + * The list of current statuses of the connected registry. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly statusDetails?: StatusDetailProperties[]; + /** The list of notifications subscription information for the connected registry. */ + 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. */ + location?: string; + /** The identity of the export pipeline. */ + identity?: IdentityProperties; + /** The target properties of the export pipeline. */ + target?: ExportPipelineTargetProperties; + /** The list of all options configured for the pipeline. */ + options?: PipelineOptions[]; + /** + * The provisioning state of the pipeline at the time the operation was called. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** An object that represents an import pipeline for a container registry. */ +export interface ImportPipeline extends ProxyResource { + /** The location of the import pipeline. */ + location?: string; + /** The identity of the import pipeline. */ + identity?: IdentityProperties; + /** The source properties of the import pipeline. */ + source?: ImportPipelineSourceProperties; + /** The properties that describe the trigger of the import pipeline. */ + trigger?: PipelineTriggerProperties; + /** The list of all options configured for the pipeline. */ + options?: PipelineOptions[]; + /** + * The provisioning state of the pipeline at the time the operation was called. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; } -export interface OverrideTaskStepProperties { - /** The source context against which run has to be queued. */ - contextPath?: string; - /** The file against which run has to be queued. */ - file?: string; +/** An object that represents a pipeline run for a container registry. */ +export interface PipelineRun extends ProxyResource { /** - * Gets or sets the collection of override arguments to be used when - * executing a build step. + * The provisioning state of a pipeline run. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - arguments?: Argument[]; - /** The name of the target build stage for the docker build. */ - target?: string; - /** The collection of overridable values that can be passed when running a Task. */ - values?: SetValue[]; - /** Base64 encoded update trigger token that will be attached with the base image trigger webhook. */ - updateTriggerToken?: string; + readonly provisioningState?: ProvisioningState; + /** The request parameters for a pipeline run. */ + request?: PipelineRunRequest; + /** + * The response of a pipeline run. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly response?: PipelineRunResponse; + /** How the pipeline run should be forced to recreate even if the pipeline run configuration has not changed. */ + forceUpdateTag?: string; } /** An object that represents a private endpoint connection for a container registry. */ @@ -1496,6 +2007,8 @@ export interface Registry extends Resource { networkRuleBypassOptions?: NetworkRuleBypassOptions; /** Whether or not zone redundancy is enabled for this container registry */ zoneRedundancy?: ZoneRedundancy; + /** Enables registry-wide pull from unauthenticated clients. */ + anonymousPullEnabled?: boolean; } /** An object that represents a replication for a container registry. */ @@ -1775,100 +2288,459 @@ export interface EncodedTaskStepUpdateParameters values?: SetValue[]; } -/** Defines headers for Registries_importImage operation. */ -export interface RegistriesImportImageHeaders { - location?: string; +/** 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 */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** + */ +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 */ + ReadWrite = "ReadWrite", + /** ReadOnly */ + ReadOnly = "ReadOnly", + /** Registry */ + Registry = "Registry", + /** Mirror */ + Mirror = "Mirror" } -/** Defines headers for Registries_create operation. */ -export interface RegistriesCreateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for ConnectedRegistryMode. \ + * {@link KnownConnectedRegistryMode} can be used interchangeably with ConnectedRegistryMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ReadWrite** \ + * **ReadOnly** \ + * **Registry** \ + * **Mirror** + */ +export type ConnectedRegistryMode = string; -/** Defines headers for Registries_delete operation. */ -export interface RegistriesDeleteHeaders { - location?: string; +/** Known values of {@link ConnectionState} that the service accepts. */ +export enum KnownConnectionState { + /** Online */ + Online = "Online", + /** Offline */ + Offline = "Offline", + /** Syncing */ + Syncing = "Syncing", + /** Unhealthy */ + Unhealthy = "Unhealthy" } -/** Defines headers for Registries_update operation. */ -export interface RegistriesUpdateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for ConnectionState. \ + * {@link KnownConnectionState} can be used interchangeably with ConnectionState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Online** \ + * **Offline** \ + * **Syncing** \ + * **Unhealthy** + */ +export type ConnectionState = string; -/** Defines headers for Registries_generateCredentials operation. */ -export interface RegistriesGenerateCredentialsHeaders { - location?: string; +/** Known values of {@link ActivationStatus} that the service accepts. */ +export enum KnownActivationStatus { + /** Active */ + Active = "Active", + /** Inactive */ + Inactive = "Inactive" } -/** Defines headers for PrivateEndpointConnections_createOrUpdate operation. */ -export interface PrivateEndpointConnectionsCreateOrUpdateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for ActivationStatus. \ + * {@link KnownActivationStatus} can be used interchangeably with ActivationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active** \ + * **Inactive** + */ +export type ActivationStatus = string; -/** Defines headers for PrivateEndpointConnections_delete operation. */ -export interface PrivateEndpointConnectionsDeleteHeaders { - location?: string; +/** Known values of {@link TlsStatus} that the service accepts. */ +export enum KnownTlsStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } -/** Defines headers for Replications_create operation. */ -export interface ReplicationsCreateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for TlsStatus. \ + * {@link KnownTlsStatus} can be used interchangeably with TlsStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type TlsStatus = string; -/** Defines headers for Replications_delete operation. */ -export interface ReplicationsDeleteHeaders { - location?: string; +/** Known values of {@link CertificateType} that the service accepts. */ +export enum KnownCertificateType { + /** LocalDirectory */ + LocalDirectory = "LocalDirectory" } -/** Defines headers for Replications_update operation. */ -export interface ReplicationsUpdateHeaders { - azureAsyncOperation?: string; +/** + * Defines values for CertificateType. \ + * {@link KnownCertificateType} can be used interchangeably with CertificateType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LocalDirectory** + */ +export type CertificateType = string; + +/** Known values of {@link LogLevel} that the service accepts. */ +export enum KnownLogLevel { + /** Debug */ + Debug = "Debug", + /** Information */ + Information = "Information", + /** Warning */ + Warning = "Warning", + /** Error */ + Error = "Error", + /** None */ + None = "None" } -/** Defines headers for ScopeMaps_create operation. */ -export interface ScopeMapsCreateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for LogLevel. \ + * {@link KnownLogLevel} can be used interchangeably with LogLevel, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Debug** \ + * **Information** \ + * **Warning** \ + * **Error** \ + * **None** + */ +export type LogLevel = string; -/** Defines headers for ScopeMaps_delete operation. */ -export interface ScopeMapsDeleteHeaders { - location?: string; +/** Known values of {@link AuditLogStatus} that the service accepts. */ +export enum KnownAuditLogStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } -/** Defines headers for ScopeMaps_update operation. */ -export interface ScopeMapsUpdateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for AuditLogStatus. \ + * {@link KnownAuditLogStatus} can be used interchangeably with AuditLogStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type AuditLogStatus = string; -/** Defines headers for Tokens_create operation. */ -export interface TokensCreateHeaders { - azureAsyncOperation?: string; +/** Known values of {@link CredentialName} that the service accepts. */ +export enum KnownCredentialName { + /** Credential1 */ + Credential1 = "Credential1" } -/** Defines headers for Tokens_delete operation. */ -export interface TokensDeleteHeaders { - location?: string; -} +/** + * 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 + * **Credential1** + */ +export type CredentialName = string; -/** Defines headers for Tokens_update operation. */ -export interface TokensUpdateHeaders { - azureAsyncOperation?: string; +/** Known values of {@link CredentialHealthStatus} that the service accepts. */ +export enum KnownCredentialHealthStatus { + /** Healthy */ + Healthy = "Healthy", + /** Unhealthy */ + Unhealthy = "Unhealthy" } -/** Defines headers for Webhooks_create operation. */ -export interface WebhooksCreateHeaders { - azureAsyncOperation?: string; -} +/** + * 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 + * **Healthy** \ + * **Unhealthy** + */ +export type CredentialHealthStatus = string; -/** Defines headers for Webhooks_delete operation. */ -export interface WebhooksDeleteHeaders { - location?: string; +/** Known values of {@link PipelineOptions} that the service accepts. */ +export enum KnownPipelineOptions { + /** OverwriteTags */ + OverwriteTags = "OverwriteTags", + /** OverwriteBlobs */ + OverwriteBlobs = "OverwriteBlobs", + /** DeleteSourceBlobOnSuccess */ + DeleteSourceBlobOnSuccess = "DeleteSourceBlobOnSuccess", + /** ContinueOnErrors */ + ContinueOnErrors = "ContinueOnErrors" } -/** Defines headers for Webhooks_update operation. */ -export interface WebhooksUpdateHeaders { - azureAsyncOperation?: string; -} +/** + * Defines values for PipelineOptions. \ + * {@link KnownPipelineOptions} can be used interchangeably with PipelineOptions, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OverwriteTags** \ + * **OverwriteBlobs** \ + * **DeleteSourceBlobOnSuccess** \ + * **ContinueOnErrors** + */ +export type PipelineOptions = string; /** Known values of {@link ImportMode} that the service accepts. */ export enum KnownImportMode { @@ -1888,6 +2760,69 @@ export enum KnownImportMode { */ export type ImportMode = string; +/** Known values of {@link PipelineSourceType} that the service accepts. */ +export enum KnownPipelineSourceType { + /** AzureStorageBlobContainer */ + AzureStorageBlobContainer = "AzureStorageBlobContainer" +} + +/** + * Defines values for PipelineSourceType. \ + * {@link KnownPipelineSourceType} can be used interchangeably with PipelineSourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureStorageBlobContainer** + */ +export type PipelineSourceType = string; + +/** Known values of {@link TriggerStatus} that the service accepts. */ +export enum KnownTriggerStatus { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled" +} + +/** + * Defines values for TriggerStatus. \ + * {@link KnownTriggerStatus} can be used interchangeably with TriggerStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type TriggerStatus = string; + +/** Known values of {@link PipelineRunSourceType} that the service accepts. */ +export enum KnownPipelineRunSourceType { + /** AzureStorageBlob */ + AzureStorageBlob = "AzureStorageBlob" +} + +/** + * Defines values for PipelineRunSourceType. \ + * {@link KnownPipelineRunSourceType} can be used interchangeably with PipelineRunSourceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureStorageBlob** + */ +export type PipelineRunSourceType = string; + +/** Known values of {@link PipelineRunTargetType} that the service accepts. */ +export enum KnownPipelineRunTargetType { + /** AzureStorageBlob */ + AzureStorageBlob = "AzureStorageBlob" +} + +/** + * Defines values for PipelineRunTargetType. \ + * {@link KnownPipelineRunTargetType} can be used interchangeably with PipelineRunTargetType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureStorageBlob** + */ +export type PipelineRunTargetType = string; + /** Known values of {@link ConnectionStatus} that the service accepts. */ export enum KnownConnectionStatus { /** Approved */ @@ -1930,84 +2865,6 @@ export enum KnownActionsRequired { */ export type ActionsRequired = string; -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Creating */ - Creating = "Creating", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled" -} - -/** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** - */ -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 SkuName} that the service accepts. */ export enum KnownSkuName { /** Classic */ @@ -2140,6 +2997,24 @@ export enum KnownExportPolicyStatus { */ export type ExportPolicyStatus = string; +/** Known values of {@link AzureADAuthenticationAsArmPolicyStatus} that the service accepts. */ +export enum KnownAzureADAuthenticationAsArmPolicyStatus { + /** Enabled */ + Enabled = "enabled", + /** Disabled */ + Disabled = "disabled" +} + +/** + * Defines values for AzureADAuthenticationAsArmPolicyStatus. \ + * {@link KnownAzureADAuthenticationAsArmPolicyStatus} can be used interchangeably with AzureADAuthenticationAsArmPolicyStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **enabled** \ + * **disabled** + */ +export type AzureADAuthenticationAsArmPolicyStatus = string; + /** Known values of {@link EncryptionStatus} that the service accepts. */ export enum KnownEncryptionStatus { /** Enabled */ @@ -2512,24 +3387,6 @@ export enum KnownBaseImageDependencyType { */ export type BaseImageDependencyType = string; -/** Known values of {@link TriggerStatus} that the service accepts. */ -export enum KnownTriggerStatus { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" -} - -/** - * Defines values for TriggerStatus. \ - * {@link KnownTriggerStatus} can be used interchangeably with TriggerStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** - */ -export type TriggerStatus = string; - /** Known values of {@link SourceControlType} that the service accepts. */ export enum KnownSourceControlType { /** Github */ @@ -2664,6 +3521,222 @@ 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 { + /** 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; +} + +/** Contains response data for the list operation. */ +export type ConnectedRegistriesListResponse = ConnectedRegistryListResult; + +/** Optional parameters. */ +export interface ConnectedRegistriesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ConnectedRegistriesGetResponse = ConnectedRegistry; + +/** Optional parameters. */ +export interface ConnectedRegistriesCreateOptionalParams + 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 ConnectedRegistriesCreateResponse = ConnectedRegistry; + +/** Optional parameters. */ +export interface ConnectedRegistriesDeleteOptionalParams + 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 ConnectedRegistriesUpdateOptionalParams + 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 ConnectedRegistriesUpdateResponse = ConnectedRegistry; + +/** Optional parameters. */ +export interface ConnectedRegistriesDeactivateOptionalParams + 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 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 { + /** 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 CredentialSetsListNextResponse = CredentialSetListResult; + +/** Optional parameters. */ +export interface ExportPipelinesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExportPipelinesListResponse = ExportPipelineListResult; + +/** Optional parameters. */ +export interface ExportPipelinesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExportPipelinesGetResponse = ExportPipeline; + +/** Optional parameters. */ +export interface ExportPipelinesCreateOptionalParams + 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 ExportPipelinesCreateResponse = ExportPipeline; + +/** Optional parameters. */ +export interface ExportPipelinesDeleteOptionalParams + 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 ExportPipelinesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ExportPipelinesListNextResponse = ExportPipelineListResult; + /** Optional parameters. */ export interface RegistriesImportImageOptionalParams extends coreClient.OperationOptions { @@ -2821,6 +3894,48 @@ export interface RegistriesListPrivateLinkResourcesNextOptionalParams /** Contains response data for the listPrivateLinkResourcesNext operation. */ export type RegistriesListPrivateLinkResourcesNextResponse = PrivateLinkResourceListResult; +/** Optional parameters. */ +export interface ImportPipelinesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ImportPipelinesListResponse = ImportPipelineListResult; + +/** Optional parameters. */ +export interface ImportPipelinesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ImportPipelinesGetResponse = ImportPipeline; + +/** Optional parameters. */ +export interface ImportPipelinesCreateOptionalParams + 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 ImportPipelinesCreateResponse = ImportPipeline; + +/** Optional parameters. */ +export interface ImportPipelinesDeleteOptionalParams + 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 ImportPipelinesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ImportPipelinesListNextResponse = ImportPipelineListResult; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -2835,6 +3950,48 @@ export interface OperationsListNextOptionalParams /** Contains response data for the listNext operation. */ export type OperationsListNextResponse = OperationListResult; +/** Optional parameters. */ +export interface PipelineRunsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type PipelineRunsListResponse = PipelineRunListResult; + +/** Optional parameters. */ +export interface PipelineRunsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type PipelineRunsGetResponse = PipelineRun; + +/** Optional parameters. */ +export interface PipelineRunsCreateOptionalParams + 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 PipelineRunsCreateResponse = PipelineRun; + +/** Optional parameters. */ +export interface PipelineRunsDeleteOptionalParams + 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 PipelineRunsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type PipelineRunsListNextResponse = PipelineRunListResult; + /** Optional parameters. */ export interface PrivateEndpointConnectionsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts index f1268ea30588..8691d6002745 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/mappers.ts @@ -8,43 +8,25 @@ import * as coreClient from "@azure/core-client"; -export const ImportImageParameters: coreClient.CompositeMapper = { +export const CacheRulesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportImageParameters", + className: "CacheRulesListResult", modelProperties: { - source: { - serializedName: "source", - type: { - name: "Composite", - className: "ImportSource" - } - }, - targetTags: { - serializedName: "targetTags", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - untaggedTargetRepositories: { - serializedName: "untaggedTargetRepositories", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "CacheRule" } } } }, - mode: { - defaultValue: "NoForce", - serializedName: "mode", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -53,156 +35,181 @@ export const ImportImageParameters: coreClient.CompositeMapper = { } }; -export const ImportSource: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportSource", + className: "ProxyResource", modelProperties: { - resourceId: { - serializedName: "resourceId", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - registryUri: { - serializedName: "registryUri", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - credentials: { - serializedName: "credentials", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Composite", - className: "ImportSourceCredentials" + name: "String" } }, - sourceImage: { - serializedName: "sourceImage", - required: true, + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } } }; -export const ImportSourceCredentials: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportSourceCredentials", + className: "SystemData", modelProperties: { - username: { - serializedName: "username", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - password: { - serializedName: "password", - required: true, + 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 OperationListResult: coreClient.CompositeMapper = { +export const ErrorResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "ErrorResponse", modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationDefinition" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + error: { + serializedName: "error", type: { - name: "String" + name: "Composite", + className: "ErrorResponseBody" } } } } }; -export const OperationDefinition: coreClient.CompositeMapper = { +export const ErrorResponseBody: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDefinition", + className: "ErrorResponseBody", modelProperties: { - origin: { - serializedName: "origin", + code: { + serializedName: "code", + required: true, type: { name: "String" } }, - name: { - serializedName: "name", + message: { + serializedName: "message", + required: true, type: { name: "String" } }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplayDefinition" - } - }, - isDataAction: { - serializedName: "isDataAction", + target: { + serializedName: "target", type: { - name: "Boolean" + name: "String" } }, - serviceSpecification: { - serializedName: "properties.serviceSpecification", + details: { + serializedName: "details", type: { - name: "Composite", - className: "OperationServiceSpecificationDefinition" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InnerErrorDescription" + } + } } } } } }; -export const OperationDisplayDefinition: coreClient.CompositeMapper = { +export const InnerErrorDescription: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplayDefinition", + className: "InnerErrorDescription", modelProperties: { - provider: { - serializedName: "provider", + code: { + serializedName: "code", + required: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + message: { + serializedName: "message", + required: true, type: { name: "String" } }, - operation: { - serializedName: "operation", + target: { + serializedName: "target", type: { name: "String" } - }, - description: { - serializedName: "description", + } + } + } +}; + +export const CacheRuleUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CacheRuleUpdateParameters", + modelProperties: { + credentialSetResourceId: { + serializedName: "properties.credentialSetResourceId", type: { name: "String" } @@ -211,103 +218,112 @@ export const OperationDisplayDefinition: coreClient.CompositeMapper = { } }; -export const OperationServiceSpecificationDefinition: coreClient.CompositeMapper = { +export const ConnectedRegistryListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationServiceSpecificationDefinition", + className: "ConnectedRegistryListResult", modelProperties: { - metricSpecifications: { - serializedName: "metricSpecifications", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "OperationMetricSpecificationDefinition" + className: "ConnectedRegistry" } } } }, - logSpecifications: { - serializedName: "logSpecifications", + nextLink: { + serializedName: "nextLink", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationLogSpecificationDefinition" - } - } + name: "String" } } } } }; -export const OperationMetricSpecificationDefinition: coreClient.CompositeMapper = { +export const ActivationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationMetricSpecificationDefinition", + className: "ActivationProperties", modelProperties: { - name: { - serializedName: "name", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } - }, - displayName: { - serializedName: "displayName", + } + } + } +}; + +export const ParentProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ParentProperties", + modelProperties: { + id: { + serializedName: "id", type: { name: "String" } }, - displayDescription: { - serializedName: "displayDescription", + syncProperties: { + serializedName: "syncProperties", + type: { + name: "Composite", + className: "SyncProperties" + } + } + } + } +}; + +export const SyncProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncProperties", + modelProperties: { + tokenId: { + serializedName: "tokenId", + required: true, type: { name: "String" } }, - unit: { - serializedName: "unit", + schedule: { + serializedName: "schedule", type: { name: "String" } }, - aggregationType: { - serializedName: "aggregationType", + syncWindow: { + serializedName: "syncWindow", type: { - name: "String" + name: "TimeSpan" } }, - internalMetricName: { - serializedName: "internalMetricName", + messageTtl: { + serializedName: "messageTtl", + required: true, type: { - name: "String" - } - } - } - } -}; - -export const OperationLogSpecificationDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationLogSpecificationDefinition", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" + name: "TimeSpan" } }, - displayName: { - serializedName: "displayName", + lastSyncTime: { + serializedName: "lastSyncTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - blobDuration: { - serializedName: "blobDuration", + gatewayEndpoint: { + serializedName: "gatewayEndpoint", + readOnly: true, type: { name: "String" } @@ -316,81 +332,67 @@ export const OperationLogSpecificationDefinition: coreClient.CompositeMapper = { } }; -export const RegistryNameCheckRequest: coreClient.CompositeMapper = { +export const LoginServerProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryNameCheckRequest", + className: "LoginServerProperties", modelProperties: { - name: { - constraints: { - Pattern: new RegExp("^[a-zA-Z0-9]*$"), - MaxLength: 50, - MinLength: 5 - }, - serializedName: "name", - required: true, + host: { + serializedName: "host", + readOnly: true, type: { name: "String" } }, - type: { - defaultValue: "Microsoft.ContainerRegistry/registries", - isConstant: true, - serializedName: "type", + tls: { + serializedName: "tls", type: { - name: "String" + name: "Composite", + className: "TlsProperties" } } } } }; -export const RegistryNameStatus: coreClient.CompositeMapper = { +export const TlsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryNameStatus", + className: "TlsProperties", modelProperties: { - nameAvailable: { - serializedName: "nameAvailable", - type: { - name: "Boolean" - } - }, - reason: { - serializedName: "reason", + status: { + serializedName: "status", + readOnly: true, type: { name: "String" } }, - message: { - serializedName: "message", + certificate: { + serializedName: "certificate", type: { - name: "String" + name: "Composite", + className: "TlsCertificateProperties" } } } } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const TlsCertificateProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "TlsCertificateProperties", modelProperties: { - value: { - serializedName: "value", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + location: { + serializedName: "location", + readOnly: true, type: { name: "String" } @@ -399,13 +401,21 @@ export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { } }; -export const PrivateEndpoint: coreClient.CompositeMapper = { +export const LoggingProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpoint", + className: "LoggingProperties", modelProperties: { - id: { - serializedName: "id", + logLevel: { + defaultValue: "Information", + serializedName: "logLevel", + type: { + name: "String" + } + }, + auditLogStatus: { + defaultValue: "Disabled", + serializedName: "auditLogStatus", type: { name: "String" } @@ -414,25 +424,42 @@ export const PrivateEndpoint: coreClient.CompositeMapper = { } }; -export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { +export const StatusDetailProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkServiceConnectionState", + className: "StatusDetailProperties", modelProperties: { - status: { - serializedName: "status", + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, description: { serializedName: "description", + readOnly: true, type: { name: "String" } }, - actionsRequired: { - serializedName: "actionsRequired", + timestamp: { + serializedName: "timestamp", + readOnly: true, + type: { + name: "DateTime" + } + }, + correlationId: { + serializedName: "correlationId", + readOnly: true, type: { name: "String" } @@ -441,92 +468,82 @@ export const PrivateLinkServiceConnectionState: 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", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + schedule: { + serializedName: "schedule", 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 RegistryListResult: coreClient.CompositeMapper = { +export const CredentialSetListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryListResult", + className: "CredentialSetListResult", modelProperties: { value: { serializedName: "value", @@ -535,7 +552,7 @@ export const RegistryListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Registry" + className: "CredentialSet" } } } @@ -550,29 +567,6 @@ export const RegistryListResult: coreClient.CompositeMapper = { } }; -export const Sku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Sku", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - tier: { - serializedName: "tier", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const IdentityProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -636,57 +630,87 @@ export const UserIdentityProperties: coreClient.CompositeMapper = { } }; -export const Status: coreClient.CompositeMapper = { +export const AuthCredential: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Status", + className: "AuthCredential", modelProperties: { - displayStatus: { - serializedName: "displayStatus", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + usernameSecretIdentifier: { + serializedName: "usernameSecretIdentifier", type: { name: "String" } }, - timestamp: { - serializedName: "timestamp", - readOnly: true, + passwordSecretIdentifier: { + serializedName: "passwordSecretIdentifier", type: { - name: "DateTime" + name: "String" + } + }, + credentialHealth: { + serializedName: "credentialHealth", + type: { + name: "Composite", + className: "CredentialHealth" } } } } }; -export const NetworkRuleSet: coreClient.CompositeMapper = { +export const CredentialHealth: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NetworkRuleSet", + className: "CredentialHealth", modelProperties: { - defaultAction: { - defaultValue: "Allow", - serializedName: "defaultAction", - required: true, + status: { + serializedName: "status", type: { name: "String" } }, - ipRules: { - serializedName: "ipRules", + errorCode: { + serializedName: "errorCode", + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "errorMessage", + type: { + name: "String" + } + } + } + } +}; + +export const CredentialSetUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CredentialSetUpdateParameters", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + authCredentials: { + serializedName: "properties.authCredentials", type: { name: "Sequence", element: { type: { name: "Composite", - className: "IPRule" + className: "AuthCredential" } } } @@ -695,20 +719,52 @@ export const NetworkRuleSet: coreClient.CompositeMapper = { } }; -export const IPRule: coreClient.CompositeMapper = { +export const ExportPipelineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IPRule", + className: "ExportPipelineListResult", modelProperties: { - action: { - defaultValue: "Allow", - serializedName: "action", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExportPipeline" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ExportPipelineTargetProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExportPipelineTargetProperties", + modelProperties: { + type: { + serializedName: "type", type: { name: "String" } }, - iPAddressOrRange: { - serializedName: "value", + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + keyVaultUri: { + serializedName: "keyVaultUri", required: true, type: { name: "String" @@ -718,50 +774,78 @@ export const IPRule: coreClient.CompositeMapper = { } }; -export const Policies: coreClient.CompositeMapper = { +export const ImportImageParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Policies", + className: "ImportImageParameters", modelProperties: { - quarantinePolicy: { - serializedName: "quarantinePolicy", + source: { + serializedName: "source", type: { name: "Composite", - className: "QuarantinePolicy" + className: "ImportSource" } }, - trustPolicy: { - serializedName: "trustPolicy", + targetTags: { + serializedName: "targetTags", type: { - name: "Composite", - className: "TrustPolicy" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - retentionPolicy: { - serializedName: "retentionPolicy", + untaggedTargetRepositories: { + serializedName: "untaggedTargetRepositories", type: { - name: "Composite", - className: "RetentionPolicy" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - exportPolicy: { - serializedName: "exportPolicy", + mode: { + defaultValue: "NoForce", + serializedName: "mode", type: { - name: "Composite", - className: "ExportPolicy" + name: "String" } } } } }; -export const QuarantinePolicy: coreClient.CompositeMapper = { +export const ImportSource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QuarantinePolicy", + className: "ImportSource", modelProperties: { - status: { - serializedName: "status", + resourceId: { + serializedName: "resourceId", + type: { + name: "String" + } + }, + registryUri: { + serializedName: "registryUri", + type: { + name: "String" + } + }, + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "ImportSourceCredentials" + } + }, + sourceImage: { + serializedName: "sourceImage", + required: true, type: { name: "String" } @@ -770,20 +854,20 @@ export const QuarantinePolicy: coreClient.CompositeMapper = { } }; -export const TrustPolicy: coreClient.CompositeMapper = { +export const ImportSourceCredentials: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrustPolicy", + className: "ImportSourceCredentials", modelProperties: { - type: { - defaultValue: "Notary", - serializedName: "type", + username: { + serializedName: "username", type: { name: "String" } }, - status: { - serializedName: "status", + password: { + serializedName: "password", + required: true, type: { name: "String" } @@ -792,27 +876,54 @@ export const TrustPolicy: coreClient.CompositeMapper = { } }; -export const RetentionPolicy: coreClient.CompositeMapper = { +export const ImportPipelineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RetentionPolicy", + className: "ImportPipelineListResult", modelProperties: { - days: { - defaultValue: 7, - serializedName: "days", + value: { + serializedName: "value", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ImportPipeline" + } + } } }, - lastUpdatedTime: { - serializedName: "lastUpdatedTime", - readOnly: true, + nextLink: { + serializedName: "nextLink", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const ImportPipelineSourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportPipelineSourceProperties", + modelProperties: { + type: { + defaultValue: "AzureStorageBlobContainer", + serializedName: "type", + type: { + name: "String" } }, - status: { - serializedName: "status", + uri: { + serializedName: "uri", + type: { + name: "String" + } + }, + keyVaultUri: { + serializedName: "keyVaultUri", + required: true, type: { name: "String" } @@ -821,204 +932,236 @@ export const RetentionPolicy: coreClient.CompositeMapper = { } }; -export const ExportPolicy: coreClient.CompositeMapper = { +export const PipelineTriggerProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExportPolicy", + className: "PipelineTriggerProperties", modelProperties: { - status: { - defaultValue: "enabled", - serializedName: "status", + sourceTrigger: { + serializedName: "sourceTrigger", type: { - name: "String" + name: "Composite", + className: "PipelineSourceTriggerProperties" } } } } }; -export const EncryptionProperty: coreClient.CompositeMapper = { +export const PipelineSourceTriggerProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EncryptionProperty", + className: "PipelineSourceTriggerProperties", modelProperties: { status: { serializedName: "status", + required: true, type: { name: "String" } + } + } + } +}; + +export const OperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationDefinition" + } + } + } }, - keyVaultProperties: { - serializedName: "keyVaultProperties", + nextLink: { + serializedName: "nextLink", type: { - name: "Composite", - className: "KeyVaultProperties" + name: "String" } } } } }; -export const KeyVaultProperties: coreClient.CompositeMapper = { +export const OperationDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultProperties", + className: "OperationDefinition", modelProperties: { - keyIdentifier: { - serializedName: "keyIdentifier", + origin: { + serializedName: "origin", type: { name: "String" } }, - versionedKeyIdentifier: { - serializedName: "versionedKeyIdentifier", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - identity: { - serializedName: "identity", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplayDefinition" } }, - keyRotationEnabled: { - serializedName: "keyRotationEnabled", - readOnly: true, + isDataAction: { + serializedName: "isDataAction", type: { name: "Boolean" } }, - lastKeyRotationTimestamp: { - serializedName: "lastKeyRotationTimestamp", - readOnly: true, + serviceSpecification: { + serializedName: "properties.serviceSpecification", type: { - name: "DateTime" + name: "Composite", + className: "OperationServiceSpecificationDefinition" } } } } }; -export const Resource: coreClient.CompositeMapper = { +export const OperationDisplayDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "OperationDisplayDefinition", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + provider: { + serializedName: "provider", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + resource: { + serializedName: "resource", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + operation: { + serializedName: "operation", type: { name: "String" } }, - location: { - serializedName: "location", - required: true, + description: { + serializedName: "description", type: { name: "String" } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const OperationServiceSpecificationDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationServiceSpecificationDefinition", + modelProperties: { + metricSpecifications: { + serializedName: "metricSpecifications", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationMetricSpecificationDefinition" + } + } } }, - systemData: { - serializedName: "systemData", + logSpecifications: { + serializedName: "logSpecifications", type: { - name: "Composite", - className: "SystemData" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OperationLogSpecificationDefinition" + } + } } } } } }; -export const RegistryUpdateParameters: coreClient.CompositeMapper = { +export const OperationMetricSpecificationDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryUpdateParameters", + className: "OperationMetricSpecificationDefinition", modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "IdentityProperties" - } - }, - tags: { - serializedName: "tags", + name: { + serializedName: "name", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - sku: { - serializedName: "sku", + displayName: { + serializedName: "displayName", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - adminUserEnabled: { - serializedName: "properties.adminUserEnabled", + displayDescription: { + serializedName: "displayDescription", type: { - name: "Boolean" + name: "String" } }, - networkRuleSet: { - serializedName: "properties.networkRuleSet", + unit: { + serializedName: "unit", type: { - name: "Composite", - className: "NetworkRuleSet" + name: "String" } }, - policies: { - serializedName: "properties.policies", + aggregationType: { + serializedName: "aggregationType", type: { - name: "Composite", - className: "Policies" + name: "String" } }, - encryption: { - serializedName: "properties.encryption", + internalMetricName: { + serializedName: "internalMetricName", type: { - name: "Composite", - className: "EncryptionProperty" + name: "String" } - }, - dataEndpointEnabled: { - serializedName: "properties.dataEndpointEnabled", + } + } + } +}; + +export const OperationLogSpecificationDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationLogSpecificationDefinition", + modelProperties: { + name: { + serializedName: "name", type: { - name: "Boolean" + name: "String" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - networkRuleBypassOptions: { - serializedName: "properties.networkRuleBypassOptions", + blobDuration: { + serializedName: "blobDuration", type: { name: "String" } @@ -1027,52 +1170,54 @@ export const RegistryUpdateParameters: coreClient.CompositeMapper = { } }; -export const RegistryUsageListResult: coreClient.CompositeMapper = { +export const RegistryNameCheckRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryUsageListResult", + className: "RegistryNameCheckRequest", modelProperties: { - value: { - serializedName: "value", + name: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegistryUsage" - } - } + name: "String" + } + }, + type: { + defaultValue: "Microsoft.ContainerRegistry/registries", + isConstant: true, + serializedName: "type", + type: { + name: "String" } } } } }; -export const RegistryUsage: coreClient.CompositeMapper = { +export const RegistryNameStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryUsage", + className: "RegistryNameStatus", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - limit: { - serializedName: "limit", + nameAvailable: { + serializedName: "nameAvailable", type: { - name: "Number" + name: "Boolean" } }, - currentValue: { - serializedName: "currentValue", + reason: { + serializedName: "reason", type: { - name: "Number" + name: "String" } }, - unit: { - serializedName: "unit", + message: { + serializedName: "message", type: { name: "String" } @@ -1081,10 +1226,10 @@ export const RegistryUsage: coreClient.CompositeMapper = { } }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const PipelineRunListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "PipelineRunListResult", modelProperties: { value: { serializedName: "value", @@ -1093,7 +1238,7 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "PipelineRun" } } } @@ -1108,140 +1253,166 @@ export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { } }; -export const PrivateLinkResource: coreClient.CompositeMapper = { +export const PipelineRunRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResource", + className: "PipelineRunRequest", modelProperties: { - type: { - serializedName: "type", - readOnly: true, + pipelineResourceId: { + serializedName: "pipelineResourceId", type: { name: "String" } }, - id: { - serializedName: "id", + artifacts: { + serializedName: "artifacts", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - name: { - serializedName: "name", + source: { + serializedName: "source", type: { - name: "String" + name: "Composite", + className: "PipelineRunSourceProperties" } }, - groupId: { - serializedName: "properties.groupId", + target: { + serializedName: "target", type: { - name: "String" + name: "Composite", + className: "PipelineRunTargetProperties" } }, - requiredMembers: { - serializedName: "properties.requiredMembers", + catalogDigest: { + serializedName: "catalogDigest", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" + } + } + } + } +}; + +export const PipelineRunSourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineRunSourceProperties", + modelProperties: { + type: { + defaultValue: "AzureStorageBlob", + serializedName: "type", + type: { + name: "String" } }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", + name: { + serializedName: "name", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ErrorResponse: coreClient.CompositeMapper = { +export const PipelineRunTargetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponse", + className: "PipelineRunTargetProperties", modelProperties: { - error: { - serializedName: "error", + type: { + defaultValue: "AzureStorageBlob", + serializedName: "type", type: { - name: "Composite", - className: "ErrorResponseBody" + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" } } } } }; -export const ErrorResponseBody: coreClient.CompositeMapper = { +export const PipelineRunResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ErrorResponseBody", + className: "PipelineRunResponse", modelProperties: { - code: { - serializedName: "code", - required: true, + status: { + serializedName: "status", type: { name: "String" } }, - message: { - serializedName: "message", - required: true, + importedArtifacts: { + serializedName: "importedArtifacts", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - target: { - serializedName: "target", + progress: { + serializedName: "progress", type: { - name: "String" + name: "Composite", + className: "ProgressProperties" } }, - details: { - serializedName: "details", + startTime: { + serializedName: "startTime", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InnerErrorDescription" - } - } + name: "DateTime" } - } - } - } -}; - -export const InnerErrorDescription: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InnerErrorDescription", - modelProperties: { - code: { - serializedName: "code", - required: true, + }, + finishTime: { + serializedName: "finishTime", type: { - name: "String" + name: "DateTime" } }, - message: { - serializedName: "message", - required: true, + source: { + serializedName: "source", type: { - name: "String" + name: "Composite", + className: "ImportPipelineSourceProperties" } }, target: { serializedName: "target", + type: { + name: "Composite", + className: "ExportPipelineTargetProperties" + } + }, + catalogDigest: { + serializedName: "catalogDigest", + type: { + name: "String" + } + }, + trigger: { + serializedName: "trigger", + type: { + name: "Composite", + className: "PipelineTriggerDescriptor" + } + }, + pipelineRunErrorMessage: { + serializedName: "pipelineRunErrorMessage", type: { name: "String" } @@ -1250,76 +1421,56 @@ export const InnerErrorDescription: coreClient.CompositeMapper = { } }; -export const RegistryListCredentialsResult: coreClient.CompositeMapper = { +export const ProgressProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryListCredentialsResult", + className: "ProgressProperties", modelProperties: { - username: { - serializedName: "username", + percentage: { + serializedName: "percentage", type: { name: "String" } - }, - passwords: { - serializedName: "passwords", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RegistryPassword" - } - } - } } } } }; -export const RegistryPassword: coreClient.CompositeMapper = { +export const PipelineTriggerDescriptor: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegistryPassword", + className: "PipelineTriggerDescriptor", modelProperties: { - name: { - serializedName: "name", - type: { - name: "Enum", - allowedValues: ["password", "password2"] - } - }, - value: { - serializedName: "value", + sourceTrigger: { + serializedName: "sourceTrigger", type: { - name: "String" + name: "Composite", + className: "PipelineSourceTriggerDescriptor" } } } } }; -export const RegenerateCredentialParameters: coreClient.CompositeMapper = { +export const PipelineSourceTriggerDescriptor: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegenerateCredentialParameters", + className: "PipelineSourceTriggerDescriptor", modelProperties: { - name: { - serializedName: "name", - required: true, + timestamp: { + serializedName: "timestamp", type: { - name: "Enum", - allowedValues: ["password", "password2"] + name: "DateTime" } } } } }; -export const ReplicationListResult: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicationListResult", + className: "PrivateEndpointConnectionListResult", modelProperties: { value: { serializedName: "value", @@ -1328,7 +1479,7 @@ export const ReplicationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Replication" + className: "PrivateEndpointConnection" } } } @@ -1343,32 +1494,52 @@ export const ReplicationListResult: coreClient.CompositeMapper = { } }; -export const ReplicationUpdateParameters: coreClient.CompositeMapper = { +export const PrivateEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicationUpdateParameters", + className: "PrivateEndpoint", modelProperties: { - tags: { - serializedName: "tags", + id: { + serializedName: "id", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionState", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" } }, - regionEndpointEnabled: { - serializedName: "properties.regionEndpointEnabled", + description: { + serializedName: "description", type: { - name: "Boolean" + name: "String" + } + }, + actionsRequired: { + serializedName: "actionsRequired", + type: { + name: "String" } } } } }; -export const ScopeMapListResult: coreClient.CompositeMapper = { +export const RegistryListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScopeMapListResult", + className: "RegistryListResult", modelProperties: { value: { serializedName: "value", @@ -1377,7 +1548,7 @@ export const ScopeMapListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ScopeMap" + className: "Registry" } } } @@ -1392,84 +1563,80 @@ export const ScopeMapListResult: coreClient.CompositeMapper = { } }; -export const ScopeMapUpdateParameters: coreClient.CompositeMapper = { +export const Sku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ScopeMapUpdateParameters", + className: "Sku", modelProperties: { - description: { - serializedName: "properties.description", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - actions: { - serializedName: "properties.actions", + tier: { + serializedName: "tier", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const TokenListResult: coreClient.CompositeMapper = { +export const Status: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TokenListResult", + className: "Status", modelProperties: { - value: { - serializedName: "value", + displayStatus: { + serializedName: "displayStatus", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Token" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } + }, + timestamp: { + serializedName: "timestamp", + readOnly: true, + type: { + name: "DateTime" + } } } } }; -export const TokenCredentialsProperties: coreClient.CompositeMapper = { +export const NetworkRuleSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TokenCredentialsProperties", + className: "NetworkRuleSet", modelProperties: { - certificates: { - serializedName: "certificates", + defaultAction: { + defaultValue: "Allow", + serializedName: "defaultAction", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenCertificate" - } - } + name: "String" } }, - passwords: { - serializedName: "passwords", + ipRules: { + serializedName: "ipRules", type: { name: "Sequence", element: { type: { name: "Composite", - className: "TokenPassword" + className: "IPRule" } } } @@ -1478,31 +1645,21 @@ export const TokenCredentialsProperties: coreClient.CompositeMapper = { } }; -export const TokenCertificate: coreClient.CompositeMapper = { +export const IPRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TokenCertificate", + className: "IPRule", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - expiry: { - serializedName: "expiry", - type: { - name: "DateTime" - } - }, - thumbprint: { - serializedName: "thumbprint", + action: { + defaultValue: "Allow", + serializedName: "action", type: { name: "String" } }, - encodedPemCertificate: { - serializedName: "encodedPemCertificate", + iPAddressOrRange: { + serializedName: "value", + required: true, type: { name: "String" } @@ -1511,87 +1668,115 @@ export const TokenCertificate: coreClient.CompositeMapper = { } }; -export const TokenPassword: coreClient.CompositeMapper = { +export const Policies: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TokenPassword", + className: "Policies", modelProperties: { - creationTime: { - serializedName: "creationTime", - type: { - name: "DateTime" + quarantinePolicy: { + serializedName: "quarantinePolicy", + type: { + name: "Composite", + className: "QuarantinePolicy" } }, - expiry: { - serializedName: "expiry", + trustPolicy: { + serializedName: "trustPolicy", type: { - name: "DateTime" + name: "Composite", + className: "TrustPolicy" } }, - name: { - serializedName: "name", + retentionPolicy: { + serializedName: "retentionPolicy", type: { - name: "String" + name: "Composite", + className: "RetentionPolicy" } }, - value: { - serializedName: "value", - readOnly: true, + exportPolicy: { + serializedName: "exportPolicy", type: { - name: "String" + name: "Composite", + className: "ExportPolicy" + } + }, + azureADAuthenticationAsArmPolicy: { + serializedName: "azureADAuthenticationAsArmPolicy", + type: { + name: "Composite", + className: "AzureADAuthenticationAsArmPolicy" + } + }, + softDeletePolicy: { + serializedName: "softDeletePolicy", + type: { + name: "Composite", + className: "SoftDeletePolicy" } } } } }; -export const TokenUpdateParameters: coreClient.CompositeMapper = { +export const QuarantinePolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TokenUpdateParameters", + className: "QuarantinePolicy", modelProperties: { - scopeMapId: { - serializedName: "properties.scopeMapId", + status: { + serializedName: "status", type: { name: "String" } - }, - status: { - serializedName: "properties.status", + } + } + } +}; + +export const TrustPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrustPolicy", + modelProperties: { + type: { + defaultValue: "Notary", + serializedName: "type", type: { name: "String" } }, - credentials: { - serializedName: "properties.credentials", + status: { + serializedName: "status", type: { - name: "Composite", - className: "TokenCredentialsProperties" + name: "String" } } } } }; -export const GenerateCredentialsParameters: coreClient.CompositeMapper = { +export const RetentionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GenerateCredentialsParameters", + className: "RetentionPolicy", modelProperties: { - tokenId: { - serializedName: "tokenId", + days: { + defaultValue: 7, + serializedName: "days", type: { - name: "String" + name: "Number" } }, - expiry: { - serializedName: "expiry", + lastUpdatedTime: { + serializedName: "lastUpdatedTime", + readOnly: true, type: { name: "DateTime" } }, - name: { - serializedName: "name", + status: { + serializedName: "status", type: { name: "String" } @@ -1600,52 +1785,59 @@ export const GenerateCredentialsParameters: coreClient.CompositeMapper = { } }; -export const GenerateCredentialsResult: coreClient.CompositeMapper = { +export const ExportPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GenerateCredentialsResult", + className: "ExportPolicy", modelProperties: { - username: { - serializedName: "username", + status: { + defaultValue: "enabled", + serializedName: "status", type: { name: "String" } - }, - passwords: { - serializedName: "passwords", + } + } + } +}; + +export const AzureADAuthenticationAsArmPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureADAuthenticationAsArmPolicy", + modelProperties: { + status: { + defaultValue: "enabled", + serializedName: "status", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TokenPassword" - } - } + name: "String" } } } } }; -export const WebhookListResult: coreClient.CompositeMapper = { +export const SoftDeletePolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebhookListResult", + className: "SoftDeletePolicy", modelProperties: { - value: { - serializedName: "value", + retentionDays: { + defaultValue: 7, + serializedName: "retentionDays", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Webhook" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + lastUpdatedTime: { + serializedName: "lastUpdatedTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + status: { + serializedName: "status", type: { name: "String" } @@ -1654,111 +1846,848 @@ export const WebhookListResult: coreClient.CompositeMapper = { } }; -export const WebhookCreateParameters: coreClient.CompositeMapper = { +export const EncryptionProperty: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebhookCreateParameters", + className: "EncryptionProperty", modelProperties: { - tags: { - serializedName: "tags", + status: { + serializedName: "status", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - location: { - serializedName: "location", - required: true, + keyVaultProperties: { + serializedName: "keyVaultProperties", type: { - name: "String" + name: "Composite", + className: "KeyVaultProperties" } - }, - serviceUri: { - serializedName: "properties.serviceUri", + } + } + } +}; + +export const KeyVaultProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyIdentifier: { + serializedName: "keyIdentifier", type: { name: "String" } }, - customHeaders: { - serializedName: "properties.customHeaders", + versionedKeyIdentifier: { + serializedName: "versionedKeyIdentifier", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - status: { - serializedName: "properties.status", + identity: { + serializedName: "identity", type: { name: "String" } }, - scope: { - serializedName: "properties.scope", + keyRotationEnabled: { + serializedName: "keyRotationEnabled", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - actions: { - serializedName: "properties.actions", + lastKeyRotationTimestamp: { + serializedName: "lastKeyRotationTimestamp", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "DateTime" } } } } }; -export const WebhookUpdateParameters: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WebhookUpdateParameters", + className: "Resource", modelProperties: { - tags: { - serializedName: "tags", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - serviceUri: { - serializedName: "properties.serviceUri", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - customHeaders: { - serializedName: "properties.customHeaders", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - status: { - serializedName: "properties.status", + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - scope: { - serializedName: "properties.scope", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } }, - actions: { - serializedName: "properties.actions", + systemData: { + serializedName: "systemData", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "SystemData" + } + } + } + } +}; + +export const RegistryUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryUpdateParameters", + modelProperties: { + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "IdentityProperties" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + adminUserEnabled: { + serializedName: "properties.adminUserEnabled", + type: { + name: "Boolean" + } + }, + networkRuleSet: { + serializedName: "properties.networkRuleSet", + type: { + name: "Composite", + className: "NetworkRuleSet" + } + }, + policies: { + serializedName: "properties.policies", + type: { + name: "Composite", + className: "Policies" + } + }, + encryption: { + serializedName: "properties.encryption", + type: { + name: "Composite", + className: "EncryptionProperty" + } + }, + dataEndpointEnabled: { + serializedName: "properties.dataEndpointEnabled", + type: { + name: "Boolean" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + networkRuleBypassOptions: { + serializedName: "properties.networkRuleBypassOptions", + type: { + name: "String" + } + }, + anonymousPullEnabled: { + serializedName: "properties.anonymousPullEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const RegistryUsageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryUsageListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryUsage" + } + } + } + } + } + } +}; + +export const RegistryUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryUsage", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + groupId: { + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const RegistryListCredentialsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryListCredentialsResult", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + passwords: { + serializedName: "passwords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RegistryPassword" + } + } + } + } + } + } +}; + +export const RegistryPassword: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegistryPassword", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "Enum", + allowedValues: ["password", "password2"] + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const RegenerateCredentialParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegenerateCredentialParameters", + modelProperties: { + name: { + serializedName: "name", + required: true, + type: { + name: "Enum", + allowedValues: ["password", "password2"] + } + } + } + } +}; + +export const ReplicationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Replication" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ReplicationUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ReplicationUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + regionEndpointEnabled: { + serializedName: "properties.regionEndpointEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ScopeMapListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeMapListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScopeMap" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ScopeMapUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ScopeMapUpdateParameters", + modelProperties: { + description: { + serializedName: "properties.description", + type: { + name: "String" + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const TokenListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Token" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const TokenCredentialsProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenCredentialsProperties", + modelProperties: { + certificates: { + serializedName: "certificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenCertificate" + } + } + } + }, + passwords: { + serializedName: "passwords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenPassword" + } + } + } + } + } + } +}; + +export const TokenCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenCertificate", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + expiry: { + serializedName: "expiry", + type: { + name: "DateTime" + } + }, + thumbprint: { + serializedName: "thumbprint", + type: { + name: "String" + } + }, + encodedPemCertificate: { + serializedName: "encodedPemCertificate", + type: { + name: "String" + } + } + } + } +}; + +export const TokenPassword: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenPassword", + modelProperties: { + creationTime: { + serializedName: "creationTime", + type: { + name: "DateTime" + } + }, + expiry: { + serializedName: "expiry", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const TokenUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TokenUpdateParameters", + modelProperties: { + scopeMapId: { + serializedName: "properties.scopeMapId", + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "TokenCredentialsProperties" + } + } + } + } +}; + +export const GenerateCredentialsParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GenerateCredentialsParameters", + modelProperties: { + tokenId: { + serializedName: "tokenId", + type: { + name: "String" + } + }, + expiry: { + serializedName: "expiry", + type: { + name: "DateTime" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const GenerateCredentialsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GenerateCredentialsResult", + modelProperties: { + username: { + serializedName: "username", + type: { + name: "String" + } + }, + passwords: { + serializedName: "passwords", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TokenPassword" + } + } + } + } + } + } +}; + +export const WebhookListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhookListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Webhook" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const WebhookCreateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhookCreateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + serviceUri: { + serializedName: "properties.serviceUri", + type: { + name: "String" + } + }, + customHeaders: { + serializedName: "properties.customHeaders", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const WebhookUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WebhookUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + serviceUri: { + serializedName: "properties.serviceUri", + type: { + name: "String" + } + }, + customHeaders: { + serializedName: "properties.customHeaders", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + status: { + serializedName: "properties.status", + type: { + name: "String" + } + }, + scope: { + serializedName: "properties.scope", + type: { + name: "String" + } + }, + actions: { + serializedName: "properties.actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } @@ -3037,42 +3966,296 @@ export const TaskUpdateParameters: coreClient.CompositeMapper = { className: "TriggerUpdateParameters" } }, - credentials: { - serializedName: "properties.credentials", + credentials: { + serializedName: "properties.credentials", + type: { + name: "Composite", + className: "Credentials" + } + }, + logTemplate: { + serializedName: "properties.logTemplate", + type: { + name: "String" + } + } + } + } +}; + +export const PlatformUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PlatformUpdateParameters", + modelProperties: { + os: { + serializedName: "os", + type: { + name: "String" + } + }, + architecture: { + serializedName: "architecture", + type: { + name: "String" + } + }, + variant: { + serializedName: "variant", + type: { + name: "String" + } + } + } + } +}; + +export const TaskStepUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TaskStepUpdateParameters", + uberParent: "TaskStepUpdateParameters", + polymorphicDiscriminator: { + serializedName: "type", + clientName: "type" + }, + modelProperties: { + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + contextPath: { + serializedName: "contextPath", + type: { + name: "String" + } + }, + contextAccessToken: { + serializedName: "contextAccessToken", + type: { + name: "String" + } + } + } + } +}; + +export const TriggerUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TriggerUpdateParameters", + modelProperties: { + timerTriggers: { + serializedName: "timerTriggers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimerTriggerUpdateParameters" + } + } + } + }, + sourceTriggers: { + serializedName: "sourceTriggers", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SourceTriggerUpdateParameters" + } + } + } + }, + baseImageTrigger: { + serializedName: "baseImageTrigger", + type: { + name: "Composite", + className: "BaseImageTriggerUpdateParameters" + } + } + } + } +}; + +export const TimerTriggerUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TimerTriggerUpdateParameters", + modelProperties: { + schedule: { + serializedName: "schedule", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SourceTriggerUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceTriggerUpdateParameters", + modelProperties: { + sourceRepository: { + serializedName: "sourceRepository", + type: { + name: "Composite", + className: "SourceUpdateParameters" + } + }, + sourceTriggerEvents: { + serializedName: "sourceTriggerEvents", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const SourceUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SourceUpdateParameters", + modelProperties: { + sourceControlType: { + serializedName: "sourceControlType", + type: { + name: "String" + } + }, + repositoryUrl: { + serializedName: "repositoryUrl", + type: { + name: "String" + } + }, + branch: { + serializedName: "branch", + type: { + name: "String" + } + }, + sourceControlAuthProperties: { + serializedName: "sourceControlAuthProperties", + type: { + name: "Composite", + className: "AuthInfoUpdateParameters" + } + } + } + } +}; + +export const AuthInfoUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthInfoUpdateParameters", + modelProperties: { + tokenType: { + serializedName: "tokenType", + type: { + name: "String" + } + }, + token: { + serializedName: "token", + type: { + name: "String" + } + }, + refreshToken: { + serializedName: "refreshToken", type: { - name: "Composite", - className: "Credentials" + name: "String" } }, - logTemplate: { - serializedName: "properties.logTemplate", + scope: { + serializedName: "scope", type: { name: "String" } + }, + expiresIn: { + serializedName: "expiresIn", + type: { + name: "Number" + } } } } }; -export const PlatformUpdateParameters: coreClient.CompositeMapper = { +export const BaseImageTriggerUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PlatformUpdateParameters", + className: "BaseImageTriggerUpdateParameters", modelProperties: { - os: { - serializedName: "os", + baseImageTriggerType: { + serializedName: "baseImageTriggerType", type: { name: "String" } }, - architecture: { - serializedName: "architecture", + updateTriggerEndpoint: { + serializedName: "updateTriggerEndpoint", type: { name: "String" } }, - variant: { - serializedName: "variant", + updateTriggerPayloadType: { + serializedName: "updateTriggerPayloadType", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + required: true, type: { name: "String" } @@ -3081,31 +4264,36 @@ export const PlatformUpdateParameters: coreClient.CompositeMapper = { } }; -export const TaskStepUpdateParameters: coreClient.CompositeMapper = { +export const StorageAccountProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TaskStepUpdateParameters", - uberParent: "TaskStepUpdateParameters", - polymorphicDiscriminator: { - serializedName: "type", - clientName: "type" - }, + className: "StorageAccountProperties", modelProperties: { - type: { - serializedName: "type", + id: { + serializedName: "id", required: true, type: { name: "String" } - }, - contextPath: { - serializedName: "contextPath", + } + } + } +}; + +export const PackageType: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PackageType", + modelProperties: { + name: { + serializedName: "name", type: { name: "String" } }, - contextAccessToken: { - serializedName: "contextAccessToken", + endpoint: { + serializedName: "endpoint", + readOnly: true, type: { name: "String" } @@ -3114,53 +4302,40 @@ export const TaskStepUpdateParameters: coreClient.CompositeMapper = { } }; -export const TriggerUpdateParameters: coreClient.CompositeMapper = { +export const ActiveDirectoryObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TriggerUpdateParameters", + className: "ActiveDirectoryObject", modelProperties: { - timerTriggers: { - serializedName: "timerTriggers", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "TimerTriggerUpdateParameters" - } - } - } - }, - sourceTriggers: { - serializedName: "sourceTriggers", + objectId: { + serializedName: "objectId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SourceTriggerUpdateParameters" - } - } + name: "String" } }, - baseImageTrigger: { - serializedName: "baseImageTrigger", + tenantId: { + serializedName: "tenantId", type: { - name: "Composite", - className: "BaseImageTriggerUpdateParameters" + name: "String" } } } } }; -export const TimerTriggerUpdateParameters: coreClient.CompositeMapper = { +export const RunFilter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TimerTriggerUpdateParameters", + className: "RunFilter", modelProperties: { - schedule: { - serializedName: "schedule", + runId: { + serializedName: "runId", + type: { + name: "String" + } + }, + runType: { + serializedName: "runType", type: { name: "String" } @@ -3171,9 +4346,38 @@ export const TimerTriggerUpdateParameters: coreClient.CompositeMapper = { name: "String" } }, - name: { - serializedName: "name", - required: true, + createTime: { + serializedName: "createTime", + type: { + name: "DateTime" + } + }, + finishTime: { + serializedName: "finishTime", + type: { + name: "DateTime" + } + }, + outputImageManifests: { + serializedName: "outputImageManifests", + type: { + name: "String" + } + }, + isArchiveEnabled: { + serializedName: "isArchiveEnabled", + type: { + name: "Boolean" + } + }, + taskName: { + serializedName: "taskName", + type: { + name: "String" + } + }, + agentPoolName: { + serializedName: "agentPoolName", type: { name: "String" } @@ -3182,151 +4386,157 @@ export const TimerTriggerUpdateParameters: coreClient.CompositeMapper = { } }; -export const SourceTriggerUpdateParameters: coreClient.CompositeMapper = { +export const Argument: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceTriggerUpdateParameters", + className: "Argument", modelProperties: { - sourceRepository: { - serializedName: "sourceRepository", - type: { - name: "Composite", - className: "SourceUpdateParameters" - } - }, - sourceTriggerEvents: { - serializedName: "sourceTriggerEvents", + name: { + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - status: { - serializedName: "status", + value: { + serializedName: "value", + required: true, type: { name: "String" } }, - name: { - serializedName: "name", - required: true, + isSecret: { + defaultValue: false, + serializedName: "isSecret", type: { - name: "String" + name: "Boolean" } } } } }; -export const SourceUpdateParameters: coreClient.CompositeMapper = { +export const SetValue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SourceUpdateParameters", + className: "SetValue", modelProperties: { - sourceControlType: { - serializedName: "sourceControlType", - type: { - name: "String" - } - }, - repositoryUrl: { - serializedName: "repositoryUrl", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - branch: { - serializedName: "branch", + value: { + serializedName: "value", + required: true, type: { name: "String" } }, - sourceControlAuthProperties: { - serializedName: "sourceControlAuthProperties", + isSecret: { + defaultValue: false, + serializedName: "isSecret", type: { - name: "Composite", - className: "AuthInfoUpdateParameters" + name: "Boolean" } } } } }; -export const AuthInfoUpdateParameters: coreClient.CompositeMapper = { +export const OverrideTaskStepProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AuthInfoUpdateParameters", + className: "OverrideTaskStepProperties", modelProperties: { - tokenType: { - serializedName: "tokenType", + contextPath: { + serializedName: "contextPath", type: { name: "String" } }, - token: { - serializedName: "token", + file: { + serializedName: "file", type: { name: "String" } }, - refreshToken: { - serializedName: "refreshToken", + arguments: { + serializedName: "arguments", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Argument" + } + } + } + }, + target: { + serializedName: "target", type: { name: "String" } }, - scope: { - serializedName: "scope", + values: { + serializedName: "values", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SetValue" + } + } } }, - expiresIn: { - serializedName: "expiresIn", + updateTriggerToken: { + serializedName: "updateTriggerToken", type: { - name: "Number" + name: "String" } } } } }; -export const BaseImageTriggerUpdateParameters: coreClient.CompositeMapper = { +export const CacheRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BaseImageTriggerUpdateParameters", + className: "CacheRule", modelProperties: { - baseImageTriggerType: { - serializedName: "baseImageTriggerType", + ...ProxyResource.type.modelProperties, + credentialSetResourceId: { + serializedName: "properties.credentialSetResourceId", type: { name: "String" } }, - updateTriggerEndpoint: { - serializedName: "updateTriggerEndpoint", + sourceRepository: { + serializedName: "properties.sourceRepository", type: { name: "String" } }, - updateTriggerPayloadType: { - serializedName: "updateTriggerPayloadType", + targetRepository: { + serializedName: "properties.targetRepository", type: { name: "String" } }, - status: { - serializedName: "status", + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - name: { - serializedName: "name", - required: true, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -3335,237 +4545,294 @@ export const BaseImageTriggerUpdateParameters: coreClient.CompositeMapper = { } }; -export const StorageAccountProperties: coreClient.CompositeMapper = { +export const ConnectedRegistry: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageAccountProperties", + className: "ConnectedRegistry", modelProperties: { - id: { - serializedName: "id", - required: true, + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PackageType: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PackageType", - modelProperties: { - name: { - serializedName: "name", + }, + mode: { + serializedName: "properties.mode", type: { name: "String" } }, - endpoint: { - serializedName: "endpoint", + version: { + serializedName: "properties.version", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ActiveDirectoryObject: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ActiveDirectoryObject", - modelProperties: { - objectId: { - serializedName: "objectId", - type: { - name: "String" - } }, - tenantId: { - serializedName: "tenantId", - type: { - name: "String" - } - } - } - } -}; - -export const RunFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RunFilter", - modelProperties: { - runId: { - serializedName: "runId", + connectionState: { + serializedName: "properties.connectionState", + readOnly: true, type: { name: "String" } }, - runType: { - serializedName: "runType", + lastActivityTime: { + serializedName: "properties.lastActivityTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - status: { - serializedName: "status", + activation: { + serializedName: "properties.activation", type: { - name: "String" + name: "Composite", + className: "ActivationProperties" } }, - createTime: { - serializedName: "createTime", + parent: { + serializedName: "properties.parent", type: { - name: "DateTime" + name: "Composite", + className: "ParentProperties" } }, - finishTime: { - serializedName: "finishTime", + clientTokenIds: { + serializedName: "properties.clientTokenIds", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - outputImageManifests: { - serializedName: "outputImageManifests", + loginServer: { + serializedName: "properties.loginServer", type: { - name: "String" + name: "Composite", + className: "LoginServerProperties" } }, - isArchiveEnabled: { - serializedName: "isArchiveEnabled", + logging: { + serializedName: "properties.logging", type: { - name: "Boolean" + name: "Composite", + className: "LoggingProperties" } }, - taskName: { - serializedName: "taskName", + statusDetails: { + serializedName: "properties.statusDetails", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StatusDetailProperties" + } + } } }, - agentPoolName: { - serializedName: "agentPoolName", + notificationsList: { + serializedName: "properties.notificationsList", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Argument: coreClient.CompositeMapper = { +export const CredentialSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Argument", + className: "CredentialSet", modelProperties: { - name: { - serializedName: "name", - required: true, + ...ProxyResource.type.modelProperties, + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "IdentityProperties" } }, - value: { - serializedName: "value", - required: true, + loginServer: { + serializedName: "properties.loginServer", type: { name: "String" } }, - isSecret: { - defaultValue: false, - serializedName: "isSecret", + authCredentials: { + serializedName: "properties.authCredentials", type: { - name: "Boolean" + 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 SetValue: coreClient.CompositeMapper = { +export const ExportPipeline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SetValue", + className: "ExportPipeline", modelProperties: { - name: { - serializedName: "name", - required: true, + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", type: { name: "String" } }, - value: { - serializedName: "value", - required: true, + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "IdentityProperties" } }, - isSecret: { - defaultValue: false, - serializedName: "isSecret", + target: { + serializedName: "properties.target", type: { - name: "Boolean" + name: "Composite", + className: "ExportPipelineTargetProperties" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" } } } } }; -export const OverrideTaskStepProperties: coreClient.CompositeMapper = { +export const ImportPipeline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OverrideTaskStepProperties", + className: "ImportPipeline", modelProperties: { - contextPath: { - serializedName: "contextPath", + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", type: { name: "String" } }, - file: { - serializedName: "file", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "IdentityProperties" } }, - arguments: { - serializedName: "arguments", + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "ImportPipelineSourceProperties" + } + }, + trigger: { + serializedName: "properties.trigger", + type: { + name: "Composite", + className: "PipelineTriggerProperties" + } + }, + options: { + serializedName: "properties.options", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "Argument" + name: "String" } } } }, - target: { - serializedName: "target", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PipelineRun: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PipelineRun", + modelProperties: { + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } }, - values: { - serializedName: "values", + request: { + serializedName: "properties.request", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SetValue" - } - } + name: "Composite", + className: "PipelineRunRequest" } }, - updateTriggerToken: { - serializedName: "updateTriggerToken", + response: { + serializedName: "properties.response", + type: { + name: "Composite", + className: "PipelineRunResponse" + } + }, + forceUpdateTag: { + serializedName: "properties.forceUpdateTag", type: { name: "String" } @@ -4031,6 +5298,13 @@ export const Registry: coreClient.CompositeMapper = { type: { name: "String" } + }, + anonymousPullEnabled: { + defaultValue: false, + serializedName: "properties.anonymousPullEnabled", + type: { + name: "Boolean" + } } } } @@ -4836,6 +6110,186 @@ 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", @@ -4911,6 +6365,66 @@ export const RegistriesGenerateCredentialsHeaders: coreClient.CompositeMapper = } }; +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", diff --git a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts index bb5413bc34e7..688c101b9014 100644 --- a/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts +++ b/sdk/containerregistry/arm-containerregistry/src/models/parameters.ts @@ -12,6 +12,13 @@ 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, Registry as RegistryMapper, @@ -19,6 +26,8 @@ import { RegenerateCredentialParameters as RegenerateCredentialParametersMapper, GenerateCredentialsParameters as GenerateCredentialsParametersMapper, RunRequest as RunRequestMapper, + ImportPipeline as ImportPipelineMapper, + PipelineRun as PipelineRunMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, Replication as ReplicationMapper, ReplicationUpdateParameters as ReplicationUpdateParametersMapper, @@ -37,23 +46,18 @@ import { TaskUpdateParameters as TaskUpdateParametersMapper } from "../models/mappers"; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const accept: OperationParameter = { + parameterPath: "accept", mapper: { defaultValue: "application/json", isConstant: true, - serializedName: "Content-Type", + serializedName: "Accept", type: { name: "String" } } }; -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: ImportImageParametersMapper -}; - export const $host: OperationURLParameter = { parameterPath: "$host", mapper: { @@ -69,7 +73,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-12-01", + defaultValue: "2023-01-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -120,23 +124,149 @@ export const registryName: OperationURLParameter = { } }; -export const registryNameCheckRequest: OperationParameter = { - parameterPath: "registryNameCheckRequest", - mapper: RegistryNameCheckRequestMapper +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 accept: OperationParameter = { - parameterPath: "accept", +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { defaultValue: "application/json", isConstant: true, - serializedName: "Accept", + 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: { + serializedName: "$filter", + type: { + name: "String" + } + } +}; + +export const connectedRegistryName: OperationURLParameter = { + parameterPath: "connectedRegistryName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "connectedRegistryName", + required: true, + type: { + name: "String" + } + } +}; + +export const connectedRegistryCreateParameters: OperationParameter = { + parameterPath: "connectedRegistryCreateParameters", + mapper: ConnectedRegistryMapper +}; + +export const connectedRegistryUpdateParameters: OperationParameter = { + parameterPath: "connectedRegistryUpdateParameters", + mapper: ConnectedRegistryUpdateParametersMapper +}; + +export const credentialSetName: OperationURLParameter = { + parameterPath: "credentialSetName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9-]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "credentialSetName", + required: true, type: { name: "String" } } }; +export const credentialSetCreateParameters: OperationParameter = { + parameterPath: "credentialSetCreateParameters", + mapper: CredentialSetMapper +}; + +export const credentialSetUpdateParameters: OperationParameter = { + parameterPath: "credentialSetUpdateParameters", + mapper: CredentialSetUpdateParametersMapper +}; + +export const exportPipelineName: OperationURLParameter = { + parameterPath: "exportPipelineName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "exportPipelineName", + required: true, + type: { + name: "String" + } + } +}; + +export const exportPipelineCreateParameters: OperationParameter = { + parameterPath: "exportPipelineCreateParameters", + mapper: ExportPipelineMapper +}; + +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: ImportImageParametersMapper +}; + +export const registryNameCheckRequest: OperationParameter = { + parameterPath: "registryNameCheckRequest", + mapper: RegistryNameCheckRequestMapper +}; + export const registry: OperationParameter = { parameterPath: "registry", mapper: RegistryMapper @@ -199,16 +329,46 @@ export const apiVersion1: OperationQueryParameter = { } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const importPipelineName: OperationURLParameter = { + parameterPath: "importPipelineName", mapper: { - serializedName: "nextLink", + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "importPipelineName", required: true, type: { name: "String" } - }, - skipEncoding: true + } +}; + +export const importPipelineCreateParameters: OperationParameter = { + parameterPath: "importPipelineCreateParameters", + mapper: ImportPipelineMapper +}; + +export const pipelineRunName: OperationURLParameter = { + parameterPath: "pipelineRunName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]*$"), + MaxLength: 50, + MinLength: 5 + }, + serializedName: "pipelineRunName", + required: true, + type: { + name: "String" + } + } +}; + +export const pipelineRunCreateParameters: OperationParameter = { + parameterPath: "pipelineRunCreateParameters", + mapper: PipelineRunMapper }; export const privateEndpointConnectionName: OperationURLParameter = { @@ -357,16 +517,6 @@ export const updateParameters: OperationParameter = { mapper: AgentPoolUpdateParametersMapper }; -export const filter: OperationQueryParameter = { - parameterPath: ["options", "filter"], - mapper: { - serializedName: "$filter", - type: { - name: "String" - } - } -}; - export const top: OperationQueryParameter = { parameterPath: ["options", "top"], mapper: { diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts index f85fc2c3a841..ddf185b81e86 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/agentPools.ts @@ -555,7 +555,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.agentPoolName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -613,7 +613,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.agentPoolName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -677,8 +677,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.registryName, - Parameters.resourceGroupName1, - 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..9aa31cadf57e --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/cacheRules.ts @@ -0,0 +1,644 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } 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< + SimplePollerLike< + OperationState, + CacheRulesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + CacheRulesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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 sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, cacheRuleName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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< + SimplePollerLike< + OperationState, + CacheRulesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + cacheRuleName, + cacheRuleUpdateParameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CacheRulesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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 new file mode 100644 index 000000000000..2b1b9029d438 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/connectedRegistries.ts @@ -0,0 +1,757 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ConnectedRegistries } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ConnectedRegistry, + ConnectedRegistriesListNextOptionalParams, + ConnectedRegistriesListOptionalParams, + ConnectedRegistriesListResponse, + ConnectedRegistriesGetOptionalParams, + ConnectedRegistriesGetResponse, + ConnectedRegistriesCreateOptionalParams, + ConnectedRegistriesCreateResponse, + ConnectedRegistriesDeleteOptionalParams, + ConnectedRegistryUpdateParameters, + ConnectedRegistriesUpdateOptionalParams, + ConnectedRegistriesUpdateResponse, + ConnectedRegistriesDeactivateOptionalParams, + ConnectedRegistriesListNextResponse +} from "../models"; + +/// +/** Class containing ConnectedRegistries operations. */ +export class ConnectedRegistriesImpl implements ConnectedRegistries { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class ConnectedRegistries class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all connected registries 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?: ConnectedRegistriesListOptionalParams + ): 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?: ConnectedRegistriesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ConnectedRegistriesListResponse; + 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?: ConnectedRegistriesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all connected registries 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?: ConnectedRegistriesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of the connected registry. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, connectedRegistryName, options }, + getOperationSpec + ); + } + + /** + * Creates a connected registry 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryCreateParameters: ConnectedRegistry, + options?: ConnectedRegistriesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ConnectedRegistriesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + connectedRegistryName, + connectedRegistryCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ConnectedRegistriesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a connected registry 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryCreateParameters: ConnectedRegistry, + options?: ConnectedRegistriesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + connectedRegistryName, + connectedRegistryCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a connected registry 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 connectedRegistryName The name of the connected registry. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, connectedRegistryName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a connected registry 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 connectedRegistryName The name of the connected registry. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + connectedRegistryName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates a connected 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, + options?: ConnectedRegistriesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ConnectedRegistriesUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + connectedRegistryName, + connectedRegistryUpdateParameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ConnectedRegistriesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Updates a connected 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, + options?: ConnectedRegistriesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + registryName, + connectedRegistryName, + connectedRegistryUpdateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deactivates the connected registry instance. + * @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. + */ + async beginDeactivate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeactivateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, connectedRegistryName, options }, + spec: deactivateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deactivates the connected registry instance. + * @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. + */ + async beginDeactivateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeactivateOptionalParams + ): Promise { + const poller = await this.beginDeactivate( + resourceGroupName, + registryName, + connectedRegistryName, + 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?: ConnectedRegistriesListNextOptionalParams + ): 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}/connectedRegistries", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedRegistryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + 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}/connectedRegistries/{connectedRegistryName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedRegistry + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.connectedRegistryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ConnectedRegistry + }, + 201: { + bodyMapper: Mappers.ConnectedRegistry + }, + 202: { + bodyMapper: Mappers.ConnectedRegistry + }, + 204: { + bodyMapper: Mappers.ConnectedRegistry + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.connectedRegistryCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.connectedRegistryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.connectedRegistryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ConnectedRegistry + }, + 201: { + bodyMapper: Mappers.ConnectedRegistry + }, + 202: { + bodyMapper: Mappers.ConnectedRegistry + }, + 204: { + bodyMapper: Mappers.ConnectedRegistry + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.connectedRegistryUpdateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.connectedRegistryName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deactivateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate", + httpMethod: "POST", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.connectedRegistryName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ConnectedRegistryListResult + }, + 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/credentialSets.ts b/sdk/containerregistry/arm-containerregistry/src/operations/credentialSets.ts new file mode 100644 index 000000000000..e1c95e0f0462 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/credentialSets.ts @@ -0,0 +1,644 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } 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< + SimplePollerLike< + OperationState, + CredentialSetsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + credentialSetName, + credentialSetCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + CredentialSetsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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 sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, credentialSetName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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< + SimplePollerLike< + OperationState, + CredentialSetsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + credentialSetName, + credentialSetUpdateParameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + CredentialSetsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "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 new file mode 100644 index 000000000000..5805d3047f48 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/exportPipelines.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ExportPipelines } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ExportPipeline, + ExportPipelinesListNextOptionalParams, + ExportPipelinesListOptionalParams, + ExportPipelinesListResponse, + ExportPipelinesGetOptionalParams, + ExportPipelinesGetResponse, + ExportPipelinesCreateOptionalParams, + ExportPipelinesCreateResponse, + ExportPipelinesDeleteOptionalParams, + ExportPipelinesListNextResponse +} from "../models"; + +/// +/** Class containing ExportPipelines operations. */ +export class ExportPipelinesImpl implements ExportPipelines { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class ExportPipelines class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all export pipelines 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?: ExportPipelinesListOptionalParams + ): 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?: ExportPipelinesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ExportPipelinesListResponse; + 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?: ExportPipelinesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all export pipelines 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?: ExportPipelinesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of the export pipeline. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, exportPipelineName, options }, + getOperationSpec + ); + } + + /** + * Creates an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + exportPipelineCreateParameters: ExportPipeline, + options?: ExportPipelinesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExportPipelinesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + exportPipelineName, + exportPipelineCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ExportPipelinesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + exportPipelineCreateParameters: ExportPipeline, + options?: ExportPipelinesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + exportPipelineName, + exportPipelineCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, exportPipelineName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + exportPipelineName, + 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?: ExportPipelinesListNextOptionalParams + ): 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}/exportPipelines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExportPipelineListResult + }, + 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}/exportPipelines/{exportPipelineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExportPipeline + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ExportPipeline + }, + 201: { + bodyMapper: Mappers.ExportPipeline + }, + 202: { + bodyMapper: Mappers.ExportPipeline + }, + 204: { + bodyMapper: Mappers.ExportPipeline + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.exportPipelineCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.exportPipelineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExportPipelineListResult + }, + 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/importPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts new file mode 100644 index 000000000000..2bd0ae9cda2f --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/importPipelines.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { ImportPipelines } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ImportPipeline, + ImportPipelinesListNextOptionalParams, + ImportPipelinesListOptionalParams, + ImportPipelinesListResponse, + ImportPipelinesGetOptionalParams, + ImportPipelinesGetResponse, + ImportPipelinesCreateOptionalParams, + ImportPipelinesCreateResponse, + ImportPipelinesDeleteOptionalParams, + ImportPipelinesListNextResponse +} from "../models"; + +/// +/** Class containing ImportPipelines operations. */ +export class ImportPipelinesImpl implements ImportPipelines { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class ImportPipelines class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all import pipelines 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?: ImportPipelinesListOptionalParams + ): 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?: ImportPipelinesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ImportPipelinesListResponse; + 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?: ImportPipelinesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all import pipelines 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?: ImportPipelinesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the properties of the import pipeline. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, importPipelineName, options }, + getOperationSpec + ); + } + + /** + * Creates an import pipeline 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 importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + importPipelineCreateParameters: ImportPipeline, + options?: ImportPipelinesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ImportPipelinesCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + importPipelineName, + importPipelineCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ImportPipelinesCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates an import pipeline 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 importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + importPipelineCreateParameters: ImportPipeline, + options?: ImportPipelinesCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + importPipelineName, + importPipelineCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, importPipelineName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + importPipelineName, + 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?: ImportPipelinesListNextOptionalParams + ): 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}/importPipelines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImportPipelineListResult + }, + 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}/importPipelines/{importPipelineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImportPipeline + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ImportPipeline + }, + 201: { + bodyMapper: Mappers.ImportPipeline + }, + 202: { + bodyMapper: Mappers.ImportPipeline + }, + 204: { + bodyMapper: Mappers.ImportPipeline + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.importPipelineCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.importPipelineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImportPipelineListResult + }, + 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/index.ts b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts index 0ab4a622281f..a031cd3d488d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/index.ts @@ -6,8 +6,14 @@ * 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"; export * from "./operations"; +export * from "./pipelineRuns"; export * from "./privateEndpointConnections"; export * from "./replications"; export * from "./scopeMaps"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts new file mode 100644 index 000000000000..c060eed091e6 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operations/pipelineRuns.ts @@ -0,0 +1,500 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the 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 { PipelineRuns } 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 { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + PipelineRun, + PipelineRunsListNextOptionalParams, + PipelineRunsListOptionalParams, + PipelineRunsListResponse, + PipelineRunsGetOptionalParams, + PipelineRunsGetResponse, + PipelineRunsCreateOptionalParams, + PipelineRunsCreateResponse, + PipelineRunsDeleteOptionalParams, + PipelineRunsListNextResponse +} from "../models"; + +/// +/** Class containing PipelineRuns operations. */ +export class PipelineRunsImpl implements PipelineRuns { + private readonly client: ContainerRegistryManagementClient; + + /** + * Initialize a new instance of the class PipelineRuns class. + * @param client Reference to the service client + */ + constructor(client: ContainerRegistryManagementClient) { + this.client = client; + } + + /** + * Lists all the pipeline runs 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?: PipelineRunsListOptionalParams + ): 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?: PipelineRunsListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: PipelineRunsListResponse; + 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?: PipelineRunsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + registryName, + options + )) { + yield* page; + } + } + + /** + * Lists all the pipeline runs 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?: PipelineRunsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, options }, + listOperationSpec + ); + } + + /** + * Gets the detailed information for a given pipeline run. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, registryName, pipelineRunName, options }, + getOperationSpec + ); + } + + /** + * Creates a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + pipelineRunCreateParameters: PipelineRun, + options?: PipelineRunsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PipelineRunsCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + registryName, + pipelineRunName, + pipelineRunCreateParameters, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + PipelineRunsCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * Creates a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + pipelineRunCreateParameters: PipelineRun, + options?: PipelineRunsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + registryName, + pipelineRunName, + pipelineRunCreateParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, registryName, pipelineRunName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + registryName, + pipelineRunName, + 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?: PipelineRunsListNextOptionalParams + ): 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}/pipelineRuns", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineRunListResult + }, + 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}/pipelineRuns/{pipelineRunName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.PipelineRun + }, + 201: { + bodyMapper: Mappers.PipelineRun + }, + 202: { + bodyMapper: Mappers.PipelineRun + }, + 204: { + bodyMapper: Mappers.PipelineRun + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.pipelineRunCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.registryName, + Parameters.pipelineRunName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PipelineRunListResult + }, + 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/privateEndpointConnections.ts b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts index 20bc38d6aaa7..8304b6c2b4f3 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/privateEndpointConnections.ts @@ -451,7 +451,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.privateEndpointConnectionName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts index 6fc5854e3fbb..75dcc72a562b 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/registries.ts @@ -1104,7 +1104,7 @@ const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { requestBody: Parameters.registryNameCheckRequest, queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -1185,7 +1185,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.registryName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -1229,7 +1229,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.registryName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -1330,7 +1330,7 @@ const regenerateCredentialOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.registryName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -1363,7 +1363,7 @@ const generateCredentialsOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.registryName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -1396,7 +1396,7 @@ const scheduleRunOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.resourceGroupName1 ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts b/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts index 70b262bf5b39..943fd83ac6a5 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/replications.ts @@ -550,7 +550,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.replicationName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -596,7 +596,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.replicationName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts index d7e82f399af0..d249be500b24 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/runs.ts @@ -403,7 +403,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1, Parameters.filter, Parameters.top], + queryParameters: [Parameters.filter, Parameters.apiVersion1, Parameters.top], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -466,7 +466,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.runId ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -532,8 +532,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.registryName, - Parameters.resourceGroupName1, - 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 a9eea01fdebb..89bbb38408e4 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/scopeMaps.ts @@ -559,7 +559,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.scopeMapName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -617,7 +617,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.scopeMapName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts index d428c4aaaa6d..541e60737067 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/taskRuns.ts @@ -549,7 +549,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.taskRunName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -607,7 +607,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.taskRunName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -671,8 +671,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.registryName, - Parameters.resourceGroupName1, - 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 34c1271d96cc..3708b0d2cd62 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tasks.ts @@ -571,7 +571,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.taskName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -629,7 +629,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName1, Parameters.taskName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -671,8 +671,8 @@ const listNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.registryName, - Parameters.resourceGroupName1, - 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 0b7c210f1227..994da66b5a64 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/tokens.ts @@ -553,7 +553,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.tokenName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -611,7 +611,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.tokenName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; diff --git a/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts b/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts index a91ff3e13dc9..8cffdaff5620 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operations/webhooks.ts @@ -731,7 +731,7 @@ const createOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.webhookName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; @@ -777,7 +777,7 @@ const updateOperationSpec: coreClient.OperationSpec = { Parameters.registryName, Parameters.webhookName ], - headerParameters: [Parameters.contentType, Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; 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..f2898d3fbb04 --- /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 { SimplePollerLike, OperationState } 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< + SimplePollerLike< + OperationState, + 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< + SimplePollerLike< + OperationState, + 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 new file mode 100644 index 000000000000..a77e270099c6 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/connectedRegistries.ts @@ -0,0 +1,174 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ConnectedRegistry, + ConnectedRegistriesListOptionalParams, + ConnectedRegistriesGetOptionalParams, + ConnectedRegistriesGetResponse, + ConnectedRegistriesCreateOptionalParams, + ConnectedRegistriesCreateResponse, + ConnectedRegistriesDeleteOptionalParams, + ConnectedRegistryUpdateParameters, + ConnectedRegistriesUpdateOptionalParams, + ConnectedRegistriesUpdateResponse, + ConnectedRegistriesDeactivateOptionalParams +} from "../models"; + +/// +/** Interface representing a ConnectedRegistries. */ +export interface ConnectedRegistries { + /** + * Lists all connected registries 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?: ConnectedRegistriesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the connected registry. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesGetOptionalParams + ): Promise; + /** + * Creates a connected registry 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryCreateParameters: ConnectedRegistry, + options?: ConnectedRegistriesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ConnectedRegistriesCreateResponse + > + >; + /** + * Creates a connected registry 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryCreateParameters The parameters for creating a connectedRegistry. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryCreateParameters: ConnectedRegistry, + options?: ConnectedRegistriesCreateOptionalParams + ): Promise; + /** + * Deletes a connected registry 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 connectedRegistryName The name of the connected registry. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a connected registry 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 connectedRegistryName The name of the connected registry. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeleteOptionalParams + ): Promise; + /** + * Updates a connected 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, + options?: ConnectedRegistriesUpdateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ConnectedRegistriesUpdateResponse + > + >; + /** + * Updates a connected 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 connectedRegistryName The name of the connected registry. + * @param connectedRegistryUpdateParameters The parameters for updating a connectedRegistry. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + connectedRegistryUpdateParameters: ConnectedRegistryUpdateParameters, + options?: ConnectedRegistriesUpdateOptionalParams + ): Promise; + /** + * Deactivates the connected registry instance. + * @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. + */ + beginDeactivate( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeactivateOptionalParams + ): Promise, void>>; + /** + * Deactivates the connected registry instance. + * @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. + */ + beginDeactivateAndWait( + resourceGroupName: string, + registryName: string, + connectedRegistryName: string, + options?: ConnectedRegistriesDeactivateOptionalParams + ): Promise; +} 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..847b1d7ed639 --- /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 { SimplePollerLike, OperationState } 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< + SimplePollerLike< + OperationState, + 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< + SimplePollerLike< + OperationState, + 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 new file mode 100644 index 000000000000..f9e5a0754c7b --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/exportPipelines.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ExportPipeline, + ExportPipelinesListOptionalParams, + ExportPipelinesGetOptionalParams, + ExportPipelinesGetResponse, + ExportPipelinesCreateOptionalParams, + ExportPipelinesCreateResponse, + ExportPipelinesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ExportPipelines. */ +export interface ExportPipelines { + /** + * Lists all export pipelines 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?: ExportPipelinesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the export pipeline. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesGetOptionalParams + ): Promise; + /** + * Creates an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + exportPipelineCreateParameters: ExportPipeline, + options?: ExportPipelinesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ExportPipelinesCreateResponse + > + >; + /** + * Creates an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param exportPipelineCreateParameters The parameters for creating an export pipeline. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + exportPipelineCreateParameters: ExportPipeline, + options?: ExportPipelinesCreateOptionalParams + ): Promise; + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an export pipeline 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 exportPipelineName The name of the export pipeline. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + exportPipelineName: string, + options?: ExportPipelinesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts new file mode 100644 index 000000000000..4c2a9db43d63 --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/importPipelines.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ImportPipeline, + ImportPipelinesListOptionalParams, + ImportPipelinesGetOptionalParams, + ImportPipelinesGetResponse, + ImportPipelinesCreateOptionalParams, + ImportPipelinesCreateResponse, + ImportPipelinesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ImportPipelines. */ +export interface ImportPipelines { + /** + * Lists all import pipelines 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?: ImportPipelinesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the properties of the import pipeline. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesGetOptionalParams + ): Promise; + /** + * Creates an import pipeline 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 importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + importPipelineCreateParameters: ImportPipeline, + options?: ImportPipelinesCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + ImportPipelinesCreateResponse + > + >; + /** + * Creates an import pipeline 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 importPipelineName The name of the import pipeline. + * @param importPipelineCreateParameters The parameters for creating an import pipeline. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + importPipelineCreateParameters: ImportPipeline, + options?: ImportPipelinesCreateOptionalParams + ): Promise; + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes an import pipeline 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 importPipelineName The name of the import pipeline. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + importPipelineName: string, + options?: ImportPipelinesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts index 0ab4a622281f..a031cd3d488d 100644 --- a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/index.ts @@ -6,8 +6,14 @@ * 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"; export * from "./operations"; +export * from "./pipelineRuns"; export * from "./privateEndpointConnections"; export * from "./replications"; export * from "./scopeMaps"; diff --git a/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts new file mode 100644 index 000000000000..de9cd488fc1f --- /dev/null +++ b/sdk/containerregistry/arm-containerregistry/src/operationsInterfaces/pipelineRuns.ts @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + PipelineRun, + PipelineRunsListOptionalParams, + PipelineRunsGetOptionalParams, + PipelineRunsGetResponse, + PipelineRunsCreateOptionalParams, + PipelineRunsCreateResponse, + PipelineRunsDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a PipelineRuns. */ +export interface PipelineRuns { + /** + * Lists all the pipeline runs 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?: PipelineRunsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the detailed information for a given pipeline run. + * @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. + */ + get( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsGetOptionalParams + ): Promise; + /** + * Creates a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + pipelineRunCreateParameters: PipelineRun, + options?: PipelineRunsCreateOptionalParams + ): Promise< + SimplePollerLike< + OperationState, + PipelineRunsCreateResponse + > + >; + /** + * Creates a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param pipelineRunCreateParameters The parameters for creating a pipeline run. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + pipelineRunCreateParameters: PipelineRun, + options?: PipelineRunsCreateOptionalParams + ): Promise; + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a pipeline run 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 pipelineRunName The name of the pipeline run. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + registryName: string, + pipelineRunName: string, + options?: PipelineRunsDeleteOptionalParams + ): Promise; +} 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"