diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5d1b43e1600f..f43df5d44d7c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -631,6 +631,21 @@ packages: - supports-color dev: false + /@azure/arm-network/26.0.0: + resolution: {integrity: sha512-Hp0Q4ZzChs8C0DUdGZOChWKMrhzZ53V0Q681puREZ9S1E6o2yWM0Vb+cYuWoyPOylwuzP2fjNjJZGtB7WuFd3w==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.0.4 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.4.0 + '@azure/core-lro': 2.2.3 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.4.0 + tslib: 2.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/communication-common/1.1.0: resolution: {integrity: sha512-vqTtzDtb4NG3LWoWoqlOOJApZRRIIImNUKlGyTa6c1YC+v5A7UEOL9TX8NRDxvFVUF2wDHsSnkhLBVBgkcAhIQ==} engines: {node: '>=12.0.0'} @@ -9568,11 +9583,12 @@ packages: dev: false file:projects/arm-compute.tgz: - resolution: {integrity: sha512-hmINbh19nn8k1jqs1nWFUU2duhpE4z8dFI3PpCUI1LKxEWlzJhpu2vMzeR0KDn6wfXakBgXe4Bd51pim+3t58Q==, tarball: file:projects/arm-compute.tgz} + resolution: {integrity: sha512-UZ3mzh/7NfafSh6NlhCC59jkaSp6CxuytZAsMT2h38DGLHCzXZ3uazaEJTbzzimS1BOCCzKWh1uCiiblPCxG5Q==, tarball: file:projects/arm-compute.tgz} name: '@rush-temp/arm-compute' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@microsoft/api-extractor': 7.19.4 '@rollup/plugin-commonjs': 21.0.1_rollup@2.66.1 '@rollup/plugin-json': 4.1.0_rollup@2.66.1 @@ -10193,11 +10209,12 @@ packages: dev: false file:projects/arm-eventhub.tgz: - resolution: {integrity: sha512-sW2h3heuRNq8XmwlPIv5KhIaasqs7H5J38SYe91IzGkZNSw2Vvk5cCH/KHrxiE7I7XGtgdw8HP8+FzXPI5bpJw==, tarball: file:projects/arm-eventhub.tgz} + resolution: {integrity: sha512-9qvrSFoh2Al6tFbnlK3fRZVCvmhELwG50dZVjAXQ7cc0fHB5yYZiAIm4BR6o5yJRQHU0Rpy+8z7yJc8e6IrR+w==, tarball: file:projects/arm-eventhub.tgz} name: '@rush-temp/arm-eventhub' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@microsoft/api-extractor': 7.19.4 '@rollup/plugin-commonjs': 21.0.1_rollup@2.66.1 '@rollup/plugin-json': 4.1.0_rollup@2.66.1 @@ -11118,22 +11135,22 @@ packages: dev: false file:projects/arm-network.tgz: - resolution: {integrity: sha512-0mEBeoMkDJut0+QxS9FrGyI5AqRU7OTX1QijIAYaIP5/o1buyWud5cQeD0v5CWKbsZ2rfJLpKixzsHYnA49gJw==, tarball: file:projects/arm-network.tgz} + resolution: {integrity: sha512-F0jII+BPxVfU0wq/hm2i2XXptnRmSyly/ESV6X+UtvAD5xWcbLUb1KEh1EzIsKUkPPbxUOhSiAiACHVDPDbjSg==, tarball: file:projects/arm-network.tgz} name: '@rush-temp/arm-network' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.1_rollup@2.66.1 - '@rollup/plugin-json': 4.1.0_rollup@2.66.1 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.66.1 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.66.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.66.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.66.1 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.14.5 @@ -11618,11 +11635,12 @@ packages: dev: false file:projects/arm-rediscache.tgz: - resolution: {integrity: sha512-/fTxuaVcm7BjOSj22KpfbZ8lTZMGC1AGAOGAZZ735huyBjUh7ljhS882uCXQVzQTYb8BrwK6ePeUGYEHpk626w==, tarball: file:projects/arm-rediscache.tgz} + resolution: {integrity: sha512-nbjg4xKSQz5aPPDXxpijRorXWiqm5eK8ejcGkWFn1ze43MEi4j8Xa0HuxQ/wTzzKhRf+DUmjX4Rf7abYJQyzrA==, tarball: file:projects/arm-rediscache.tgz} name: '@rush-temp/arm-rediscache' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-network': 26.0.0 '@microsoft/api-extractor': 7.19.4 '@rollup/plugin-commonjs': 21.0.1_rollup@2.66.1 '@rollup/plugin-json': 4.1.0_rollup@2.66.1 @@ -15877,7 +15895,7 @@ packages: dev: false file:projects/search-documents.tgz: - resolution: {integrity: sha512-ENpAvvdCwGkqJ4unWOWpywLDjQIYT2+T+YqE7QarLd7IMf+aWx6HLFlhlvUpgNM0Tw8oL3txyCOGvI6rFqtz+Q==, tarball: file:projects/search-documents.tgz} + resolution: {integrity: sha512-v95+TnIgfPJtOulZuW73xOA/OgPCA72RP5aMD0ZAlp3qJNclhxBxULu3r7TUdQVfRrPqKuJaAGCiLUCLPqFRuQ==, tarball: file:projects/search-documents.tgz} name: '@rush-temp/search-documents' version: 0.0.0 dependencies: @@ -15923,7 +15941,6 @@ packages: - '@swc/wasm' - bufferutil - debug - - encoding - supports-color - utf-8-validate dev: false diff --git a/sdk/network/arm-network/CHANGELOG.md b/sdk/network/arm-network/CHANGELOG.md index 2f51a4fc784e..d0bac238de38 100644 --- a/sdk/network/arm-network/CHANGELOG.md +++ b/sdk/network/arm-network/CHANGELOG.md @@ -1,15 +1,40 @@ # Release History - -## 26.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + +## 27.0.0 (2022-02-04) + +**Features** + + - Added operation group ExpressRoutePortAuthorizations + - Added Interface ExpressRoutePortAuthorizationListResult + - Added Interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + - Added Interface ExpressRoutePortAuthorizationsDeleteOptionalParams + - Added Interface ExpressRoutePortAuthorizationsGetOptionalParams + - Added Interface ExpressRoutePortAuthorizationsListNextOptionalParams + - Added Interface ExpressRoutePortAuthorizationsListOptionalParams + - Added Type Alias ExpressRoutePortAuthorization + - Added Type Alias ExpressRoutePortAuthorizationsCreateOrUpdateResponse + - Added Type Alias ExpressRoutePortAuthorizationsGetResponse + - Added Type Alias ExpressRoutePortAuthorizationsListNextResponse + - Added Type Alias ExpressRoutePortAuthorizationsListResponse + - Added Type Alias ExpressRoutePortAuthorizationUseStatus + - Added Type Alias SingleQueryResultDirection + - Added Type Alias SingleQueryResultMode + - Added Type Alias SingleQueryResultSeverity + - Class NetworkManagementClient has a new parameter expressRoutePortAuthorizations + - Type Alias ExpressRouteCircuit has a new parameter authorizationKey + - Type Alias ExpressRoutePort has a new parameter authorizations + - Added Enum KnownExpressRoutePortAuthorizationUseStatus + - Added Enum KnownSingleQueryResultDirection + - Added Enum KnownSingleQueryResultMode + - Added Enum KnownSingleQueryResultSeverity + +**Breaking Changes** + + - Removed Enum KnownEnum69 + - Removed Enum KnownEnum70 + - Removed Enum KnownEnum71 + + ## 26.0.0 (2021-12-06) The package of @azure/arm-network is using our next generation design principles since version 26.0.0, which contains breaking changes. diff --git a/sdk/network/arm-network/LICENSE b/sdk/network/arm-network/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/network/arm-network/LICENSE +++ b/sdk/network/arm-network/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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 diff --git a/sdk/network/arm-network/_meta.json b/sdk/network/arm-network/_meta.json index ee7107f7c5e6..1cfaf99c8cb3 100644 --- a/sdk/network/arm-network/_meta.json +++ b/sdk/network/arm-network/_meta.json @@ -1,7 +1,7 @@ { - "commit": "3b2f85d320fac5b282bc80240f9e5c2c57753bad", + "commit": "591b7df17647d3d84ddcfc811b517f20faeefb5b", "readme": "specification/network/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/network/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211130.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/network/arm-network/api-extractor.json b/sdk/network/arm-network/api-extractor.json index fb18609746bc..f1d9c8954e48 100644 --- a/sdk/network/arm-network/api-extractor.json +++ b/sdk/network/arm-network/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-network.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/network/arm-network/package.json b/sdk/network/arm-network/package.json index 34d2a35cd669..814145146821 100644 --- a/sdk/network/arm-network/package.json +++ b/sdk/network/arm-network/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for NetworkManagementClient.", - "version": "26.0.1", + "version": "27.0.0", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-network.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/network/arm-network/review/arm-network.api.md b/sdk/network/arm-network/review/arm-network.api.md index 41797866987d..a50e21b1fe28 100644 --- a/sdk/network/arm-network/review/arm-network.api.md +++ b/sdk/network/arm-network/review/arm-network.api.md @@ -2737,15 +2737,6 @@ export interface EndpointServicesListResult { // @public export type EndpointType = string; -// @public -export type Enum69 = number; - -// @public -export type Enum70 = number; - -// @public -export type Enum71 = number; - // @public export interface ErrorDetails { code?: string; @@ -2823,6 +2814,7 @@ export type ExpressRouteCircuit = Resource & { readonly provisioningState?: ProvisioningState; gatewayManagerEtag?: string; globalReachEnabled?: boolean; + authorizationKey?: string; }; // @public @@ -3678,12 +3670,79 @@ export type ExpressRoutePort = Resource & { encapsulation?: ExpressRoutePortsEncapsulation; readonly etherType?: string; readonly allocationDate?: string; + authorizations?: ExpressRoutePortAuthorization[]; links?: ExpressRouteLink[]; readonly circuits?: SubResource[]; readonly provisioningState?: ProvisioningState; readonly resourceGuid?: string; }; +// @public +export type ExpressRoutePortAuthorization = SubResource & { + name?: string; + readonly etag?: string; + readonly type?: string; + readonly authorizationKey?: string; + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + readonly circuitResourceUri?: string; + readonly provisioningState?: ProvisioningState; +}; + +// @public +export interface ExpressRoutePortAuthorizationListResult { + nextLink?: string; + value?: ExpressRoutePortAuthorization[]; +} + +// @public +export interface ExpressRoutePortAuthorizations { + beginCreateOrUpdate(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, authorizationParameters: ExpressRoutePortAuthorization, options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams): Promise, ExpressRoutePortAuthorizationsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, authorizationParameters: ExpressRoutePortAuthorization, options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsDeleteOptionalParams): Promise; + get(resourceGroupName: string, expressRoutePortName: string, authorizationName: string, options?: ExpressRoutePortAuthorizationsGetOptionalParams): Promise; + list(resourceGroupName: string, expressRoutePortName: string, options?: ExpressRoutePortAuthorizationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ExpressRoutePortAuthorizationsCreateOrUpdateResponse = ExpressRoutePortAuthorization; + +// @public +export interface ExpressRoutePortAuthorizationsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ExpressRoutePortAuthorizationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsGetResponse = ExpressRoutePortAuthorization; + +// @public +export interface ExpressRoutePortAuthorizationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsListNextResponse = ExpressRoutePortAuthorizationListResult; + +// @public +export interface ExpressRoutePortAuthorizationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ExpressRoutePortAuthorizationsListResponse = ExpressRoutePortAuthorizationListResult; + +// @public +export type ExpressRoutePortAuthorizationUseStatus = string; + // @public export interface ExpressRoutePortListResult { nextLink?: string; @@ -5597,36 +5656,6 @@ export enum KnownEndpointType { MMAWorkspaceNetwork = "MMAWorkspaceNetwork" } -// @public -export enum KnownEnum69 { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - -// @public -export enum KnownEnum70 { - // (undocumented) - One = 1, - // (undocumented) - Three = 3, - // (undocumented) - Two = 2 -} - -// @public -export enum KnownEnum71 { - // (undocumented) - One = 1, - // (undocumented) - Two = 2, - // (undocumented) - Zero = 0 -} - // @public export enum KnownEvaluationState { // (undocumented) @@ -5731,6 +5760,14 @@ export enum KnownExpressRoutePeeringType { MicrosoftPeering = "MicrosoftPeering" } +// @public +export enum KnownExpressRoutePortAuthorizationUseStatus { + // (undocumented) + Available = "Available", + // (undocumented) + InUse = "InUse" +} + // @public export enum KnownExpressRoutePortsEncapsulation { // (undocumented) @@ -6489,6 +6526,36 @@ export enum KnownSeverity { Warning = "Warning" } +// @public +export enum KnownSingleQueryResultDirection { + // (undocumented) + One = 1, + // (undocumented) + Two = 2, + // (undocumented) + Zero = 0 +} + +// @public +export enum KnownSingleQueryResultMode { + // (undocumented) + One = 1, + // (undocumented) + Two = 2, + // (undocumented) + Zero = 0 +} + +// @public +export enum KnownSingleQueryResultSeverity { + // (undocumented) + One = 1, + // (undocumented) + Three = 3, + // (undocumented) + Two = 2 +} + // @public export enum KnownSyncRemoteAddressSpace { // (undocumented) @@ -8207,6 +8274,8 @@ export class NetworkManagementClient extends coreClient.ServiceClient { // (undocumented) expressRouteLinks: ExpressRouteLinks; // (undocumented) + expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; + // (undocumented) expressRoutePorts: ExpressRoutePorts; // (undocumented) expressRoutePortsLocations: ExpressRoutePortsLocations; @@ -11200,17 +11269,26 @@ export interface SignaturesOverridesProperties { export interface SingleQueryResult { description?: string; destinationPorts?: string[]; - direction?: Enum71; + direction?: SingleQueryResultDirection; group?: string; inheritedFromParentPolicy?: boolean; lastUpdated?: string; - mode?: Enum69; + mode?: SingleQueryResultMode; protocol?: string; - severity?: Enum70; + severity?: SingleQueryResultSeverity; signatureId?: number; sourcePorts?: string[]; } +// @public +export type SingleQueryResultDirection = number; + +// @public +export type SingleQueryResultMode = number; + +// @public +export type SingleQueryResultSeverity = number; + // @public export interface Sku { name?: BastionHostSkuName; diff --git a/sdk/network/arm-network/src/models/index.ts b/sdk/network/arm-network/src/models/index.ts index 597c7c32cc82..592ea5a71396 100644 --- a/sdk/network/arm-network/src/models/index.ts +++ b/sdk/network/arm-network/src/models/index.ts @@ -1502,6 +1502,14 @@ export interface GenerateExpressRoutePortsLOAResult { encodedContent?: string; } +/** Response for ListExpressRoutePortAuthorizations API service call. */ +export interface ExpressRoutePortAuthorizationListResult { + /** The authorizations in an ExpressRoute Port. */ + value?: ExpressRoutePortAuthorization[]; + /** The URL to get the next set of results. */ + nextLink?: string; +} + /** ThreatIntel Whitelist for Firewall Policy. */ export interface FirewallPolicyThreatIntelWhitelist { /** List of IP addresses for the ThreatIntel Whitelist. */ @@ -1706,11 +1714,11 @@ export interface SingleQueryResult { /** The ID of the signature */ signatureId?: number; /** The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny */ - mode?: Enum69; + mode?: SingleQueryResultMode; /** Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High */ - severity?: Enum70; + severity?: SingleQueryResultSeverity; /** Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - Bidirectional */ - direction?: Enum71; + direction?: SingleQueryResultDirection; /** Describes the groups the signature belongs to */ group?: string; /** Describes what is the signature enforces */ @@ -6755,6 +6763,42 @@ export type ExpressRouteCrossConnectionPeering = SubResource & { ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; }; +/** ExpressRoutePort Authorization resource definition. */ +export type ExpressRoutePortAuthorization = SubResource & { + /** The name of the resource that is unique within a resource group. This name can be used to access the resource. */ + name?: string; + /** + * A unique read-only string that changes whenever the resource is updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly etag?: string; + /** + * Type of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The authorization key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authorizationKey?: string; + /** + * The authorization use status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authorizationUseStatus?: ExpressRoutePortAuthorizationUseStatus; + /** + * The reference to the ExpressRoute circuit resource using the authorization. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly circuitResourceUri?: string; + /** + * The provisioning state of the authorization resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +}; + /** ExpressRouteLink child resource definition. */ export type ExpressRouteLink = SubResource & { /** Name of child port resource that is unique among child port resources of the parent. */ @@ -8572,6 +8616,8 @@ export type ExpressRouteCircuit = Resource & { gatewayManagerEtag?: string; /** Flag denoting global reach status. */ globalReachEnabled?: boolean; + /** The authorizationKey. */ + authorizationKey?: string; }; /** A ExpressRouteResourceProvider object. */ @@ -8690,6 +8736,8 @@ export type ExpressRoutePort = Resource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly allocationDate?: string; + /** The list of authorizations. */ + authorizations?: ExpressRoutePortAuthorization[]; /** The set of physical links of the ExpressRoutePort resource. */ links?: ExpressRouteLink[]; /** @@ -10949,6 +10997,22 @@ export enum KnownExpressRoutePortsEncapsulation { */ export type ExpressRoutePortsEncapsulation = string; +/** Known values of {@link ExpressRoutePortAuthorizationUseStatus} that the service accepts. */ +export enum KnownExpressRoutePortAuthorizationUseStatus { + Available = "Available", + InUse = "InUse" +} + +/** + * Defines values for ExpressRoutePortAuthorizationUseStatus. \ + * {@link KnownExpressRoutePortAuthorizationUseStatus} can be used interchangeably with ExpressRoutePortAuthorizationUseStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Available** \ + * **InUse** + */ +export type ExpressRoutePortAuthorizationUseStatus = string; + /** Known values of {@link ExpressRouteLinkConnectorType} that the service accepts. */ export enum KnownExpressRouteLinkConnectorType { LC = "LC", @@ -11105,59 +11169,59 @@ export enum KnownOrderByOrder { */ export type OrderByOrder = string; -/** Known values of {@link Enum69} that the service accepts. */ -export enum KnownEnum69 { +/** Known values of {@link SingleQueryResultMode} that the service accepts. */ +export enum KnownSingleQueryResultMode { Zero = 0, One = 1, Two = 2 } /** - * Defines values for Enum69. \ - * {@link KnownEnum69} can be used interchangeably with Enum69, + * Defines values for SingleQueryResultMode. \ + * {@link KnownSingleQueryResultMode} can be used interchangeably with SingleQueryResultMode, * this enum contains the known values that the service supports. * ### Known values supported by the service * **0** \ * **1** \ * **2** */ -export type Enum69 = number; +export type SingleQueryResultMode = number; -/** Known values of {@link Enum70} that the service accepts. */ -export enum KnownEnum70 { +/** Known values of {@link SingleQueryResultSeverity} that the service accepts. */ +export enum KnownSingleQueryResultSeverity { One = 1, Two = 2, Three = 3 } /** - * Defines values for Enum70. \ - * {@link KnownEnum70} can be used interchangeably with Enum70, + * Defines values for SingleQueryResultSeverity. \ + * {@link KnownSingleQueryResultSeverity} can be used interchangeably with SingleQueryResultSeverity, * this enum contains the known values that the service supports. * ### Known values supported by the service * **1** \ * **2** \ * **3** */ -export type Enum70 = number; +export type SingleQueryResultSeverity = number; -/** Known values of {@link Enum71} that the service accepts. */ -export enum KnownEnum71 { +/** Known values of {@link SingleQueryResultDirection} that the service accepts. */ +export enum KnownSingleQueryResultDirection { Zero = 0, One = 1, Two = 2 } /** - * Defines values for Enum71. \ - * {@link KnownEnum71} can be used interchangeably with Enum71, + * Defines values for SingleQueryResultDirection. \ + * {@link KnownSingleQueryResultDirection} can be used interchangeably with SingleQueryResultDirection, * this enum contains the known values that the service supports. * ### Known values supported by the service * **0** \ * **1** \ * **2** */ -export type Enum71 = number; +export type SingleQueryResultDirection = number; /** Known values of {@link IpAllocationType} that the service accepts. */ export enum KnownIpAllocationType { @@ -14763,6 +14827,48 @@ export interface ExpressRouteLinksListNextOptionalParams /** Contains response data for the listNext operation. */ export type ExpressRouteLinksListNextResponse = ExpressRouteLinkListResult; +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ExpressRoutePortAuthorizationsGetResponse = ExpressRoutePortAuthorization; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ExpressRoutePortAuthorizationsCreateOrUpdateResponse = ExpressRoutePortAuthorization; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ExpressRoutePortAuthorizationsListResponse = ExpressRoutePortAuthorizationListResult; + +/** Optional parameters. */ +export interface ExpressRoutePortAuthorizationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ExpressRoutePortAuthorizationsListNextResponse = ExpressRoutePortAuthorizationListResult; + /** Optional parameters. */ export interface FirewallPoliciesDeleteOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/network/arm-network/src/models/mappers.ts b/sdk/network/arm-network/src/models/mappers.ts index 0850c58d9d8b..800db4c7a199 100644 --- a/sdk/network/arm-network/src/models/mappers.ts +++ b/sdk/network/arm-network/src/models/mappers.ts @@ -4143,6 +4143,33 @@ export const GenerateExpressRoutePortsLOAResult: coreClient.CompositeMapper = { } }; +export const ExpressRoutePortAuthorizationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorizationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorization" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const FirewallPolicyThreatIntelWhitelist: coreClient.CompositeMapper = { serializedName: "FirewallPolicyThreatIntelWhitelist", type: { @@ -18271,6 +18298,64 @@ export const ExpressRouteCrossConnectionPeering: coreClient.CompositeMapper = { } }; +export const ExpressRoutePortAuthorization: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorization", + modelProperties: { + ...SubResource.type.modelProperties, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + etag: { + serializedName: "etag", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + authorizationKey: { + serializedName: "properties.authorizationKey", + readOnly: true, + type: { + name: "String" + } + }, + authorizationUseStatus: { + serializedName: "properties.authorizationUseStatus", + readOnly: true, + type: { + name: "String" + } + }, + circuitResourceUri: { + serializedName: "properties.circuitResourceUri", + readOnly: true, + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ExpressRouteLink: coreClient.CompositeMapper = { type: { name: "Composite", @@ -22812,6 +22897,12 @@ export const ExpressRouteCircuit: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + authorizationKey: { + serializedName: "properties.authorizationKey", + type: { + name: "String" + } } } } @@ -23056,6 +23147,18 @@ export const ExpressRoutePort: coreClient.CompositeMapper = { name: "String" } }, + authorizations: { + serializedName: "properties.authorizations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ExpressRoutePortAuthorization" + } + } + } + }, links: { serializedName: "properties.links", type: { diff --git a/sdk/network/arm-network/src/models/parameters.ts b/sdk/network/arm-network/src/models/parameters.ts index 4f81f563b0d9..3b6cfa5679a4 100644 --- a/sdk/network/arm-network/src/models/parameters.ts +++ b/sdk/network/arm-network/src/models/parameters.ts @@ -36,6 +36,7 @@ import { ExpressRouteCrossConnectionPeering as ExpressRouteCrossConnectionPeeringMapper, ExpressRoutePort as ExpressRoutePortMapper, GenerateExpressRoutePortsLOARequest as GenerateExpressRoutePortsLOARequestMapper, + ExpressRoutePortAuthorization as ExpressRoutePortAuthorizationMapper, FirewallPolicy as FirewallPolicyMapper, FirewallPolicyRuleCollectionGroup as FirewallPolicyRuleCollectionGroupMapper, IdpsQueryObject as IdpsQueryObjectMapper, @@ -181,7 +182,7 @@ export const applicationGatewayName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-05-01", + defaultValue: "2021-08-01", isConstant: true, serializedName: "api-version", type: { @@ -695,6 +696,11 @@ export const linkName: OperationURLParameter = { } }; +export const authorizationParameters1: OperationParameter = { + parameterPath: "authorizationParameters", + mapper: ExpressRoutePortAuthorizationMapper +}; + export const firewallPolicyName: OperationURLParameter = { parameterPath: "firewallPolicyName", mapper: { diff --git a/sdk/network/arm-network/src/networkManagementClient.ts b/sdk/network/arm-network/src/networkManagementClient.ts index 86d87cc2dbfe..e2fd4d21f5e2 100644 --- a/sdk/network/arm-network/src/networkManagementClient.ts +++ b/sdk/network/arm-network/src/networkManagementClient.ts @@ -41,6 +41,7 @@ import { ExpressRoutePortsLocationsImpl, ExpressRoutePortsImpl, ExpressRouteLinksImpl, + ExpressRoutePortAuthorizationsImpl, FirewallPoliciesImpl, FirewallPolicyRuleCollectionGroupsImpl, FirewallPolicyIdpsSignaturesImpl, @@ -155,6 +156,7 @@ import { ExpressRoutePortsLocations, ExpressRoutePorts, ExpressRouteLinks, + ExpressRoutePortAuthorizations, FirewallPolicies, FirewallPolicyRuleCollectionGroups, FirewallPolicyIdpsSignatures, @@ -307,7 +309,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-network/26.0.0`; + const packageDetails = `azsdk-js-arm-network/27.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -381,6 +383,9 @@ export class NetworkManagementClient extends coreClient.ServiceClient { this.expressRoutePortsLocations = new ExpressRoutePortsLocationsImpl(this); this.expressRoutePorts = new ExpressRoutePortsImpl(this); this.expressRouteLinks = new ExpressRouteLinksImpl(this); + this.expressRoutePortAuthorizations = new ExpressRoutePortAuthorizationsImpl( + this + ); this.firewallPolicies = new FirewallPoliciesImpl(this); this.firewallPolicyRuleCollectionGroups = new FirewallPolicyRuleCollectionGroupsImpl( this @@ -1325,6 +1330,7 @@ export class NetworkManagementClient extends coreClient.ServiceClient { expressRoutePortsLocations: ExpressRoutePortsLocations; expressRoutePorts: ExpressRoutePorts; expressRouteLinks: ExpressRouteLinks; + expressRoutePortAuthorizations: ExpressRoutePortAuthorizations; firewallPolicies: FirewallPolicies; firewallPolicyRuleCollectionGroups: FirewallPolicyRuleCollectionGroups; firewallPolicyIdpsSignatures: FirewallPolicyIdpsSignatures; diff --git a/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts new file mode 100644 index 000000000000..28bb1d7aa705 --- /dev/null +++ b/sdk/network/arm-network/src/operations/expressRoutePortAuthorizations.ts @@ -0,0 +1,487 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { ExpressRoutePortAuthorizations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { NetworkManagementClient } from "../networkManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationsListNextOptionalParams, + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, + ExpressRoutePortAuthorizationsGetResponse, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse, + ExpressRoutePortAuthorizationsListResponse, + ExpressRoutePortAuthorizationsListNextResponse +} from "../models"; + +/// +/** Class containing ExpressRoutePortAuthorizations operations. */ +export class ExpressRoutePortAuthorizationsImpl + implements ExpressRoutePortAuthorizations { + private readonly client: NetworkManagementClient; + + /** + * Initialize a new instance of the class ExpressRoutePortAuthorizations class. + * @param client Reference to the service client + */ + constructor(client: NetworkManagementClient) { + this.client = client; + } + + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + expressRoutePortName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage( + resourceGroupName, + expressRoutePortName, + options + ); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list( + resourceGroupName, + expressRoutePortName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + expressRoutePortName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + expressRoutePortName, + options + )) { + yield* page; + } + } + + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, expressRoutePortName, authorizationName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + expressRoutePortName, + authorizationName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, authorizationName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options + }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + expressRoutePortName, + authorizationName, + authorizationParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, options }, + listOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + expressRoutePortName: string, + nextLink: string, + options?: ExpressRoutePortAuthorizationsListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, expressRoutePortName, nextLink, options }, + listNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations/{authorizationName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 201: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 202: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + 204: { + bodyMapper: Mappers.ExpressRoutePortAuthorization + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.authorizationParameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.authorizationName, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/authorizations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorizationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExpressRoutePortAuthorizationListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.expressRoutePortName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/network/arm-network/src/operations/index.ts b/sdk/network/arm-network/src/operations/index.ts index 19e1496111f9..ec8b8d4fe718 100644 --- a/sdk/network/arm-network/src/operations/index.ts +++ b/sdk/network/arm-network/src/operations/index.ts @@ -35,6 +35,7 @@ export * from "./expressRouteCrossConnectionPeerings"; export * from "./expressRoutePortsLocations"; export * from "./expressRoutePorts"; export * from "./expressRouteLinks"; +export * from "./expressRoutePortAuthorizations"; export * from "./firewallPolicies"; export * from "./firewallPolicyRuleCollectionGroups"; export * from "./firewallPolicyIdpsSignatures"; diff --git a/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts new file mode 100644 index 000000000000..fc6032f6ff8e --- /dev/null +++ b/sdk/network/arm-network/src/operationsInterfaces/expressRoutePortAuthorizations.ts @@ -0,0 +1,111 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ExpressRoutePortAuthorization, + ExpressRoutePortAuthorizationsListOptionalParams, + ExpressRoutePortAuthorizationsDeleteOptionalParams, + ExpressRoutePortAuthorizationsGetOptionalParams, + ExpressRoutePortAuthorizationsGetResponse, + ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ExpressRoutePortAuthorizations. */ +export interface ExpressRoutePortAuthorizations { + /** + * Gets all authorizations in an express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + expressRoutePortName: string, + options?: ExpressRoutePortAuthorizationsListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsDeleteOptionalParams + ): Promise; + /** + * Gets the specified authorization from the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + options?: ExpressRoutePortAuthorizationsGetOptionalParams + ): Promise; + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ExpressRoutePortAuthorizationsCreateOrUpdateResponse + > + >; + /** + * Creates or updates an authorization in the specified express route port. + * @param resourceGroupName The name of the resource group. + * @param expressRoutePortName The name of the express route port. + * @param authorizationName The name of the authorization. + * @param authorizationParameters Parameters supplied to the create or update express route port + * authorization operation. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + expressRoutePortName: string, + authorizationName: string, + authorizationParameters: ExpressRoutePortAuthorization, + options?: ExpressRoutePortAuthorizationsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/network/arm-network/src/operationsInterfaces/index.ts b/sdk/network/arm-network/src/operationsInterfaces/index.ts index 19e1496111f9..ec8b8d4fe718 100644 --- a/sdk/network/arm-network/src/operationsInterfaces/index.ts +++ b/sdk/network/arm-network/src/operationsInterfaces/index.ts @@ -35,6 +35,7 @@ export * from "./expressRouteCrossConnectionPeerings"; export * from "./expressRoutePortsLocations"; export * from "./expressRoutePorts"; export * from "./expressRouteLinks"; +export * from "./expressRoutePortAuthorizations"; export * from "./firewallPolicies"; export * from "./firewallPolicyRuleCollectionGroups"; export * from "./firewallPolicyIdpsSignatures"; diff --git a/sdk/network/arm-network/test/sampleTest.ts b/sdk/network/arm-network/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/network/arm-network/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/network/arm-network/tsconfig.json b/sdk/network/arm-network/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/network/arm-network/tsconfig.json +++ b/sdk/network/arm-network/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file