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
2 changes: 1 addition & 1 deletion lib/services/containerRegistryManagement/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 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
63 changes: 63 additions & 0 deletions lib/services/containerRegistryManagement/lib/models/iPRule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* 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';

/**
* IP rule with specific IP or IP range in CIDR format.
*
*/
class IPRule {
/**
* Create a IPRule.
* @property {string} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
* @property {string} iPAddressOrRange Specifies the IP or IP range in CIDR
* format. Only IPV4 address is allowed.
*/
constructor() {
}

/**
* Defines the metadata of IPRule
*
* @returns {object} metadata of IPRule
*
*/
mapper() {
return {
required: false,
serializedName: 'IPRule',
type: {
name: 'Composite',
className: 'IPRule',
modelProperties: {
action: {
required: false,
serializedName: 'action',
defaultValue: 'Allow',
type: {
name: 'String'
}
},
iPAddressOrRange: {
required: true,
serializedName: 'value',
type: {
name: 'String'
}
}
}
}
};
}
}

module.exports = IPRule;
26 changes: 24 additions & 2 deletions lib/services/containerRegistryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,14 +228,32 @@ export interface StorageAccountProperties {
}

/**
* The virtual network rule for a container registry.
* Virtual network rule.
*/
export interface VirtualNetworkRule {
/**
* The action of virtual network rule. Possible values include: 'Allow'
*/
action?: string;
/**
* Resource ID of a subnet, for example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
id: string;
virtualNetworkResourceId: string;
}

/**
* IP rule with specific IP or IP range in CIDR format.
*/
export interface IPRule {
/**
* The action of IP ACL rule. Possible values include: 'Allow'
*/
action?: string;
/**
* Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
*/
iPAddressOrRange: string;
}

/**
Expand All @@ -251,6 +269,10 @@ export interface NetworkRuleSet {
* The virtual network rules.
*/
virtualNetworkRules?: VirtualNetworkRule[];
/**
* The IP ACL rules.
*/
ipRules?: IPRule[];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports.Sku = require('./sku');
exports.Status = require('./status');
exports.StorageAccountProperties = require('./storageAccountProperties');
exports.VirtualNetworkRule = require('./virtualNetworkRule');
exports.IPRule = require('./iPRule');
exports.NetworkRuleSet = require('./networkRuleSet');
exports.Resource = require('./resource');
exports.Registry = require('./registry');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class NetworkRuleSet {
* no other rules match. Possible values include: 'Allow', 'Deny'. Default
* value: 'Allow' .
* @property {array} [virtualNetworkRules] The virtual network rules.
* @property {array} [ipRules] The IP ACL rules.
*/
constructor() {
}
Expand Down Expand Up @@ -61,6 +62,21 @@ class NetworkRuleSet {
}
}
}
},
ipRules: {
required: false,
serializedName: 'ipRules',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'IPRuleElementType',
type: {
name: 'Composite',
className: 'IPRule'
}
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Registry extends models['Resource'] {
* 'Deny'
* @property {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @property {array} [networkRuleSet.ipRules] The IP ACL rules.
*/
constructor() {
super();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class RegistryUpdateParameters {
* 'Deny'
* @property {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @property {array} [networkRuleSet.ipRules] The IP ACL rules.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
'use strict';

/**
* The virtual network rule for a container registry.
* Virtual network rule.
*
*/
class VirtualNetworkRule {
/**
* Create a VirtualNetworkRule.
* @property {string} id Resource ID of a subnet, for example:
* @property {string} [action] The action of virtual network rule. Possible
* values include: 'Allow'. Default value: 'Allow' .
* @property {string} virtualNetworkResourceId Resource ID of a subnet, for
* example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
constructor() {
Expand All @@ -37,7 +40,15 @@ class VirtualNetworkRule {
name: 'Composite',
className: 'VirtualNetworkRule',
modelProperties: {
id: {
action: {
required: false,
serializedName: 'action',
defaultValue: 'Allow',
type: {
name: 'String'
}
},
virtualNetworkResourceId: {
required: true,
serializedName: 'id',
type: {
Expand Down
20 changes: 20 additions & 0 deletions lib/services/containerRegistryManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ export interface Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -379,6 +381,8 @@ export interface Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -518,6 +522,9 @@ export interface Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -573,6 +580,9 @@ export interface Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -1393,6 +1403,8 @@ export interface Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -1446,6 +1458,8 @@ export interface Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -1585,6 +1599,9 @@ export interface Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -1640,6 +1657,9 @@ export interface Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ function _get(resourceGroupName, registryName, options, callback) {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -661,6 +663,9 @@ function _deleteMethod(resourceGroupName, registryName, options, callback) {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -2280,6 +2285,8 @@ function _beginImportImage(resourceGroupName, registryName, parameters, options,
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -2663,6 +2670,9 @@ function _beginDeleteMethod(resourceGroupName, registryName, options, callback)
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -3916,6 +3926,8 @@ class Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -3981,6 +3993,8 @@ class Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -4162,6 +4176,9 @@ class Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -4229,6 +4246,9 @@ class Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -5334,6 +5354,8 @@ class Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -5399,6 +5421,8 @@ class Registries {
* @param {array} [registry.networkRuleSet.virtualNetworkRules] The virtual
* network rules.
*
* @param {array} [registry.networkRuleSet.ipRules] The IP ACL rules.
*
* @param {string} registry.location The location of the resource. This cannot
* be changed after the resource is created.
*
Expand Down Expand Up @@ -5580,6 +5604,9 @@ class Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down Expand Up @@ -5647,6 +5674,9 @@ class Registries {
* @param {array} [registryUpdateParameters.networkRuleSet.virtualNetworkRules]
* The virtual network rules.
*
* @param {array} [registryUpdateParameters.networkRuleSet.ipRules] The IP ACL
* rules.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
Expand Down
Loading