Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 20 additions & 8 deletions sdk/networkfunction/arm-networkfunction/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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).
8 changes: 4 additions & 4 deletions sdk/networkfunction/arm-networkfunction/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "96c6e14d4dfd2aef59a69a43185308567fec8c07",
"commit": "223653b19c32a4ec2d3307bd1e20f841f8779577",
"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/[email protected].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/[email protected].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/[email protected].1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.5.1",
"use": "@autorest/[email protected].2"
}
16 changes: 4 additions & 12 deletions sdk/networkfunction/arm-networkfunction/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,8 +57,8 @@ export interface AzureTrafficCollectorListResult {

// @public
export interface AzureTrafficCollectors {
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsGetOptionalParams): Promise<AzureTrafficCollectorsGetResponse>;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -150,19 +151,23 @@ export interface CloudErrorBody {

// @public
export interface CollectorPolicies {
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
beginDelete(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesGetOptionalParams): Promise<CollectorPoliciesGetResponse>;
list(resourceGroupName: string, azureTrafficCollectorName: string, options?: CollectorPoliciesListOptionalParams): PagedAsyncIterableIterator<CollectorPolicy>;
updateTags(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, parameters: TagsObject, options?: CollectorPoliciesUpdateTagsOptionalParams): Promise<CollectorPoliciesUpdateTagsResponse>;
}

// @public
export interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
emissionPolicies?: EmissionPoliciesPropertiesFormat[];
ingestionPolicy?: IngestionPolicyPropertiesFormat;
resumeFrom?: string;
tags?: {
[propertyName: string]: string;
};
updateIntervalInMs?: number;
}

Expand Down Expand Up @@ -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
Expand All @@ -211,10 +222,6 @@ export interface CollectorPolicyListResult {
value?: CollectorPolicy[];
}

// @public
export interface CollectorPolicySystemData extends SystemData {
}

// @public
export type CreatedByType = string;

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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?: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand All @@ -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
Expand Down
Loading