Skip to content

Commit

Permalink
CodeGen from PR 15990 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 3202fde5393de903dd68c567e04212bbf6316ca2 into ce90f9b45945c73b8f38649ee6ead390ff6efe7b
  • Loading branch information
SDKAuto committed Sep 20, 2021
1 parent 3c7a547 commit 4ff02ad
Show file tree
Hide file tree
Showing 40 changed files with 5,266 additions and 3,189 deletions.
2 changes: 1 addition & 1 deletion sdk/containerregistry/arm-containerregistry/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Microsoft
Copyright (c) 2021 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 9 additions & 11 deletions sdk/containerregistry/arm-containerregistry/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Azure ContainerRegistryManagementClient SDK for JavaScript

This package contains an isomorphic SDK (runs both in Node.js and in browsers) for ContainerRegistryManagementClient.
This package contains an isomorphic SDK (runs both in node.js and in browsers) for ContainerRegistryManagementClient.

### Currently supported environments

- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge, and Firefox.
- Latest versions of Safari, Chrome, Edge and Firefox.

### Prerequisites

Expand All @@ -21,7 +21,6 @@ Install both packages using the below command:
```bash
npm install --save @azure/arm-containerregistry @azure/identity
```

> **Note**: You may have used either `@azure/ms-rest-nodeauth` or `@azure/ms-rest-browserauth` in the past. These packages are in maintenance mode receiving critical bug fixes, but no new features.
If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/), or are writing a client side browser application, we strongly encourage you to upgrade to `@azure/identity` which uses the latest versions of Azure Active Directory and MSAL APIs and provides more authentication options.

Expand All @@ -37,8 +36,7 @@ If you are on a [Node.js that has LTS status](https://nodejs.org/about/releases/

In the below samples, we pass the credential and the Azure subscription id to instantiate the client.
Once the client is created, explore the operations on it either in your favorite editor or in our [API reference documentation](https://docs.microsoft.com/javascript/api) to get started.

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

##### Sample code

Expand All @@ -53,8 +51,8 @@ const creds = new DefaultAzureCredential();
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);
}).catch((err) => {
Expand All @@ -63,7 +61,7 @@ client.exportPipelines.get(resourceGroupName, registryName, exportPipelineName).
});
```

#### 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.

In browser applications, we recommend using the `InteractiveBrowserCredential` that interactively authenticates using the default system browser.
- See [Single-page application: App registration guide](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) to configure your app registration for the browser.
Expand All @@ -88,13 +86,13 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
const credential = new InteractiveBrowserCredential(
{
clientId: "<client id for your Azure AD app>",
tenantId: "<optional tenant for your organization>"
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmContainerregistry.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);
}).catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion sdk/containerregistry/arm-containerregistry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.6.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/feature/v4/sdk/containerregistry/arm-containerregistry",
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/containerregistry/arm-containerregistry",
"repository": {
"type": "git",
"url": "https://github.com/Azure/azure-sdk-for-js.git"
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 @@ -18,20 +17,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 @@ -46,20 +46,21 @@ class ContainerRegistryManagementClient extends ContainerRegistryManagementClien
*/
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, 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 All @@ -10,8 +9,8 @@

import * as Models from "./models";
import * as msRest from "@azure/ms-rest-js";
import { TokenCredential } from "@azure/core-auth";
import * as msRestAzure from "@azure/ms-rest-azure-js";
import { TokenCredential } from "@azure/core-auth";

const packageName = "@azure/arm-containerregistry";
const packageVersion = "8.1.1";
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 @@ -30,6 +31,7 @@ export {
ErrorResponseBody,
ExportPipeline,
ExportPipelineTargetProperties,
ExportPolicy,
FileTaskRunRequest,
FileTaskStep,
IdentityProperties,
Expand All @@ -40,8 +42,11 @@ export {
InnerErrorDescription,
IPRule,
KeyVaultProperties,
LoggingProperties,
LoginServerProperties,
NetworkRuleSet,
OverrideTaskStepProperties,
ParentProperties,
PipelineRun,
PipelineRunRequest,
PipelineRunResponse,
Expand Down Expand Up @@ -74,13 +79,17 @@ export {
SourceTrigger,
SourceTriggerDescriptor,
Status,
StorageAccountProperties,
StatusDetailProperties,
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,
ExportPolicy,
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,
SyncProperties,
SyncUpdateProperties,
SystemData,
Task,
TaskRun,
TaskRunRequest,
TaskStepProperties,
TimerTrigger,
TimerTriggerDescriptor,
TlsCertificateProperties,
TlsProperties,
Token,
TokenCertificate,
TokenCredentialsProperties,
TokenPassword,
TriggerProperties,
TrustPolicy,
UserIdentityProperties,
VirtualNetworkRule,
Webhook
} from "../models/mappers";
Loading

0 comments on commit 4ff02ad

Please sign in to comment.