Skip to content

Commit

Permalink
CodeGen from PR 16481 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge dbce97a4b479af6df27d683bc394bec17cbd4d4f into cf6beaa3c62ba2c00c01c6cd2067a14e1888fb55
  • Loading branch information
SDKAuto committed Nov 10, 2021
1 parent b049934 commit 0765fc6
Show file tree
Hide file tree
Showing 28 changed files with 2,736 additions and 9,028 deletions.
14 changes: 4 additions & 10 deletions sdk/containerregistry/arm-containerregistry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +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 list connectedRegistries as an example written in JavaScript.
#### nodejs - Authentication, client creation, and list registries as an example written in JavaScript.

##### Sample code

Expand All @@ -49,10 +49,7 @@ const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
// Please note that you can also use credentials from the `@azure/ms-rest-nodeauth` package instead.
const creds = new DefaultAzureCredential();
const client = new ContainerRegistryManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const registryName = "testregistryName";
const filter = "testfilter";
client.connectedRegistries.list(resourceGroupName, registryName, filter).then((result) => {
client.registries.list().then((result) => {
console.log("The result is:");
console.log(result);
}).catch((err) => {
Expand All @@ -61,7 +58,7 @@ client.connectedRegistries.list(resourceGroupName, registryName, filter).then((r
});
```

#### browser - Authentication, client creation, and list connectedRegistries as an example written in JavaScript.
#### browser - Authentication, client creation, and list registries 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 Down Expand Up @@ -89,10 +86,7 @@ In browser applications, we recommend using the `InteractiveBrowserCredential` t
tenant: "<optional tenant for your organization>"
});
const client = new Azure.ArmContainerregistry.ContainerRegistryManagementClient(creds, subscriptionId);
const resourceGroupName = "testresourceGroupName";
const registryName = "testregistryName";
const filter = "testfilter";
client.connectedRegistries.list(resourceGroupName, registryName, filter).then((result) => {
client.registries.list().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/main/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
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@ 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;
Expand All @@ -46,16 +40,10 @@ 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

export {
discriminators,
ActivationProperties,
AgentPool,
AgentPoolListResult,
AgentPoolQueueStatus,
Expand All @@ -19,7 +18,6 @@ export {
BaseImageDependency,
BaseImageTrigger,
BaseResource,
ConnectedRegistry,
Credentials,
CustomRegistryCredentials,
DockerBuildRequest,
Expand All @@ -29,39 +27,22 @@ export {
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,
Expand All @@ -70,7 +51,6 @@ export {
RetentionPolicy,
Run,
RunRequest,
ScopeMap,
SecretObject,
SetValue,
Sku,
Expand All @@ -79,24 +59,15 @@ export {
SourceTrigger,
SourceTriggerDescriptor,
Status,
StatusDetailProperties,
SyncProperties,
SystemData,
Task,
TaskRun,
TaskRunRequest,
TaskStepProperties,
TimerTrigger,
TimerTriggerDescriptor,
TlsCertificateProperties,
TlsProperties,
Token,
TokenCertificate,
TokenCredentialsProperties,
TokenPassword,
TriggerProperties,
TrustPolicy,
UserIdentityProperties,
VirtualNetworkRule,
Webhook
} from "../models/mappers";

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0765fc6

Please sign in to comment.