From eb11c9cf58da8baacc07d161f4f8502d0bff8873 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 18 Nov 2022 02:43:29 +0000 Subject: [PATCH] CodeGen from PR 21599 in Azure/azure-rest-api-specs Update readme.python.md (#21599) --- common/config/rush/pnpm-lock.yaml | 17 +- .../arm-networkfunction/CHANGELOG.md | 28 +- .../arm-networkfunction/_meta.json | 8 +- .../arm-networkfunction/package.json | 16 +- .../review/arm-networkfunction.api.md | 42 ++- .../src/azureTrafficCollectorClient.ts | 41 ++- .../arm-networkfunction/src/models/index.ts | 275 ++++++++------- .../arm-networkfunction/src/models/mappers.ts | 329 +++++++++--------- .../src/models/parameters.ts | 19 +- .../src/operations/azureTrafficCollectors.ts | 10 +- .../src/operations/collectorPolicies.ts | 63 ++++ .../azureTrafficCollectors.ts | 4 + .../operationsInterfaces/collectorPolicies.ts | 24 +- .../arm-networkfunction/tsconfig.json | 10 +- 14 files changed, 504 insertions(+), 382 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d9ecde38cbc1..37ea6b20a4d5 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3892,7 +3892,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221116 + typescript: 5.0.0-dev.20221117 dev: false /downlevel-dts/0.8.0: @@ -8840,8 +8840,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221116: - resolution: {integrity: sha512-zLbvvDaFHHwquRZH6P42X5JOjP+BAYZvebvA+IuNjaaj8A8XKWYJbaoZ9qg/PL2E85oAsOTjuZOsp4Mk1ZSWKA==} + /typescript/5.0.0-dev.20221117: + resolution: {integrity: sha512-ey3t3RLhzH/bqAbH9oC0G6oV2B0tr8uWPkf5pjdxuQJq7l1EzToizBl7zSZAnY4q21iXyGSTGCgUqhYva+wu5Q==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -13513,7 +13513,7 @@ packages: dev: false file:projects/arm-networkfunction.tgz: - resolution: {integrity: sha512-7ZRZRmkWZ3oW+Myz/brKCV+WVHIB3Nn4jxLzZTKbWAHmCw8JbuFThAmYU8t6vopRUWqreT3Y0HqkPjAsSWIotg==, tarball: file:projects/arm-networkfunction.tgz} + resolution: {integrity: sha512-Slz/hv0+4h1oYRuURy22XFuBMu7GGB1aCYhwVVqM9HmMmc36twAD8YElEtiwgLKUsi70u6WEGvnAhl7J5AFrig==, tarball: file:projects/arm-networkfunction.tgz} name: '@rush-temp/arm-networkfunction' version: 0.0.0 dependencies: @@ -13532,7 +13532,7 @@ packages: rollup: 2.79.1 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.1 tslib: 2.4.1 - typescript: 4.2.4 + typescript: 4.6.4 uglify-js: 3.17.4 transitivePeerDependencies: - '@types/node' @@ -16253,7 +16253,7 @@ packages: '@azure/core-tracing': 1.0.0-preview.13 '@azure/logger-js': 1.3.2 '@microsoft/api-extractor': 7.33.5 - '@opentelemetry/api': 1.2.0 + '@opentelemetry/api': 1.3.0 '@types/chai': 4.3.3 '@types/express': 4.17.14 '@types/mocha': 7.0.2 @@ -16390,7 +16390,7 @@ packages: version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.33.5 - '@opentelemetry/api': 1.2.0 + '@opentelemetry/api': 1.3.0 '@types/chai': 4.3.3 '@types/chai-as-promised': 7.1.5 '@types/mocha': 7.0.2 @@ -17369,7 +17369,7 @@ packages: dev: false file:projects/keyvault-admin.tgz: - resolution: {integrity: sha512-miQaNAxeO2tHtjHRPb7yNvi/auwxLzlXyRt795aSfdN9UxiHUG4XuEdz2MWN9/IQCNCkzNZZUeVGa5BzTV5VNA==, tarball: file:projects/keyvault-admin.tgz} + resolution: {integrity: sha512-EGPQi5bU9bAsdBuTwXAqeL8dMZwhZi2bK3I2MLZ2rFabOs9hCPCXhRE+PPHE7Iey1AJrIf8PY8GkdckL5UR/pQ==, tarball: file:projects/keyvault-admin.tgz} name: '@rush-temp/keyvault-admin' version: 0.0.0 dependencies: @@ -17396,7 +17396,6 @@ packages: typescript: 4.8.4 uuid: 8.3.2 transitivePeerDependencies: - - encoding - supports-color dev: false diff --git a/sdk/networkfunction/arm-networkfunction/CHANGELOG.md b/sdk/networkfunction/arm-networkfunction/CHANGELOG.md index 4b65829fe942..97c1f1018500 100644 --- a/sdk/networkfunction/arm-networkfunction/CHANGELOG.md +++ b/sdk/networkfunction/arm-networkfunction/CHANGELOG.md @@ -1,15 +1,27 @@ # Release History + +## 2.0.0 (2022-11-18) + +**Features** -## 1.0.1 (Unreleased) + - Added operation CollectorPolicies.updateTags + - Added Interface CollectorPoliciesUpdateTagsOptionalParams + - Added Type Alias ApiVersionParameter + - Added Type Alias CollectorPoliciesUpdateTagsResponse + - Interface CollectorPoliciesCreateOrUpdateOptionalParams has a new optional parameter tags + - Added Enum KnownApiVersionParameter -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +**Breaking Changes** + - Operation AzureTrafficCollectors.beginCreateOrUpdate has a new signature + - Operation AzureTrafficCollectors.beginCreateOrUpdateAndWait has a new signature + - Operation CollectorPolicies.beginCreateOrUpdate has a new signature + - Operation CollectorPolicies.beginCreateOrUpdateAndWait has a new signature + - Interface AzureTrafficCollectorsCreateOrUpdateOptionalParams no longer has parameter collectorPolicies + - Interface AzureTrafficCollectorsCreateOrUpdateOptionalParams no longer has parameter location + - Parameter location of interface TrackedResource is now required + + ## 1.0.0 (2022-07-13) The package of @azure/arm-networkfunction is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/networkfunction/arm-networkfunction/_meta.json b/sdk/networkfunction/arm-networkfunction/_meta.json index 8ec2390a7150..562ef3baacc5 100644 --- a/sdk/networkfunction/arm-networkfunction/_meta.json +++ b/sdk/networkfunction/arm-networkfunction/_meta.json @@ -1,8 +1,8 @@ { - "commit": "96c6e14d4dfd2aef59a69a43185308567fec8c07", + "commit": "4f8a52119114fdc8159fcc556ec580b090241f33", "readme": "specification/networkfunction/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\networkfunction\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/networkfunction/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.2", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.0", - "use": "@autorest/typescript@6.0.0-rc.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.5.1", + "use": "@autorest/typescript@6.0.0-rc.2" } \ No newline at end of file diff --git a/sdk/networkfunction/arm-networkfunction/package.json b/sdk/networkfunction/arm-networkfunction/package.json index d893d32afa84..9eb26f1f7180 100644 --- a/sdk/networkfunction/arm-networkfunction/package.json +++ b/sdk/networkfunction/arm-networkfunction/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for AzureTrafficCollectorClient.", - "version": "1.0.1", + "version": "2.0.0", "engines": { "node": ">=14.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.2.0", + "typescript": "~4.6.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-networkfunction?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/networkfunction/arm-networkfunction/review/arm-networkfunction.api.md b/sdk/networkfunction/arm-networkfunction/review/arm-networkfunction.api.md index f731ac8c4ab6..b0cf85300ea1 100644 --- a/sdk/networkfunction/arm-networkfunction/review/arm-networkfunction.api.md +++ b/sdk/networkfunction/arm-networkfunction/review/arm-networkfunction.api.md @@ -10,9 +10,12 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; +// @public +export type ApiVersionParameter = string; + // @public export interface AzureTrafficCollector extends TrackedResource { - collectorPolicies?: CollectorPolicy[]; + readonly collectorPolicies?: ResourceReference[]; readonly etag?: string; readonly provisioningState?: ProvisioningState; virtualHub?: ResourceReference; @@ -54,8 +57,8 @@ export interface AzureTrafficCollectorListResult { // @public export interface AzureTrafficCollectors { - beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise, AzureTrafficCollectorsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise, AzureTrafficCollectorsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise; get(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsGetOptionalParams): Promise; @@ -102,8 +105,6 @@ export type AzureTrafficCollectorsBySubscriptionListResponse = AzureTrafficColle // @public export interface AzureTrafficCollectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - collectorPolicies?: CollectorPolicy[]; - location?: string; resumeFrom?: string; tags?: { [propertyName: string]: string; @@ -150,12 +151,13 @@ export interface CloudErrorBody { // @public export interface CollectorPolicies { - beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise, CollectorPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise, CollectorPoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise; get(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesGetOptionalParams): Promise; list(resourceGroupName: string, azureTrafficCollectorName: string, options?: CollectorPoliciesListOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, parameters: TagsObject, options?: CollectorPoliciesUpdateTagsOptionalParams): Promise; } // @public @@ -163,6 +165,9 @@ export interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClien emissionPolicies?: EmissionPoliciesPropertiesFormat[]; ingestionPolicy?: IngestionPolicyPropertiesFormat; resumeFrom?: string; + tags?: { + [propertyName: string]: string; + }; updateIntervalInMs?: number; } @@ -197,12 +202,18 @@ export interface CollectorPoliciesListOptionalParams extends coreClient.Operatio export type CollectorPoliciesListResponse = CollectorPolicyListResult; // @public -export interface CollectorPolicy extends ProxyResource { +export interface CollectorPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CollectorPoliciesUpdateTagsResponse = CollectorPolicy; + +// @public +export interface CollectorPolicy extends TrackedResource { emissionPolicies?: EmissionPoliciesPropertiesFormat[]; readonly etag?: string; ingestionPolicy?: IngestionPolicyPropertiesFormat; readonly provisioningState?: ProvisioningState; - readonly systemData?: CollectorPolicySystemData; } // @public @@ -211,10 +222,6 @@ export interface CollectorPolicyListResult { value?: CollectorPolicy[]; } -// @public -export interface CollectorPolicySystemData extends SystemData { -} - // @public export type CreatedByType = string; @@ -250,6 +257,13 @@ export interface IngestionSourcesPropertiesFormat { // @public export type IngestionType = string; +// @public +export enum KnownApiVersionParameter { + TwoThousandTwentyTwo0501 = "2022-05-01", + TwoThousandTwentyTwo0801 = "2022-08-01", + TwoThousandTwentyTwo1101 = "2022-11-01" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -357,7 +371,7 @@ export interface TagsObject { // @public export interface TrackedResource { readonly id?: string; - location?: string; + location: string; readonly name?: string; readonly systemData?: TrackedResourceSystemData; tags?: { diff --git a/sdk/networkfunction/arm-networkfunction/src/azureTrafficCollectorClient.ts b/sdk/networkfunction/arm-networkfunction/src/azureTrafficCollectorClient.ts index 5041d5ac9da9..fb4ea889efcc 100644 --- a/sdk/networkfunction/arm-networkfunction/src/azureTrafficCollectorClient.ts +++ b/sdk/networkfunction/arm-networkfunction/src/azureTrafficCollectorClient.ts @@ -62,7 +62,7 @@ export class AzureTrafficCollectorClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-networkfunction/1.0.1`; + const packageDetails = `azsdk-js-arm-networkfunction/2.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -82,34 +82,41 @@ export class AzureTrafficCollectorClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); + let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } + } + if ( + !options || + !options.pipeline || + options.pipeline.getOrderedPolicies().length == 0 || + !bearerTokenAuthenticationPolicyFound + ) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + credential: credentials, + scopes: `${optionsWithDefaults.credentialScopes}`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-05-01"; + this.apiVersion = options.apiVersion || "2022-11-01"; this.networkFunction = new NetworkFunctionImpl(this); this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl( this diff --git a/sdk/networkfunction/arm-networkfunction/src/models/index.ts b/sdk/networkfunction/arm-networkfunction/src/models/index.ts index aeefbe1e13c3..c9119b4bad4b 100644 --- a/sdk/networkfunction/arm-networkfunction/src/models/index.ts +++ b/sdk/networkfunction/arm-networkfunction/src/models/index.ts @@ -69,69 +69,6 @@ export interface AzureTrafficCollectorListResult { readonly nextLink?: string; } -/** Ingestion Policy properties. */ -export interface IngestionPolicyPropertiesFormat { - /** The ingestion type. */ - ingestionType?: IngestionType; - /** Ingestion Sources. */ - ingestionSources?: IngestionSourcesPropertiesFormat[]; -} - -/** Ingestion policy properties. */ -export interface IngestionSourcesPropertiesFormat { - /** Ingestion source type. */ - sourceType?: SourceType; - /** Resource ID. */ - resourceId?: string; -} - -/** Emission policy properties. */ -export interface EmissionPoliciesPropertiesFormat { - /** Emission format type. */ - emissionType?: EmissionType; - /** Emission policy destinations. */ - emissionDestinations?: EmissionPolicyDestination[]; -} - -/** Emission policy destination properties. */ -export interface EmissionPolicyDestination { - /** Emission destination type. */ - destinationType?: DestinationType; -} - -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; -} - -/** An azure resource object */ -export interface ProxyResource { - /** - * Azure resource Id - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Azure resource type - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** - * Azure resource name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; -} - /** Resource reference properties. */ export interface ResourceReference { /** @@ -159,7 +96,7 @@ export interface TrackedResource { */ readonly type?: string; /** Resource location. */ - location?: string; + location: string; /** Resource tags. */ tags?: { [propertyName: string]: string }; /** @@ -169,6 +106,20 @@ export interface TrackedResource { readonly systemData?: TrackedResourceSystemData; } +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; +} + /** Tags object for patch operations. */ export interface TagsObject { /** Resource tags. */ @@ -186,33 +137,53 @@ export interface CollectorPolicyListResult { readonly nextLink?: string; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface CollectorPolicySystemData extends SystemData {} +/** Ingestion Policy properties. */ +export interface IngestionPolicyPropertiesFormat { + /** The ingestion type. */ + ingestionType?: IngestionType; + /** Ingestion Sources. */ + ingestionSources?: IngestionSourcesPropertiesFormat[]; +} -/** Metadata pertaining to creation and last modification of the resource. */ -export interface TrackedResourceSystemData extends SystemData {} +/** Ingestion policy properties. */ +export interface IngestionSourcesPropertiesFormat { + /** Ingestion source type. */ + sourceType?: SourceType; + /** Resource ID. */ + resourceId?: string; +} -/** Collector policy resource. */ -export interface CollectorPolicy extends ProxyResource { +/** Emission policy properties. */ +export interface EmissionPoliciesPropertiesFormat { + /** Emission format type. */ + emissionType?: EmissionType; + /** Emission policy destinations. */ + emissionDestinations?: EmissionPolicyDestination[]; +} + +/** Emission policy destination properties. */ +export interface EmissionPolicyDestination { + /** Emission destination type. */ + destinationType?: DestinationType; +} + +/** An azure resource object */ +export interface ProxyResource { /** - * A unique read-only string that changes whenever the resource is updated. + * Azure resource Id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly etag?: string; + readonly id?: string; /** - * Metadata pertaining to creation and last modification of the resource. + * Azure resource type * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: CollectorPolicySystemData; - /** Ingestion policies. */ - ingestionPolicy?: IngestionPolicyPropertiesFormat; - /** Emission policies. */ - emissionPolicies?: EmissionPoliciesPropertiesFormat[]; + readonly type?: string; /** - * The provisioning state. + * Azure resource name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; + readonly name?: string; } /** Azure Traffic Collector resource. */ @@ -222,8 +193,11 @@ export interface AzureTrafficCollector extends TrackedResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly etag?: string; - /** Collector Policies for Azure Traffic Collector. */ - collectorPolicies?: CollectorPolicy[]; + /** + * Collector Policies for Azure Traffic Collector. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly collectorPolicies?: ResourceReference[]; /** The virtualHub to which the Azure Traffic Collector belongs. */ virtualHub?: ResourceReference; /** @@ -233,6 +207,75 @@ export interface AzureTrafficCollector extends TrackedResource { readonly provisioningState?: ProvisioningState; } +/** Collector policy resource. */ +export interface CollectorPolicy extends TrackedResource { + /** + * 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; + /** Ingestion policies. */ + ingestionPolicy?: IngestionPolicyPropertiesFormat; + /** Emission policies. */ + emissionPolicies?: EmissionPoliciesPropertiesFormat[]; + /** + * The provisioning state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: ProvisioningState; +} + +/** Metadata pertaining to creation and last modification of the resource. */ +export interface TrackedResourceSystemData extends SystemData {} + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Failed */ + Failed = "Failed" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Updating** \ + * **Deleting** \ + * **Failed** + */ +export type ProvisioningState = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + /** Known values of {@link IngestionType} that the service accepts. */ export enum KnownIngestionType { /** Ipfix */ @@ -293,53 +336,26 @@ export enum KnownDestinationType { */ export type DestinationType = string; -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Succeeded */ - Succeeded = "Succeeded", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", - /** Failed */ - Failed = "Failed" +/** Known values of {@link ApiVersionParameter} that the service accepts. */ +export enum KnownApiVersionParameter { + /** TwoThousandTwentyTwo0501 */ + TwoThousandTwentyTwo0501 = "2022-05-01", + /** TwoThousandTwentyTwo0801 */ + TwoThousandTwentyTwo0801 = "2022-08-01", + /** TwoThousandTwentyTwo1101 */ + TwoThousandTwentyTwo1101 = "2022-11-01" } /** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * Defines values for ApiVersionParameter. \ + * {@link KnownApiVersionParameter} can be used interchangeably with ApiVersionParameter, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** \ - * **Updating** \ - * **Deleting** \ - * **Failed** + * **2022-05-01** \ + * **2022-08-01** \ + * **2022-11-01** */ -export type ProvisioningState = string; - -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" -} - -/** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** - */ -export type CreatedByType = string; +export type ApiVersionParameter = string; /** Optional parameters. */ export interface NetworkFunctionListOperationsOptionalParams @@ -386,12 +402,8 @@ export type AzureTrafficCollectorsGetResponse = AzureTrafficCollector; /** Optional parameters. */ export interface AzureTrafficCollectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - /** Resource location. */ - location?: string; /** Resource tags. */ tags?: { [propertyName: string]: string }; - /** Collector Policies for Azure Traffic Collector. */ - collectorPolicies?: CollectorPolicy[]; /** The virtualHub to which the Azure Traffic Collector belongs. */ virtualHub?: ResourceReference; /** Delay to wait until next poll, in milliseconds. */ @@ -436,6 +448,8 @@ export type CollectorPoliciesGetResponse = CollectorPolicy; /** Optional parameters. */ export interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; /** Ingestion policies. */ ingestionPolicy?: IngestionPolicyPropertiesFormat; /** Emission policies. */ @@ -458,6 +472,13 @@ export interface CollectorPoliciesDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface CollectorPoliciesUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type CollectorPoliciesUpdateTagsResponse = CollectorPolicy; + /** Optional parameters. */ export interface CollectorPoliciesListNextOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/networkfunction/arm-networkfunction/src/models/mappers.ts b/sdk/networkfunction/arm-networkfunction/src/models/mappers.ts index 0432d53758ed..c79e0d4c78ce 100644 --- a/sdk/networkfunction/arm-networkfunction/src/models/mappers.ts +++ b/sdk/networkfunction/arm-networkfunction/src/models/mappers.ts @@ -186,90 +186,67 @@ export const AzureTrafficCollectorListResult: coreClient.CompositeMapper = { } }; -export const IngestionPolicyPropertiesFormat: coreClient.CompositeMapper = { +export const ResourceReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IngestionPolicyPropertiesFormat", + className: "ResourceReference", modelProperties: { - ingestionType: { - serializedName: "ingestionType", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } - }, - ingestionSources: { - serializedName: "ingestionSources", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IngestionSourcesPropertiesFormat" - } - } - } } } } }; -export const IngestionSourcesPropertiesFormat: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IngestionSourcesPropertiesFormat", + className: "TrackedResource", modelProperties: { - sourceType: { - serializedName: "sourceType", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - resourceId: { - serializedName: "resourceId", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const EmissionPoliciesPropertiesFormat: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmissionPoliciesPropertiesFormat", - modelProperties: { - emissionType: { - serializedName: "emissionType", + }, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - emissionDestinations: { - serializedName: "emissionDestinations", + location: { + serializedName: "location", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EmissionPolicyDestination" - } - } + name: "String" } - } - } - } -}; - -export const EmissionPolicyDestination: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "EmissionPolicyDestination", - modelProperties: { - destinationType: { - serializedName: "destinationType", + }, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "TrackedResourceSystemData" } } } @@ -315,43 +292,41 @@ export const SystemData: coreClient.CompositeMapper = { } }; -export const ProxyResource: coreClient.CompositeMapper = { +export const TagsObject: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ProxyResource", + className: "TagsObject", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ResourceReference: coreClient.CompositeMapper = { +export const CollectorPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceReference", + className: "CollectorPolicyListResult", modelProperties: { - id: { - serializedName: "id", + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CollectorPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" @@ -361,126 +336,132 @@ export const ResourceReference: coreClient.CompositeMapper = { } }; -export const TrackedResource: coreClient.CompositeMapper = { +export const IngestionPolicyPropertiesFormat: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResource", + className: "IngestionPolicyPropertiesFormat", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - location: { - serializedName: "location", + ingestionType: { + serializedName: "ingestionType", type: { name: "String" } }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - systemData: { - serializedName: "systemData", + ingestionSources: { + serializedName: "ingestionSources", type: { - name: "Composite", - className: "TrackedResourceSystemData" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IngestionSourcesPropertiesFormat" + } + } } } } } }; -export const TagsObject: coreClient.CompositeMapper = { +export const IngestionSourcesPropertiesFormat: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TagsObject", + className: "IngestionSourcesPropertiesFormat", modelProperties: { - tags: { - serializedName: "tags", + sourceType: { + serializedName: "sourceType", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + resourceId: { + serializedName: "resourceId", + type: { + name: "String" } } } } }; -export const CollectorPolicyListResult: coreClient.CompositeMapper = { +export const EmissionPoliciesPropertiesFormat: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CollectorPolicyListResult", + className: "EmissionPoliciesPropertiesFormat", modelProperties: { - value: { - serializedName: "value", + emissionType: { + serializedName: "emissionType", + type: { + name: "String" + } + }, + emissionDestinations: { + serializedName: "emissionDestinations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CollectorPolicy" + className: "EmissionPolicyDestination" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const CollectorPolicySystemData: coreClient.CompositeMapper = { +export const EmissionPolicyDestination: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CollectorPolicySystemData", + className: "EmissionPolicyDestination", modelProperties: { - ...SystemData.type.modelProperties + destinationType: { + serializedName: "destinationType", + type: { + name: "String" + } + } } } }; -export const TrackedResourceSystemData: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TrackedResourceSystemData", + className: "ProxyResource", modelProperties: { - ...SystemData.type.modelProperties + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const CollectorPolicy: coreClient.CompositeMapper = { +export const AzureTrafficCollector: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CollectorPolicy", + className: "AzureTrafficCollector", modelProperties: { - ...ProxyResource.type.modelProperties, + ...TrackedResource.type.modelProperties, etag: { serializedName: "etag", readOnly: true, @@ -488,32 +469,26 @@ export const CollectorPolicy: coreClient.CompositeMapper = { name: "String" } }, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "CollectorPolicySystemData" - } - }, - ingestionPolicy: { - serializedName: "properties.ingestionPolicy", - type: { - name: "Composite", - className: "IngestionPolicyPropertiesFormat" - } - }, - emissionPolicies: { - serializedName: "properties.emissionPolicies", + collectorPolicies: { + serializedName: "properties.collectorPolicies", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "EmissionPoliciesPropertiesFormat" + className: "ResourceReference" } } } }, + virtualHub: { + serializedName: "properties.virtualHub", + type: { + name: "Composite", + className: "ResourceReference" + } + }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -525,10 +500,10 @@ export const CollectorPolicy: coreClient.CompositeMapper = { } }; -export const AzureTrafficCollector: coreClient.CompositeMapper = { +export const CollectorPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureTrafficCollector", + className: "CollectorPolicy", modelProperties: { ...TrackedResource.type.modelProperties, etag: { @@ -538,25 +513,25 @@ export const AzureTrafficCollector: coreClient.CompositeMapper = { name: "String" } }, - collectorPolicies: { - serializedName: "properties.collectorPolicies", + ingestionPolicy: { + serializedName: "properties.ingestionPolicy", + type: { + name: "Composite", + className: "IngestionPolicyPropertiesFormat" + } + }, + emissionPolicies: { + serializedName: "properties.emissionPolicies", type: { name: "Sequence", element: { type: { name: "Composite", - className: "CollectorPolicy" + className: "EmissionPoliciesPropertiesFormat" } } } }, - virtualHub: { - serializedName: "properties.virtualHub", - type: { - name: "Composite", - className: "ResourceReference" - } - }, provisioningState: { serializedName: "properties.provisioningState", readOnly: true, @@ -567,3 +542,13 @@ export const AzureTrafficCollector: coreClient.CompositeMapper = { } } }; + +export const TrackedResourceSystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResourceSystemData", + modelProperties: { + ...SystemData.type.modelProperties + } + } +}; diff --git a/sdk/networkfunction/arm-networkfunction/src/models/parameters.ts b/sdk/networkfunction/arm-networkfunction/src/models/parameters.ts index 026880fe15c2..c623e277b423 100644 --- a/sdk/networkfunction/arm-networkfunction/src/models/parameters.ts +++ b/sdk/networkfunction/arm-networkfunction/src/models/parameters.ts @@ -44,7 +44,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-05-01", + defaultValue: "2022-11-01", isConstant: true, serializedName: "api-version", type: { @@ -111,7 +111,7 @@ export const contentType: OperationParameter = { }; export const location: OperationParameter = { - parameterPath: ["options", "location"], + parameterPath: "location", mapper: AzureTrafficCollectorMapper }; @@ -120,11 +120,6 @@ export const tags: OperationParameter = { mapper: AzureTrafficCollectorMapper }; -export const collectorPolicies: OperationParameter = { - parameterPath: ["options", "collectorPolicies"], - mapper: AzureTrafficCollectorMapper -}; - export const virtualHub: OperationParameter = { parameterPath: ["options", "virtualHub"], mapper: AzureTrafficCollectorMapper @@ -146,6 +141,16 @@ export const collectorPolicyName: OperationURLParameter = { } }; +export const location1: OperationParameter = { + parameterPath: "location", + mapper: CollectorPolicyMapper +}; + +export const tags1: OperationParameter = { + parameterPath: ["options", "tags"], + mapper: CollectorPolicyMapper +}; + export const ingestionPolicy: OperationParameter = { parameterPath: ["options", "ingestionPolicy"], mapper: CollectorPolicyMapper diff --git a/sdk/networkfunction/arm-networkfunction/src/operations/azureTrafficCollectors.ts b/sdk/networkfunction/arm-networkfunction/src/operations/azureTrafficCollectors.ts index 7a69deea75a9..5ff0e5444a04 100644 --- a/sdk/networkfunction/arm-networkfunction/src/operations/azureTrafficCollectors.ts +++ b/sdk/networkfunction/arm-networkfunction/src/operations/azureTrafficCollectors.ts @@ -57,11 +57,13 @@ export class AzureTrafficCollectorsImpl implements AzureTrafficCollectors { * Creates or updates a Azure Traffic Collector resource * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name + * @param location Resource location. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, azureTrafficCollectorName: string, + location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -110,7 +112,7 @@ export class AzureTrafficCollectorsImpl implements AzureTrafficCollectors { const lro = new LroImpl( sendOperation, - { resourceGroupName, azureTrafficCollectorName, options }, + { resourceGroupName, azureTrafficCollectorName, location, options }, createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { @@ -126,16 +128,19 @@ export class AzureTrafficCollectorsImpl implements AzureTrafficCollectors { * Creates or updates a Azure Traffic Collector resource * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name + * @param location Resource location. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, azureTrafficCollectorName: string, + location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, azureTrafficCollectorName, + location, options ); return poller.pollUntilDone(); @@ -291,9 +296,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, requestBody: { parameterPath: { - location: ["options", "location"], + location: ["location"], tags: ["options", "tags"], - collectorPolicies: ["options", "collectorPolicies"], virtualHub: ["options", "virtualHub"] }, mapper: { ...Mappers.AzureTrafficCollector, required: true } diff --git a/sdk/networkfunction/arm-networkfunction/src/operations/collectorPolicies.ts b/sdk/networkfunction/arm-networkfunction/src/operations/collectorPolicies.ts index 7e521971c6ad..c82f9282d70c 100644 --- a/sdk/networkfunction/arm-networkfunction/src/operations/collectorPolicies.ts +++ b/sdk/networkfunction/arm-networkfunction/src/operations/collectorPolicies.ts @@ -24,6 +24,9 @@ import { CollectorPoliciesCreateOrUpdateOptionalParams, CollectorPoliciesCreateOrUpdateResponse, CollectorPoliciesDeleteOptionalParams, + TagsObject, + CollectorPoliciesUpdateTagsOptionalParams, + CollectorPoliciesUpdateTagsResponse, CollectorPoliciesListNextResponse } from "../models"; @@ -157,12 +160,14 @@ export class CollectorPoliciesImpl implements CollectorPolicies { * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name * @param collectorPolicyName Collector Policy Name + * @param location Resource location. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, + location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -215,6 +220,7 @@ export class CollectorPoliciesImpl implements CollectorPolicies { resourceGroupName, azureTrafficCollectorName, collectorPolicyName, + location, options }, createOrUpdateOperationSpec @@ -233,18 +239,21 @@ export class CollectorPoliciesImpl implements CollectorPolicies { * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name * @param collectorPolicyName Collector Policy Name + * @param location Resource location. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, + location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, azureTrafficCollectorName, collectorPolicyName, + location, options ); return poller.pollUntilDone(); @@ -343,6 +352,33 @@ export class CollectorPoliciesImpl implements CollectorPolicies { return poller.pollUntilDone(); } + /** + * Updates the specified Collector Policy tags. + * @param resourceGroupName The name of the resource group. + * @param azureTrafficCollectorName Azure Traffic Collector name + * @param collectorPolicyName Collector Policy Name + * @param parameters Parameters supplied to update Collector Policy tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + azureTrafficCollectorName: string, + collectorPolicyName: string, + parameters: TagsObject, + options?: CollectorPoliciesUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + azureTrafficCollectorName, + collectorPolicyName, + parameters, + options + }, + updateTagsOperationSpec + ); + } + /** * ListNext * @param resourceGroupName The name of the resource group. @@ -433,6 +469,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, requestBody: { parameterPath: { + location: ["location"], + tags: ["options", "tags"], ingestionPolicy: ["options", "ingestionPolicy"], emissionPolicies: ["options", "emissionPolicies"] }, @@ -474,6 +512,31 @@ const deleteOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.CollectorPolicy + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.azureTrafficCollectorName, + Parameters.collectorPolicyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", diff --git a/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/azureTrafficCollectors.ts b/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/azureTrafficCollectors.ts index c3e398b9d46b..ca39f72cf40e 100644 --- a/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/azureTrafficCollectors.ts +++ b/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/azureTrafficCollectors.ts @@ -35,11 +35,13 @@ export interface AzureTrafficCollectors { * Creates or updates a Azure Traffic Collector resource * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name + * @param location Resource location. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, azureTrafficCollectorName: string, + location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -51,11 +53,13 @@ export interface AzureTrafficCollectors { * Creates or updates a Azure Traffic Collector resource * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name + * @param location Resource location. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, azureTrafficCollectorName: string, + location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams ): Promise; /** diff --git a/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/collectorPolicies.ts b/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/collectorPolicies.ts index c7e0755cd3dc..1a39341dd5db 100644 --- a/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/collectorPolicies.ts +++ b/sdk/networkfunction/arm-networkfunction/src/operationsInterfaces/collectorPolicies.ts @@ -15,7 +15,10 @@ import { CollectorPoliciesGetResponse, CollectorPoliciesCreateOrUpdateOptionalParams, CollectorPoliciesCreateOrUpdateResponse, - CollectorPoliciesDeleteOptionalParams + CollectorPoliciesDeleteOptionalParams, + TagsObject, + CollectorPoliciesUpdateTagsOptionalParams, + CollectorPoliciesUpdateTagsResponse } from "../models"; /// @@ -50,12 +53,14 @@ export interface CollectorPolicies { * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name * @param collectorPolicyName Collector Policy Name + * @param location Resource location. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, + location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -68,12 +73,14 @@ export interface CollectorPolicies { * @param resourceGroupName The name of the resource group. * @param azureTrafficCollectorName Azure Traffic Collector name * @param collectorPolicyName Collector Policy Name + * @param location Resource location. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, + location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams ): Promise; /** @@ -102,4 +109,19 @@ export interface CollectorPolicies { collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams ): Promise; + /** + * Updates the specified Collector Policy tags. + * @param resourceGroupName The name of the resource group. + * @param azureTrafficCollectorName Azure Traffic Collector name + * @param collectorPolicyName Collector Policy Name + * @param parameters Parameters supplied to update Collector Policy tags. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + azureTrafficCollectorName: string, + collectorPolicyName: string, + parameters: TagsObject, + options?: CollectorPoliciesUpdateTagsOptionalParams + ): Promise; } diff --git a/sdk/networkfunction/arm-networkfunction/tsconfig.json b/sdk/networkfunction/arm-networkfunction/tsconfig.json index 16f2e23a1d30..3e6ae96443f3 100644 --- a/sdk/networkfunction/arm-networkfunction/tsconfig.json +++ b/sdk/networkfunction/arm-networkfunction/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-networkfunction": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"