Skip to content

Commit

Permalink
CodeGen from PR 11412 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
[ACR] New API version 2020-11-01-preview: AZ and On-Prem support (Azure#11412)
  • Loading branch information
SDKAuto committed Nov 24, 2020
1 parent 589583c commit f17584b
Show file tree
Hide file tree
Showing 38 changed files with 5,114 additions and 3,140 deletions.
19 changes: 9 additions & 10 deletions sdk/containerregistry/arm-containerregistry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-containerregistry

### How to use

#### nodejs - Authentication, client creation and get exportPipelines as an example written in TypeScript.
#### nodejs - client creation and get connectedRegistries as an example written in TypeScript.

##### Install @azure/ms-rest-nodeauth

Expand All @@ -26,19 +26,18 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0"

##### Sample code

While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package
```typescript
import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
import { ContainerRegistryManagementClient, ContainerRegistryManagementModels, ContainerRegistryManagementMappers } from "@azure/arm-containerregistry";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { ContainerRegistryManagementClient } = require("@azure/arm-containerregistry");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
const client = new ContainerRegistryManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const registryName = "testregistryName";
const exportPipelineName = "testexportPipelineName";
client.exportPipelines.get(resourceGroupName, registryName, exportPipelineName).then((result) => {
const connectedRegistryName = "testconnectedRegistryName";
client.connectedRegistries.get(resourceGroupName, registryName, connectedRegistryName).then((result) => {
console.log("The result is:");
console.log(result);
});
Expand All @@ -47,7 +46,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => {
});
```

#### browser - Authentication, client creation and get exportPipelines as an example written in JavaScript.
#### browser - Authentication, client creation and get connectedRegistries as an example written in JavaScript.

##### Install @azure/ms-rest-browserauth

Expand Down Expand Up @@ -83,8 +82,8 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to
const client = new Azure.ArmContainerregistry.ContainerRegistryManagementClient(res.creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const registryName = "testregistryName";
const exportPipelineName = "testexportPipelineName";
client.exportPipelines.get(resourceGroupName, registryName, exportPipelineName).then((result) => {
const connectedRegistryName = "testconnectedRegistryName";
client.connectedRegistries.get(resourceGroupName, registryName, connectedRegistryName).then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/containerregistry/arm-containerregistry/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const config = {
"@azure/ms-rest-azure-js": "msRestAzure"
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand All @@ -17,20 +16,21 @@ import { ContainerRegistryManagementClientContext } from "./containerRegistryMan

class ContainerRegistryManagementClient extends ContainerRegistryManagementClientContext {
// Operation groups
connectedRegistries: operations.ConnectedRegistries;
exportPipelines: operations.ExportPipelines;
registries: operations.Registries;
importPipelines: operations.ImportPipelines;
operations: operations.Operations;
pipelineRuns: operations.PipelineRuns;
privateEndpointConnections: operations.PrivateEndpointConnections;
replications: operations.Replications;
scopeMaps: operations.ScopeMaps;
tokens: operations.Tokens;
webhooks: operations.Webhooks;
agentPools: operations.AgentPools;
runs: operations.Runs;
taskRuns: operations.TaskRuns;
tasks: operations.Tasks;
scopeMaps: operations.ScopeMaps;
tokens: operations.Tokens;

/**
* Initializes a new instance of the ContainerRegistryManagementClient class.
Expand All @@ -40,20 +40,21 @@ class ContainerRegistryManagementClient extends ContainerRegistryManagementClien
*/
constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.ContainerRegistryManagementClientOptions) {
super(credentials, subscriptionId, options);
this.connectedRegistries = new operations.ConnectedRegistries(this);
this.exportPipelines = new operations.ExportPipelines(this);
this.registries = new operations.Registries(this);
this.importPipelines = new operations.ImportPipelines(this);
this.operations = new operations.Operations(this);
this.pipelineRuns = new operations.PipelineRuns(this);
this.privateEndpointConnections = new operations.PrivateEndpointConnections(this);
this.replications = new operations.Replications(this);
this.scopeMaps = new operations.ScopeMaps(this);
this.tokens = new operations.Tokens(this);
this.webhooks = new operations.Webhooks(this);
this.agentPools = new operations.AgentPools(this);
this.runs = new operations.Runs(this);
this.taskRuns = new operations.TaskRuns(this);
this.tasks = new operations.Tasks(this);
this.scopeMaps = new operations.ScopeMaps(this);
this.tokens = new operations.Tokens(this);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ActiveDirectoryObject,
ActivationProperties,
AgentPool,
AgentPoolListResult,
AgentPoolQueueStatus,
Expand All @@ -19,6 +19,7 @@ export {
BaseImageDependency,
BaseImageTrigger,
BaseResource,
ConnectedRegistry,
Credentials,
CustomRegistryCredentials,
DockerBuildRequest,
Expand All @@ -40,8 +41,11 @@ export {
InnerErrorDescription,
IPRule,
KeyVaultProperties,
LoggingProperties,
LoginServerProperties,
NetworkRuleSet,
OverrideTaskStepProperties,
ParentProperties,
PipelineRun,
PipelineRunRequest,
PipelineRunResponse,
Expand Down Expand Up @@ -74,13 +78,18 @@ export {
SourceTrigger,
SourceTriggerDescriptor,
Status,
StatusDetailProperties,
StorageAccountProperties,
SyncProperties,
SystemData,
Task,
TaskRun,
TaskRunRequest,
TaskStepProperties,
TimerTrigger,
TimerTriggerDescriptor,
TlsCertificateProperties,
TlsProperties,
Token,
TokenCertificate,
TokenCredentialsProperties,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ActivationProperties,
AgentPool,
AgentProperties,
Argument,
AuthInfo,
BaseImageDependency,
BaseImageTrigger,
BaseResource,
ConnectedRegistry,
ConnectedRegistryListResult,
ConnectedRegistryUpdateParameters,
Credentials,
CustomRegistryCredentials,
DockerBuildRequest,
DockerBuildStep,
EncodedTaskRunRequest,
EncodedTaskStep,
EncryptionProperty,
ErrorResponse,
ErrorResponseBody,
ExportPipeline,
ExportPipelineTargetProperties,
FileTaskRunRequest,
FileTaskStep,
IdentityProperties,
ImageDescriptor,
ImageUpdateTrigger,
ImportPipeline,
ImportPipelineSourceProperties,
InnerErrorDescription,
IPRule,
KeyVaultProperties,
LoggingProperties,
LoginServerProperties,
NetworkRuleSet,
OverrideTaskStepProperties,
ParentProperties,
PipelineRun,
PipelineRunRequest,
PipelineRunResponse,
PipelineRunSourceProperties,
PipelineRunTargetProperties,
PipelineSourceTriggerDescriptor,
PipelineSourceTriggerProperties,
PipelineTriggerDescriptor,
PipelineTriggerProperties,
PlatformProperties,
Policies,
PrivateEndpoint,
PrivateEndpointConnection,
PrivateLinkServiceConnectionState,
ProgressProperties,
ProxyResource,
QuarantinePolicy,
Registry,
Replication,
Resource,
RetentionPolicy,
Run,
RunRequest,
ScopeMap,
SecretObject,
SetValue,
Sku,
SourceProperties,
SourceRegistryCredentials,
SourceTrigger,
SourceTriggerDescriptor,
Status,
StatusDetailProperties,
StorageAccountProperties,
SyncProperties,
SyncUpdateProperties,
SystemData,
Task,
TaskRun,
TaskRunRequest,
TaskStepProperties,
TimerTrigger,
TimerTriggerDescriptor,
TlsCertificateProperties,
TlsProperties,
Token,
TokenCertificate,
TokenCredentialsProperties,
TokenPassword,
TriggerProperties,
TrustPolicy,
UserIdentityProperties,
VirtualNetworkRule,
Webhook
} from "../models/mappers";
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/

export {
discriminators,
ActiveDirectoryObject,
ActivationProperties,
AgentPool,
AgentProperties,
Argument,
Expand All @@ -17,6 +17,7 @@ export {
BaseImageTrigger,
BaseResource,
CloudError,
ConnectedRegistry,
Credentials,
CustomRegistryCredentials,
DockerBuildRequest,
Expand All @@ -36,8 +37,11 @@ export {
ImportPipelineSourceProperties,
IPRule,
KeyVaultProperties,
LoggingProperties,
LoginServerProperties,
NetworkRuleSet,
OverrideTaskStepProperties,
ParentProperties,
PipelineRun,
PipelineRunRequest,
PipelineRunResponse,
Expand Down Expand Up @@ -70,13 +74,18 @@ export {
SourceTrigger,
SourceTriggerDescriptor,
Status,
StatusDetailProperties,
StorageAccountProperties,
SyncProperties,
SystemData,
Task,
TaskRun,
TaskRunRequest,
TaskStepProperties,
TimerTrigger,
TimerTriggerDescriptor,
TlsCertificateProperties,
TlsProperties,
Token,
TokenCertificate,
TokenCredentialsProperties,
Expand Down
Loading

0 comments on commit f17584b

Please sign in to comment.