Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ class ImportImageParameters {
* @member {object} source The source of the image.
* @member {string} [source.resourceId] The resource identifier of the source
* Azure Container Registry.
* @member {string} [source.registryUri] The address of the source registry.
* @member {string} [source.registryUri] The address of the source registry
* (e.g. 'mcr.microsoft.com').
* @member {object} [source.credentials] Credentials used when importing from
* a registry uri.
* @member {string} [source.credentials.username] The username to
* authenticate with the source registry.
* @member {string} [source.credentials.password] The password used to
* authenticate with the source registry.
* @member {string} [source.sourceImage] Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the 'latest'
* tag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ class ImportSource {
* Create a ImportSource.
* @member {string} [resourceId] The resource identifier of the source Azure
* Container Registry.
* @member {string} [registryUri] The address of the source registry.
* @member {string} [registryUri] The address of the source registry (e.g.
* 'mcr.microsoft.com').
* @member {object} [credentials] Credentials used when importing from a
* registry uri.
* @member {string} [credentials.username] The username to authenticate with
* the source registry.
* @member {string} [credentials.password] The password used to authenticate
* with the source registry.
* @member {string} sourceImage Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the 'latest'
* tag.
Expand Down Expand Up @@ -57,6 +64,14 @@ class ImportSource {
name: 'String'
}
},
credentials: {
required: false,
serializedName: 'credentials',
type: {
name: 'Composite',
className: 'ImportSourceCredentials'
}
},
sourceImage: {
required: true,
serializedName: 'sourceImage',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Class representing a ImportSourceCredentials.
*/
class ImportSourceCredentials {
/**
* Create a ImportSourceCredentials.
* @member {string} [username] The username to authenticate with the source
* registry.
* @member {string} password The password used to authenticate with the
* source registry.
*/
constructor() {
}

/**
* Defines the metadata of ImportSourceCredentials
*
* @returns {object} metadata of ImportSourceCredentials
*
*/
mapper() {
return {
required: false,
serializedName: 'ImportSourceCredentials',
type: {
name: 'Composite',
className: 'ImportSourceCredentials',
modelProperties: {
username: {
required: false,
serializedName: 'username',
type: {
name: 'String'
}
},
password: {
required: true,
serializedName: 'password',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = ImportSourceCredentials;
63 changes: 61 additions & 2 deletions lib/services/containerRegistryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,34 @@ export { BaseResource } from 'ms-rest-azure';
export { CloudError } from 'ms-rest-azure';


/**
* @class
* Initializes a new instance of the ImportSourceCredentials class.
* @constructor
* @member {string} [username] The username to authenticate with the source
* registry.
* @member {string} password The password used to authenticate with the source
* registry.
*/
export interface ImportSourceCredentials {
username?: string;
password: string;
}

/**
* @class
* Initializes a new instance of the ImportSource class.
* @constructor
* @member {string} [resourceId] The resource identifier of the source Azure
* Container Registry.
* @member {string} [registryUri] The address of the source registry.
* @member {string} [registryUri] The address of the source registry (e.g.
* 'mcr.microsoft.com').
* @member {object} [credentials] Credentials used when importing from a
* registry uri.
* @member {string} [credentials.username] The username to authenticate with
* the source registry.
* @member {string} [credentials.password] The password used to authenticate
* with the source registry.
* @member {string} sourceImage Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the 'latest'
* tag.
Expand All @@ -33,6 +54,7 @@ export { CloudError } from 'ms-rest-azure';
export interface ImportSource {
resourceId?: string;
registryUri?: string;
credentials?: ImportSourceCredentials;
sourceImage: string;
}

Expand All @@ -43,7 +65,14 @@ export interface ImportSource {
* @member {object} source The source of the image.
* @member {string} [source.resourceId] The resource identifier of the source
* Azure Container Registry.
* @member {string} [source.registryUri] The address of the source registry.
* @member {string} [source.registryUri] The address of the source registry
* (e.g. 'mcr.microsoft.com').
* @member {object} [source.credentials] Credentials used when importing from a
* registry uri.
* @member {string} [source.credentials.username] The username to authenticate
* with the source registry.
* @member {string} [source.credentials.password] The password used to
* authenticate with the source registry.
* @member {string} [source.sourceImage] Repository name of the source image.
* Specify an image by repository ('hello-world'). This will use the 'latest'
* tag.
Expand Down Expand Up @@ -199,6 +228,22 @@ export interface Sku {
readonly tier?: string;
}

/**
* @class
* Initializes a new instance of the RegistryIdentity class.
* @constructor
* The identity of the container registry.
*
* @member {string} [type] The type of identity used for the registry.
* @member {string} [principalId] The principal ID of registry identity.
* @member {string} [tenantId] The tenant ID associated with the registry.
*/
export interface RegistryIdentity {
type?: string;
principalId?: string;
tenantId?: string;
}

/**
* @class
* Initializes a new instance of the Status class.
Expand Down Expand Up @@ -263,6 +308,12 @@ export interface Resource extends BaseResource {
* 'Standard', 'Premium'
* @member {string} [sku.tier] The SKU tier based on the SKU name. Possible
* values include: 'Classic', 'Basic', 'Standard', 'Premium'
* @member {object} [identity] The identity of the container registry.
* @member {string} [identity.type] The type of identity used for the registry.
* @member {string} [identity.principalId] The principal ID of registry
* identity.
* @member {string} [identity.tenantId] The tenant ID associated with the
* registry.
* @member {string} [loginServer] The URL that can be used to log into the
* container registry.
* @member {date} [creationDate] The creation date of the container registry in
Expand All @@ -285,6 +336,7 @@ export interface Resource extends BaseResource {
*/
export interface Registry extends Resource {
sku: Sku;
identity?: RegistryIdentity;
readonly loginServer?: string;
readonly creationDate?: Date;
readonly provisioningState?: string;
Expand All @@ -306,6 +358,12 @@ export interface Registry extends Resource {
* 'Standard', 'Premium'
* @member {string} [sku.tier] The SKU tier based on the SKU name. Possible
* values include: 'Classic', 'Basic', 'Standard', 'Premium'
* @member {object} [identity] The identity of the container registry.
* @member {string} [identity.type] The type of identity used for the registry.
* @member {string} [identity.principalId] The principal ID of registry
* identity.
* @member {string} [identity.tenantId] The tenant ID associated with the
* registry.
* @member {boolean} [adminUserEnabled] The value that indicates whether the
* admin user is enabled.
* @member {object} [storageAccount] The parameters of a storage account for
Expand All @@ -317,6 +375,7 @@ export interface Registry extends Resource {
export interface RegistryUpdateParameters {
tags?: { [propertyName: string]: string };
sku?: Sku;
identity?: RegistryIdentity;
adminUserEnabled?: boolean;
storageAccount?: StorageAccountProperties;
}
Expand Down
2 changes: 2 additions & 0 deletions lib/services/containerRegistryManagement/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var msRestAzure = require('ms-rest-azure');

exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.ImportSourceCredentials = require('./importSourceCredentials');
exports.ImportSource = require('./importSource');
exports.ImportImageParameters = require('./importImageParameters');
exports.RegistryNameCheckRequest = require('./registryNameCheckRequest');
Expand All @@ -27,6 +28,7 @@ exports.OperationMetricSpecificationDefinition = require('./operationMetricSpeci
exports.OperationServiceSpecificationDefinition = require('./operationServiceSpecificationDefinition');
exports.OperationDefinition = require('./operationDefinition');
exports.Sku = require('./sku');
exports.RegistryIdentity = require('./registryIdentity');
exports.Status = require('./status');
exports.StorageAccountProperties = require('./storageAccountProperties');
exports.Resource = require('./resource');
Expand Down
15 changes: 15 additions & 0 deletions lib/services/containerRegistryManagement/lib/models/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ class Registry extends models['Resource'] {
* 'Basic', 'Standard', 'Premium'
* @member {string} [sku.tier] The SKU tier based on the SKU name. Possible
* values include: 'Classic', 'Basic', 'Standard', 'Premium'
* @member {object} [identity] The identity of the container registry.
* @member {string} [identity.type] The type of identity used for the
* registry.
* @member {string} [identity.principalId] The principal ID of registry
* identity.
* @member {string} [identity.tenantId] The tenant ID associated with the
* registry.
* @member {string} [loginServer] The URL that can be used to log into the
* container registry.
* @member {date} [creationDate] The creation date of the container registry
Expand Down Expand Up @@ -119,6 +126,14 @@ class Registry extends models['Resource'] {
className: 'Sku'
}
},
identity: {
required: false,
serializedName: 'identity',
type: {
name: 'Composite',
className: 'RegistryIdentity'
}
},
loginServer: {
required: false,
readOnly: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* The identity of the container registry.
*
*/
class RegistryIdentity {
/**
* Create a RegistryIdentity.
* @member {string} [type] The type of identity used for the registry.
* @member {string} [principalId] The principal ID of registry identity.
* @member {string} [tenantId] The tenant ID associated with the registry.
*/
constructor() {
}

/**
* Defines the metadata of RegistryIdentity
*
* @returns {object} metadata of RegistryIdentity
*
*/
mapper() {
return {
required: false,
serializedName: 'RegistryIdentity',
type: {
name: 'Composite',
className: 'RegistryIdentity',
modelProperties: {
type: {
required: false,
serializedName: 'type',
type: {
name: 'String'
}
},
principalId: {
required: false,
serializedName: 'principalId',
type: {
name: 'String'
}
},
tenantId: {
required: false,
serializedName: 'tenantId',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = RegistryIdentity;
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ class RegistryUpdateParameters {
* 'Basic', 'Standard', 'Premium'
* @member {string} [sku.tier] The SKU tier based on the SKU name. Possible
* values include: 'Classic', 'Basic', 'Standard', 'Premium'
* @member {object} [identity] The identity of the container registry.
* @member {string} [identity.type] The type of identity used for the
* registry.
* @member {string} [identity.principalId] The principal ID of registry
* identity.
* @member {string} [identity.tenantId] The tenant ID associated with the
* registry.
* @member {boolean} [adminUserEnabled] The value that indicates whether the
* admin user is enabled.
* @member {object} [storageAccount] The parameters of a storage account for
Expand Down Expand Up @@ -72,6 +79,14 @@ class RegistryUpdateParameters {
className: 'Sku'
}
},
identity: {
required: false,
serializedName: 'identity',
type: {
name: 'Composite',
className: 'RegistryIdentity'
}
},
adminUserEnabled: {
required: false,
serializedName: 'properties.adminUserEnabled',
Expand Down
Loading