Skip to content

Commit

Permalink
CodeGen from PR 23959 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 9de58c987fa718a337d78b865945ef1029fa2188 into 1cbe41c8eea04f0893c42623e74c9461b30a0cdf
  • Loading branch information
SDKAuto committed May 12, 2023
1 parent 6d27a62 commit 677a5de
Show file tree
Hide file tree
Showing 17 changed files with 566 additions and 120 deletions.
120 changes: 64 additions & 56 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

33 changes: 25 additions & 8 deletions sdk/resources/arm-resources/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
# Release History

## 6.0.0 (2023-05-12)

**Features**

## 5.2.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed
- Added operation TagsOperations.beginCreateOrUpdateAtScope
- Added operation TagsOperations.beginCreateOrUpdateAtScopeAndWait
- Added operation TagsOperations.beginDeleteAtScope
- Added operation TagsOperations.beginDeleteAtScopeAndWait
- Added operation TagsOperations.beginUpdateAtScope
- Added operation TagsOperations.beginUpdateAtScopeAndWait
- Added Interface TagsCreateOrUpdateAtScopeHeaders
- Added Interface TagsDeleteAtScopeHeaders
- Added Interface TagsUpdateAtScopeHeaders
- Interface TagsCreateOrUpdateAtScopeOptionalParams has a new optional parameter resumeFrom
- Interface TagsCreateOrUpdateAtScopeOptionalParams has a new optional parameter updateIntervalInMs
- Interface TagsDeleteAtScopeOptionalParams has a new optional parameter resumeFrom
- Interface TagsDeleteAtScopeOptionalParams has a new optional parameter updateIntervalInMs
- Interface TagsUpdateAtScopeOptionalParams has a new optional parameter resumeFrom
- Interface TagsUpdateAtScopeOptionalParams has a new optional parameter updateIntervalInMs

### Other Changes
**Breaking Changes**

- Removed operation TagsOperations.createOrUpdateAtScope
- Removed operation TagsOperations.deleteAtScope
- Removed operation TagsOperations.updateAtScope


## 5.2.0 (2023-03-13)

**Features**
Expand Down
10 changes: 5 additions & 5 deletions sdk/resources/arm-resources/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
"readme": "specification\\resources\\resource-manager\\readme.md",
"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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\resources\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.9.20230306.1 --generate-sample=true",
"commit": "cc42707fa23a356a2987170ae2210e9cb358495c",
"readme": "specification/resources/resource-manager/readme.md",
"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/resources/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.6.2",
"use": "@autorest/typescript@6.0.0-rc.9.20230306.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.7.0",
"use": "@autorest/typescript@6.0.0-rc.10"
}
16 changes: 4 additions & 12 deletions sdk/resources/arm-resources/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 ResourceManagementClient.",
"version": "5.2.1",
"version": "6.0.0",
"engines": {
"node": ">=14.0.0"
},
Expand Down Expand Up @@ -36,7 +36,7 @@
"mkdirp": "^2.1.2",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~5.0.0",
"typescript": "~4.8.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"dotenv": "^16.0.0",
Expand Down Expand Up @@ -111,13 +111,5 @@
]
},
"autoPublish": true,
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resources",
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-resources?view=azure-node-preview"
}
}
"homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resources"
}
30 changes: 27 additions & 3 deletions sdk/resources/arm-resources/review/arm-resources.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1621,8 +1621,15 @@ export interface Tags {
};
}

// @public
export interface TagsCreateOrUpdateAtScopeHeaders {
location?: string;
}

// @public
export interface TagsCreateOrUpdateAtScopeOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}

// @public
Expand All @@ -1642,8 +1649,15 @@ export interface TagsCreateOrUpdateValueOptionalParams extends coreClient.Operat
// @public
export type TagsCreateOrUpdateValueResponse = TagValue;

// @public
export interface TagsDeleteAtScopeHeaders {
location?: string;
}

// @public
export interface TagsDeleteAtScopeOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}

// @public
Expand Down Expand Up @@ -1683,15 +1697,18 @@ export interface TagsListResult {

// @public
export interface TagsOperations {
beginCreateOrUpdateAtScope(scope: string, parameters: TagsResource, options?: TagsCreateOrUpdateAtScopeOptionalParams): Promise<SimplePollerLike<OperationState<TagsCreateOrUpdateAtScopeResponse>, TagsCreateOrUpdateAtScopeResponse>>;
beginCreateOrUpdateAtScopeAndWait(scope: string, parameters: TagsResource, options?: TagsCreateOrUpdateAtScopeOptionalParams): Promise<TagsCreateOrUpdateAtScopeResponse>;
beginDeleteAtScope(scope: string, options?: TagsDeleteAtScopeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
beginDeleteAtScopeAndWait(scope: string, options?: TagsDeleteAtScopeOptionalParams): Promise<void>;
beginUpdateAtScope(scope: string, parameters: TagsPatchResource, options?: TagsUpdateAtScopeOptionalParams): Promise<SimplePollerLike<OperationState<TagsUpdateAtScopeResponse>, TagsUpdateAtScopeResponse>>;
beginUpdateAtScopeAndWait(scope: string, parameters: TagsPatchResource, options?: TagsUpdateAtScopeOptionalParams): Promise<TagsUpdateAtScopeResponse>;
createOrUpdate(tagName: string, options?: TagsCreateOrUpdateOptionalParams): Promise<TagsCreateOrUpdateResponse>;
createOrUpdateAtScope(scope: string, parameters: TagsResource, options?: TagsCreateOrUpdateAtScopeOptionalParams): Promise<TagsCreateOrUpdateAtScopeResponse>;
createOrUpdateValue(tagName: string, tagValue: string, options?: TagsCreateOrUpdateValueOptionalParams): Promise<TagsCreateOrUpdateValueResponse>;
delete(tagName: string, options?: TagsDeleteOptionalParams): Promise<void>;
deleteAtScope(scope: string, options?: TagsDeleteAtScopeOptionalParams): Promise<void>;
deleteValue(tagName: string, tagValue: string, options?: TagsDeleteValueOptionalParams): Promise<void>;
getAtScope(scope: string, options?: TagsGetAtScopeOptionalParams): Promise<TagsGetAtScopeResponse>;
list(options?: TagsListOptionalParams): PagedAsyncIterableIterator<TagDetails>;
updateAtScope(scope: string, parameters: TagsPatchResource, options?: TagsUpdateAtScopeOptionalParams): Promise<TagsUpdateAtScopeResponse>;
}

// @public
Expand All @@ -1711,8 +1728,15 @@ export interface TagsResource {
readonly type?: string;
}

// @public
export interface TagsUpdateAtScopeHeaders {
location?: string;
}

// @public
export interface TagsUpdateAtScopeOptionalParams extends coreClient.OperationOptions {
resumeFrom?: string;
updateIntervalInMs?: number;
}

// @public
Expand Down
41 changes: 37 additions & 4 deletions sdk/resources/arm-resources/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1143,6 +1143,24 @@ export interface DeploymentsWhatIfHeaders {
retryAfter?: string;
}

/** Defines headers for Tags_createOrUpdateAtScope operation. */
export interface TagsCreateOrUpdateAtScopeHeaders {
/** URL to get status of this long-running operation. */
location?: string;
}

/** Defines headers for Tags_updateAtScope operation. */
export interface TagsUpdateAtScopeHeaders {
/** URL to get status of this long-running operation. */
location?: string;
}

/** Defines headers for Tags_deleteAtScope operation. */
export interface TagsDeleteAtScopeHeaders {
/** URL to get status of this long-running operation. */
location?: string;
}

/** Known values of {@link ExpressionEvaluationOptionsScopeType} that the service accepts. */
export enum KnownExpressionEvaluationOptionsScopeType {
/** NotSpecified */
Expand Down Expand Up @@ -1963,7 +1981,7 @@ export interface ResourcesListOptionalParams
extends coreClient.OperationOptions {
/** The filter to apply on the operation.<br><br>Filter comparison operators include `eq` (equals) and `ne` (not equals) and may be used with the following properties: `location`, `resourceType`, `name`, `resourceGroup`, `identity`, `identity/principalId`, `plan`, `plan/publisher`, `plan/product`, `plan/name`, `plan/version`, and `plan/promotionCode`.<br><br>For example, to filter by a resource type, use `$filter=resourceType eq 'Microsoft.Network/virtualNetworks'`<br><br><br>`substringof(value, property)` can be used to filter for substrings of the following currently-supported properties: `name` and `resourceGroup`<br><br>For example, to get all resources with 'demo' anywhere in the resource name, use `$filter=substringof('demo', name)`<br><br>Multiple substring operations can also be combined using `and`/`or` operators.<br><br>Note that any truncated number of results queried via `$top` may also not be compatible when using a filter.<br><br><br>Resources can be filtered by tag names and values. For example, to filter for a tag name and value, use `$filter=tagName eq 'tag1' and tagValue eq 'Value1'`. Note that when resources are filtered by tag name and value, <b>the original tags for each resource will not be returned in the results.</b> Any list of additional properties queried via `$expand` may also not be compatible when filtering by tag names/values. <br><br>For tag names only, resources can be filtered by prefix using the following syntax: `$filter=startswith(tagName, 'depart')`. This query will return all resources with a tag name prefixed by the phrase `depart` (i.e.`department`, `departureDate`, `departureTime`, etc.)<br><br><br>Note that some properties can be combined when filtering resources, which include the following: `substringof() and/or resourceType`, `plan and plan/publisher and plan/name`, and `identity and identity/principalId`. */
filter?: string;
/** The number of results to return. If null is passed, returns all resources. */
/** The number of recommendations per page if a paged version of this API is being used. */
top?: number;
/** Comma-separated list of additional properties to be included in the response. Valid values include `createdTime`, `changedTime` and `provisioningState`. For example, `$expand=createdTime,changedTime`. */
expand?: string;
Expand Down Expand Up @@ -2185,14 +2203,24 @@ export type TagsListResponse = TagsListResult;

/** Optional parameters. */
export interface TagsCreateOrUpdateAtScopeOptionalParams
extends coreClient.OperationOptions {}
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 createOrUpdateAtScope operation. */
export type TagsCreateOrUpdateAtScopeResponse = TagsResource;

/** Optional parameters. */
export interface TagsUpdateAtScopeOptionalParams
extends coreClient.OperationOptions {}
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 updateAtScope operation. */
export type TagsUpdateAtScopeResponse = TagsResource;
Expand All @@ -2206,7 +2234,12 @@ export type TagsGetAtScopeResponse = TagsResource;

/** Optional parameters. */
export interface TagsDeleteAtScopeOptionalParams
extends coreClient.OperationOptions {}
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 TagsListNextOptionalParams
Expand Down
45 changes: 45 additions & 0 deletions sdk/resources/arm-resources/src/models/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2850,3 +2850,48 @@ export const DeploymentsWhatIfHeaders: coreClient.CompositeMapper = {
}
}
};

export const TagsCreateOrUpdateAtScopeHeaders: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "TagsCreateOrUpdateAtScopeHeaders",
modelProperties: {
location: {
serializedName: "location",
type: {
name: "String"
}
}
}
}
};

export const TagsUpdateAtScopeHeaders: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "TagsUpdateAtScopeHeaders",
modelProperties: {
location: {
serializedName: "location",
type: {
name: "String"
}
}
}
}
};

export const TagsDeleteAtScopeHeaders: coreClient.CompositeMapper = {
type: {
name: "Composite",
className: "TagsDeleteAtScopeHeaders",
modelProperties: {
location: {
serializedName: "location",
type: {
name: "String"
}
}
}
}
};
2 changes: 1 addition & 1 deletion sdk/resources/arm-resources/src/models/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const $host: OperationURLParameter = {
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2021-04-01",
defaultValue: "2022-09-01",
isConstant: true,
serializedName: "api-version",
type: {
Expand Down
5 changes: 4 additions & 1 deletion sdk/resources/arm-resources/src/operations/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ export class ProvidersImpl implements Providers {
}

/**
* Registers a management group with a resource provider.
* Registers a management group with a resource provider. Use this operation to register a resource
* provider with resource types that can be deployed at the management group scope. It does not
* recursively register subscriptions within the management group. Instead, you must register
* subscriptions individually.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param options The options parameters.
Expand Down
4 changes: 3 additions & 1 deletion sdk/resources/arm-resources/src/operations/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,9 @@ export class ResourcesImpl implements Resources {
}

/**
* Checks by ID whether a resource exists.
* Checks by ID whether a resource exists. This API currently works only for a limited set of Resource
* providers. In the event that a Resource provider does not implement this API, ARM will respond with
* a 405. The alternative then is to use the GET API to check for the existence of the resource.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
Expand Down
Loading

0 comments on commit 677a5de

Please sign in to comment.