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
10 changes: 5 additions & 5 deletions common/config/rush/pnpm-lock.yaml

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

27 changes: 7 additions & 20 deletions sdk/msi/arm-msi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
# Release History

## 2.1.0-beta.3 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

## 2.1.0-beta.2 (2022-06-27)

## 2.1.0 (2023-02-02)

**Features**

- Added operation group FederatedIdentityCredentials
- Added operation UserAssignedIdentities.listAssociatedResources
- Added Interface AssociatedResourcesListResult
- Added Interface AzureResource
- Added Interface FederatedIdentityCredential
- Added Interface FederatedIdentityCredentialsCreateOrUpdateOptionalParams
- Added Interface FederatedIdentityCredentialsDeleteOptionalParams
Expand All @@ -29,16 +16,16 @@
- Added Interface IdentityUpdate
- Added Interface ProxyResource
- Added Interface SystemAssignedIdentity
- Added Interface SystemData
- Added Interface TrackedResource
- Added Interface UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams
- Added Interface UserAssignedIdentitiesListAssociatedResourcesOptionalParams
- Added Type Alias CreatedByType
- Added Type Alias FederatedIdentityCredentialsCreateOrUpdateResponse
- Added Type Alias FederatedIdentityCredentialsGetResponse
- Added Type Alias FederatedIdentityCredentialsListNextResponse
- Added Type Alias FederatedIdentityCredentialsListResponse
- Added Type Alias UserAssignedIdentitiesListAssociatedResourcesNextResponse
- Added Type Alias UserAssignedIdentitiesListAssociatedResourcesResponse
- Class ManagedServiceIdentityClient has a new parameter federatedIdentityCredentials
- Interface Resource has a new optional parameter systemData
- Added Enum KnownCreatedByType
- Added function getContinuationToken


## 2.0.0 (2021-12-17)
Expand Down
2 changes: 1 addition & 1 deletion sdk/msi/arm-msi/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 Microsoft
Copyright (c) 2023 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion sdk/msi/arm-msi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Managed Service Identity Client.

[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/msi/arm-msi) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-msi) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-msi?view=azure-node-preview) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-msi) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)

## Getting started
Expand Down
8 changes: 4 additions & 4 deletions sdk/msi/arm-msi/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "fda2db441da3f1fab31bb235e97da3e33c8e3903",
"commit": "1f5f271fa98e45e515c7078f0ae9d64c3674c5cc",
"readme": "specification/msi/resource-manager/readme.md",
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\msi\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1 --generate-sample=true",
"autorest_command": "autorest --version=3.9.3 --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/msi/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.3.2",
"use": "@autorest/typescript@6.0.0-rc.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.1",
"use": "@autorest/typescript@6.0.0-rc.5"
}
19 changes: 6 additions & 13 deletions sdk/msi/arm-msi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ManagedServiceIdentityClient.",
"version": "2.1.0-beta.3",
"version": "2.1.0",
"engines": {
"node": ">=14.0.0"
},
"dependencies": {
"@azure/core-paging": "^1.2.0",
"@azure/core-client": "^1.5.0",
"@azure/core-client": "^1.6.1",
"@azure/core-auth": "^1.3.0",
"@azure/core-rest-pipeline": "^1.8.0",
"tslib": "^2.2.0"
Expand All @@ -34,7 +34,7 @@
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.2.0",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
Expand All @@ -44,6 +44,7 @@
"@types/chai": "^4.2.8",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"@types/node": "^14.0.0",
"@azure/dev-tool": "^1.0.0"
},
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/msi/arm-msi",
Expand Down Expand Up @@ -107,13 +108,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-msi?view=azure-node-preview"
}
}
"autoPublish": true
}
69 changes: 25 additions & 44 deletions sdk/msi/arm-msi/review/arm-msi.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,6 @@ import * as coreAuth from '@azure/core-auth';
import * as coreClient from '@azure/core-client';
import { PagedAsyncIterableIterator } from '@azure/core-paging';

// @public
export interface AssociatedResourcesListResult {
readonly nextLink?: string;
readonly totalCount?: number;
readonly value?: AzureResource[];
}

// @public
export interface AzureResource {
readonly id?: string;
readonly name?: string;
readonly resourceGroup?: string;
readonly subscriptionDisplayName?: string;
readonly subscriptionId?: string;
readonly type?: string;
}

// @public
export interface CloudError {
error?: CloudErrorBody;
Expand All @@ -38,6 +21,9 @@ export interface CloudErrorBody {
target?: string;
}

// @public
export type CreatedByType = string;

// @public
export interface FederatedIdentityCredential extends ProxyResource {
audiences?: string[];
Expand Down Expand Up @@ -73,8 +59,6 @@ export type FederatedIdentityCredentialsGetResponse = FederatedIdentityCredentia

// @public
export interface FederatedIdentityCredentialsListNextOptionalParams extends coreClient.OperationOptions {
skiptoken?: string;
top?: number;
}

// @public
Expand All @@ -95,6 +79,9 @@ export interface FederatedIdentityCredentialsListResult {
value?: FederatedIdentityCredential[];
}

// @public
export function getContinuationToken(page: unknown): string | undefined;

// @public
export interface Identity extends TrackedResource {
readonly clientId?: string;
Expand All @@ -113,6 +100,14 @@ export interface IdentityUpdate extends Resource {
readonly tenantId?: string;
}

// @public
export enum KnownCreatedByType {
Application = "Application",
Key = "Key",
ManagedIdentity = "ManagedIdentity",
User = "User"
}

// @public (undocumented)
export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
// (undocumented)
Expand Down Expand Up @@ -186,6 +181,7 @@ export interface ProxyResource extends Resource {
export interface Resource {
readonly id?: string;
readonly name?: string;
readonly systemData?: SystemData;
readonly type?: string;
}

Expand Down Expand Up @@ -213,6 +209,16 @@ export interface SystemAssignedIdentity extends ProxyResource {
readonly tenantId?: string;
}

// @public
export interface SystemData {
createdAt?: Date;
createdBy?: string;
createdByType?: CreatedByType;
lastModifiedAt?: Date;
lastModifiedBy?: string;
lastModifiedByType?: CreatedByType;
}

// @public
export interface TrackedResource extends Resource {
location: string;
Expand All @@ -226,7 +232,6 @@ export interface UserAssignedIdentities {
createOrUpdate(resourceGroupName: string, resourceName: string, parameters: Identity, options?: UserAssignedIdentitiesCreateOrUpdateOptionalParams): Promise<UserAssignedIdentitiesCreateOrUpdateResponse>;
delete(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesDeleteOptionalParams): Promise<void>;
get(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesGetOptionalParams): Promise<UserAssignedIdentitiesGetResponse>;
listAssociatedResources(resourceGroupName: string, resourceName: string, options?: UserAssignedIdentitiesListAssociatedResourcesOptionalParams): PagedAsyncIterableIterator<AzureResource>;
listByResourceGroup(resourceGroupName: string, options?: UserAssignedIdentitiesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Identity>;
listBySubscription(options?: UserAssignedIdentitiesListBySubscriptionOptionalParams): PagedAsyncIterableIterator<Identity>;
update(resourceGroupName: string, resourceName: string, parameters: IdentityUpdate, options?: UserAssignedIdentitiesUpdateOptionalParams): Promise<UserAssignedIdentitiesUpdateResponse>;
Expand All @@ -250,30 +255,6 @@ export interface UserAssignedIdentitiesGetOptionalParams extends coreClient.Oper
// @public
export type UserAssignedIdentitiesGetResponse = Identity;

// @public
export interface UserAssignedIdentitiesListAssociatedResourcesNextOptionalParams extends coreClient.OperationOptions {
filter?: string;
orderby?: string;
skip?: number;
skiptoken?: string;
top?: number;
}

// @public
export type UserAssignedIdentitiesListAssociatedResourcesNextResponse = AssociatedResourcesListResult;

// @public
export interface UserAssignedIdentitiesListAssociatedResourcesOptionalParams extends coreClient.OperationOptions {
filter?: string;
orderby?: string;
skip?: number;
skiptoken?: string;
top?: number;
}

// @public
export type UserAssignedIdentitiesListAssociatedResourcesResponse = AssociatedResourcesListResult;

// @public
export interface UserAssignedIdentitiesListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
}
Expand Down
1 change: 1 addition & 0 deletions sdk/msi/arm-msi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

/// <reference lib="esnext.asynciterable" />
export { getContinuationToken } from "./pagingHelper";
export * from "./models";
export { ManagedServiceIdentityClient } from "./managedServiceIdentityClient";
export * from "./operationsInterfaces";
45 changes: 27 additions & 18 deletions sdk/msi/arm-msi/src/managedServiceIdentityClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
credential: credentials
};

const packageDetails = `azsdk-js-arm-msi/2.1.0-beta.3`;
const packageDetails = `azsdk-js-arm-msi/2.1.0`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
Expand All @@ -72,39 +72,48 @@ export class ManagedServiceIdentityClient extends coreClient.ServiceClient {
userAgentOptions: {
userAgentPrefix
},
baseUri:
endpoint:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
};
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 ??
`${optionsWithDefaults.endpoint}/.default`,
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-01-31-preview";
this.apiVersion = options.apiVersion || "2023-01-31";
this.systemAssignedIdentities = new SystemAssignedIdentitiesImpl(this);
this.operations = new OperationsImpl(this);
this.userAssignedIdentities = new UserAssignedIdentitiesImpl(this);
Expand Down
Loading