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 @@ -45,7 +45,7 @@ class DockerBuildRequest extends models['RunRequest'] {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms
* of number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class EncodedTaskRunRequest extends models['RunRequest'] {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms
* of number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class FileTaskRunRequest extends models['RunRequest'] {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms
* of number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
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.
* @member {string} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
* @member {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;
44 changes: 34 additions & 10 deletions lib/services/containerRegistryManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,33 @@ export interface StorageAccountProperties {
* @class
* Initializes a new instance of the VirtualNetworkRule class.
* @constructor
* The virtual network rule for a container registry.
* Virtual network rule.
*
* @member {string} id Resource ID of a subnet, for example:
* @member {string} [action] The action of virtual network rule. Possible
* values include: 'Allow'. Default value: 'Allow' .
* @member {string} virtualNetworkResourceId Resource ID of a subnet, for
* example:
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
*/
export interface VirtualNetworkRule {
id: string;
action?: string;
virtualNetworkResourceId: string;
}

/**
* @class
* Initializes a new instance of the IPRule class.
* @constructor
* IP rule with specific IP or IP range in CIDR format.
*
* @member {string} [action] The action of IP ACL rule. Possible values
* include: 'Allow'. Default value: 'Allow' .
* @member {string} iPAddressOrRange Specifies the IP or IP range in CIDR
* format. Only IPV4 address is allowed.
*/
export interface IPRule {
action?: string;
iPAddressOrRange: string;
}

/**
Expand All @@ -282,10 +302,12 @@ export interface VirtualNetworkRule {
* other rules match. Possible values include: 'Allow', 'Deny'. Default value:
* 'Allow' .
* @member {array} [virtualNetworkRules] The virtual network rules.
* @member {array} [ipRules] The IP ACL rules.
*/
export interface NetworkRuleSet {
defaultAction: string;
virtualNetworkRules?: VirtualNetworkRule[];
ipRules?: IPRule[];
}

/**
Expand Down Expand Up @@ -346,6 +368,7 @@ export interface Resource extends BaseResource {
* or deny when no other rules match. Possible values include: 'Allow', 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @member {array} [networkRuleSet.ipRules] The IP ACL rules.
*/
export interface Registry extends Resource {
sku: Sku;
Expand Down Expand Up @@ -384,6 +407,7 @@ export interface Registry extends Resource {
* or deny when no other rules match. Possible values include: 'Allow', 'Deny'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @member {array} [networkRuleSet.ipRules] The IP ACL rules.
*/
export interface RegistryUpdateParameters {
tags?: { [propertyName: string]: string };
Expand Down Expand Up @@ -1314,7 +1338,7 @@ export interface AuthInfo {
*
* @member {string} sourceControlType The type of source control service.
* Possible values include: 'Github', 'VisualStudioTeamService'
* @member {string} repositoryUrl The full URL to the source code respository
* @member {string} repositoryUrl The full URL to the source code repository
* @member {string} [branch] The branch name of the source code.
* @member {object} [sourceControlAuthProperties] The authorization properties
* for accessing the source code repository and to set up
Expand Down Expand Up @@ -1349,7 +1373,7 @@ export interface SourceProperties {
* control service. Possible values include: 'Github',
* 'VisualStudioTeamService'
* @member {string} [sourceRepository.repositoryUrl] The full URL to the source
* code respository
* code repository
* @member {string} [sourceRepository.branch] The branch name of the source
* code.
* @member {object} [sourceRepository.sourceControlAuthProperties] The
Expand Down Expand Up @@ -1545,7 +1569,7 @@ export interface AuthInfoUpdateParameters {
*
* @member {string} [sourceControlType] The type of source control service.
* Possible values include: 'Github', 'VisualStudioTeamService'
* @member {string} [repositoryUrl] The full URL to the source code respository
* @member {string} [repositoryUrl] The full URL to the source code repository
* @member {string} [branch] The branch name of the source code.
* @member {object} [sourceControlAuthProperties] The authorization properties
* for accessing the source code repository and to set up
Expand Down Expand Up @@ -1580,7 +1604,7 @@ export interface SourceUpdateParameters {
* control service. Possible values include: 'Github',
* 'VisualStudioTeamService'
* @member {string} [sourceRepository.repositoryUrl] The full URL to the source
* code respository
* code repository
* @member {string} [sourceRepository.branch] The branch name of the source
* code.
* @member {object} [sourceRepository.sourceControlAuthProperties] The
Expand Down Expand Up @@ -1749,7 +1773,7 @@ export interface Argument {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms of
* number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down Expand Up @@ -1808,7 +1832,7 @@ export interface SetValue {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms of
* number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
Expand Down Expand Up @@ -1864,7 +1888,7 @@ export interface TaskRunRequest extends RunRequest {
* @member {number} [agentConfiguration.cpu] The CPU configuration in terms of
* number of cores required for the run.
* @member {string} [sourceLocation] The URL(absolute or relative) of the
* source context. It can be an URL to a tar or git repoistory.
* source context. It can be an URL to a tar or git repository.
* If it is relative URL, the relative path should be obtained from calling
* listBuildSourceUploadUrl API.
*/
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 {
* other rules match. Possible values include: 'Allow', 'Deny'. Default
* value: 'Allow' .
* @member {array} [virtualNetworkRules] The virtual network rules.
* @member {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'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @member {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'
* @member {array} [networkRuleSet.virtualNetworkRules] The virtual network
* rules.
* @member {array} [networkRuleSet.ipRules] The IP ACL rules.
*/
constructor() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class SourceProperties {
* Create a SourceProperties.
* @member {string} sourceControlType The type of source control service.
* Possible values include: 'Github', 'VisualStudioTeamService'
* @member {string} repositoryUrl The full URL to the source code respository
* @member {string} repositoryUrl The full URL to the source code repository
* @member {string} [branch] The branch name of the source code.
* @member {object} [sourceControlAuthProperties] The authorization
* properties for accessing the source code repository and to set up
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SourceTrigger {
* control service. Possible values include: 'Github',
* 'VisualStudioTeamService'
* @member {string} [sourceRepository.repositoryUrl] The full URL to the
* source code respository
* source code repository
* @member {string} [sourceRepository.branch] The branch name of the source
* code.
* @member {object} [sourceRepository.sourceControlAuthProperties] The
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SourceTriggerUpdateParameters {
* control service. Possible values include: 'Github',
* 'VisualStudioTeamService'
* @member {string} [sourceRepository.repositoryUrl] The full URL to the
* source code respository
* source code repository
* @member {string} [sourceRepository.branch] The branch name of the source
* code.
* @member {object} [sourceRepository.sourceControlAuthProperties] The
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class SourceUpdateParameters {
* @member {string} [sourceControlType] The type of source control service.
* Possible values include: 'Github', 'VisualStudioTeamService'
* @member {string} [repositoryUrl] The full URL to the source code
* respository
* repository
* @member {string} [branch] The branch name of the source code.
* @member {object} [sourceControlAuthProperties] The authorization
* properties for accessing the source code repository and to set up
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.
* @member {string} id Resource ID of a subnet, for example:
* @member {string} [action] The action of virtual network rule. Possible
* values include: 'Allow'. Default value: 'Allow' .
* @member {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
Loading