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
45 changes: 44 additions & 1 deletion lib/services/containerRegistryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,35 @@ export interface StorageAccountProperties {
id: string;
}

/**
* @class
* Initializes a new instance of the VirtualNetworkRule class.
* @constructor
* The virtual network rule for a container registry.
*
* @member {string} id Resource ID of a subnet, for example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
export interface VirtualNetworkRule {
id: string;
}

/**
* @class
* Initializes a new instance of the NetworkRuleSet class.
* @constructor
* The network rule set for a container registry.
*
* @member {string} defaultAction The default action of allow or deny when no
* other rules match. Possible values include: 'Allow', 'Deny'. Default value:
* 'Allow' .
* @member {array} [virtualNetworkRules] The virtual network rules.
*/
export interface NetworkRuleSet {
defaultAction: string;
virtualNetworkRules?: VirtualNetworkRule[];
}

/**
* @class
* Initializes a new instance of the Resource class.
Expand Down Expand Up @@ -311,6 +340,12 @@ export interface Resource extends BaseResource {
* @member {object} [storageAccount] The properties of the storage account for
* the container registry. Only applicable to Classic SKU.
* @member {string} [storageAccount.id] The resource ID of the storage account.
* @member {object} [networkRuleSet] The network rule set for a container
* registry.
* @member {string} [networkRuleSet.defaultAction] The default action of allow
* or deny when no other rules match. Possible values include: 'Allow', 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
*/
export interface Registry extends Resource {
sku: Sku;
Expand All @@ -320,6 +355,7 @@ export interface Registry extends Resource {
readonly status?: Status;
adminUserEnabled?: boolean;
storageAccount?: StorageAccountProperties;
networkRuleSet?: NetworkRuleSet;
}

/**
Expand All @@ -342,12 +378,19 @@ export interface Registry extends Resource {
* storage account must be in the same physical location as the container
* registry.
* @member {string} [storageAccount.id] The resource ID of the storage account.
* @member {object} [networkRuleSet] The network rule set for a container
* registry.
* @member {string} [networkRuleSet.defaultAction] The default action of allow
* or deny when no other rules match. Possible values include: 'Allow', 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
*/
export interface RegistryUpdateParameters {
tags?: { [propertyName: string]: string };
sku?: Sku;
adminUserEnabled?: boolean;
storageAccount?: StorageAccountProperties;
networkRuleSet?: NetworkRuleSet;
}

/**
Expand Down Expand Up @@ -1381,7 +1424,7 @@ export interface TriggerProperties {
* Initializes a new instance of the Task class.
* @constructor
* The task that has the ARM resource and task properties.
* The task will have all information to schedule a run against it.
* The task will have all information to schedule a run against it.
*
* @member {string} [provisioningState] The provisioning state of the task.
* Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
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 @@ -30,6 +30,8 @@ exports.OperationDefinition = require('./operationDefinition');
exports.Sku = require('./sku');
exports.Status = require('./status');
exports.StorageAccountProperties = require('./storageAccountProperties');
exports.VirtualNetworkRule = require('./virtualNetworkRule');
exports.NetworkRuleSet = require('./networkRuleSet');
exports.Resource = require('./resource');
exports.Registry = require('./registry');
exports.RegistryUpdateParameters = require('./registryUpdateParameters');
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* 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 network rule set for a container registry.
*
*/
class NetworkRuleSet {
/**
* Create a NetworkRuleSet.
* @member {string} defaultAction The default action of allow or deny when no
* other rules match. Possible values include: 'Allow', 'Deny'. Default
* value: 'Allow' .
* @member {array} [virtualNetworkRules] The virtual network rules.
*/
constructor() {
}

/**
* Defines the metadata of NetworkRuleSet
*
* @returns {object} metadata of NetworkRuleSet
*
*/
mapper() {
return {
required: false,
serializedName: 'NetworkRuleSet',
type: {
name: 'Composite',
className: 'NetworkRuleSet',
modelProperties: {
defaultAction: {
required: true,
serializedName: 'defaultAction',
defaultValue: 'Allow',
type: {
name: 'String'
}
},
virtualNetworkRules: {
required: false,
serializedName: 'virtualNetworkRules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'VirtualNetworkRuleElementType',
type: {
name: 'Composite',
className: 'VirtualNetworkRule'
}
}
}
}
}
}
};
}
}

module.exports = NetworkRuleSet;
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 @@ -47,6 +47,13 @@ class Registry extends models['Resource'] {
* for the container registry. Only applicable to Classic SKU.
* @member {string} [storageAccount.id] The resource ID of the storage
* account.
* @member {object} [networkRuleSet] The network rule set for a container
* registry.
* @member {string} [networkRuleSet.defaultAction] The default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
*/
constructor() {
super();
Expand Down Expand Up @@ -167,6 +174,14 @@ class Registry extends models['Resource'] {
name: 'Composite',
className: 'StorageAccountProperties'
}
},
networkRuleSet: {
required: false,
serializedName: 'properties.networkRuleSet',
type: {
name: 'Composite',
className: 'NetworkRuleSet'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ class RegistryUpdateParameters {
* registry.
* @member {string} [storageAccount.id] The resource ID of the storage
* account.
* @member {object} [networkRuleSet] The network rule set for a container
* registry.
* @member {string} [networkRuleSet.defaultAction] The default action of
* allow or deny when no other rules match. Possible values include: 'Allow',
* 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
*/
constructor() {
}
Expand Down Expand Up @@ -86,6 +93,14 @@ class RegistryUpdateParameters {
name: 'Composite',
className: 'StorageAccountProperties'
}
},
networkRuleSet: {
required: false,
serializedName: 'properties.networkRuleSet',
type: {
name: 'Composite',
className: 'NetworkRuleSet'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const models = require('./index');

/**
* The task that has the ARM resource and task properties.
* The task will have all information to schedule a run against it.
* The task will have all information to schedule a run against it.
*
* @extends models['Resource']
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* 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 virtual network rule for a container registry.
*
*/
class VirtualNetworkRule {
/**
* Create a VirtualNetworkRule.
* @member {string} id Resource ID of a subnet, for example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
constructor() {
}

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

module.exports = VirtualNetworkRule;
Loading