Skip to content

Commit

Permalink
Backmerge/release/october 2024 2024 10 15 (#1687)
Browse files Browse the repository at this point in the history
Co-authored-by: Chenjie Shi <[email protected]>
Co-authored-by: Mark Cowlishaw <[email protected]>
Co-authored-by: iscai-msft <[email protected]>
  • Loading branch information
4 people authored Oct 15, 2024
1 parent 77c79e2 commit a3fb3fb
Show file tree
Hide file tree
Showing 11 changed files with 384 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ op Azure.ResourceManager.ArmListBySubscription(apiVersion: string, subscriptionI
### `ArmProviderActionAsync` {#Azure.ResourceManager.ArmProviderActionAsync}

```typespec
op Azure.ResourceManager.ArmProviderActionAsync(apiVersion: string, subscriptionId: Azure.Core.uuid, location: string, resourceGroupName: string, resourceUri: string, provider: "Microsoft.ThisWillBeReplaced", body: Request): Response | Azure.ResourceManager.CommonTypes.ErrorResponse
op Azure.ResourceManager.ArmProviderActionAsync(apiVersion: string, subscriptionId: Azure.Core.uuid, location: string, resourceGroupName: string, resourceUri: string, provider: "Microsoft.ThisWillBeReplaced", body: Request): Azure.ResourceManager.ArmAcceptedLroResponse<Description, LroHeaders> | Response | Azure.ResourceManager.CommonTypes.ErrorResponse
```

#### Template Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,50 @@ model LogAnalyticsCollection is Page<LogAnalyticsOperationResult>;
interface ProviderOperations {
/** Operation to get virtual machines for subscription (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/getVmSizes) */
@get
getVmSizes is ArmProviderActionAsync<
Response = VmSizeCollection,
Scope = SubscriptionActionScope
>;
getVmSizes is ArmProviderActionSync<Response = VmSizeCollection, Scope = SubscriptionActionScope>;
/** Operation to get virtual machines for tenant (/providers/Microsoft.ContosoProviderHub/getVmSizesTenant) */
@get
getVmSizesTenant is ArmProviderActionAsync<
Response = VmSizeCollection,
Scope = TenantActionScope
>;
getVmSizesTenant is ArmProviderActionSync<Response = VmSizeCollection, Scope = TenantActionScope>;
/** Operation to get virtual machines for subscription for specific location (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/locations/{location}/getVmSizesLocation) */
@get
getVmSizesLocation is ArmProviderActionAsync<
getVmSizesLocation is ArmProviderActionSync<
Response = VmSizeCollection,
Scope = SubscriptionActionScope,
Parameters = LocationParameter
>;
/** Operation to get throttled requests sharing action (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/logAnalytics/apiAccess/getThrottledRequests) */
@get
@action("logAnalytics/apiAccess/getThrottledRequests")
getThrottledRequestsSubscription is ArmProviderActionAsync<
getThrottledRequestsSubscription is ArmProviderActionSync<
Response = LogAnalyticsCollection,
Scope = SubscriptionActionScope
>;
/** Operation to get throttled requests sharing action for tenant (/providers/Microsoft.ContosoProviderHub/logAnalytics/apiAccess/getThrottledRequests) */
@get
@action("logAnalytics/apiAccess/getThrottledRequests")
getThrottledRequestsTenant is ArmProviderActionAsync<
getThrottledRequestsTenant is ArmProviderActionSync<
Response = LogAnalyticsCollection,
Scope = TenantActionScope
>;
/** Operation to post virtual machines for subscription (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizes) */
postVmSizes is ArmProviderActionAsync<
Response = LogAnalyticsCollection,
Scope = SubscriptionActionScope
>;
/** Operation to post virtual machines for subscription for specific location (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/locations/{location}/postVmSizesLocation) */
postVmSizesLocation is ArmProviderActionAsync<
Response = LogAnalyticsCollection,
Scope = SubscriptionActionScope,
Parameters = LocationParameter
>;
/** Operation to post virtual machines for subscription with retry after header (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizesRetry) */
postVmSizesRetry is ArmProviderActionAsync<
Response = Azure.Core.Foundations.RetryAfterHeader,
Scope = SubscriptionActionScope
>;
/** Operation to post virtual machines for subscription with ARM combined header (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizesArmCombined) */
postVmSizesArmCombined is ArmProviderActionAsync<
Response = ArmCombinedLroHeaders,
Scope = SubscriptionActionScope
>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,61 @@
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationStatusSample/locations/{location}/postVmSizesLocation": {
"post": {
"operationId": "ProviderOperations_PostVmSizesLocation",
"tags": [
"ProviderOperations"
],
"description": "Operation to post virtual machines for subscription for specific location (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/locations/{location}/postVmSizesLocation)",
"parameters": [
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/LocationParameter"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/LogAnalyticsCollection"
}
},
"202": {
"description": "Resource operation accepted.",
"headers": {
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
},
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true,
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationStatusSample/logAnalytics/apiAccess/getThrottledRequests": {
"get": {
"operationId": "ProviderOperations_GetThrottledRequestsSubscription",
Expand Down Expand Up @@ -243,9 +298,179 @@
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationStatusSample/postVmSizes": {
"post": {
"operationId": "ProviderOperations_PostVmSizes",
"tags": [
"ProviderOperations"
],
"description": "Operation to post virtual machines for subscription (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizes)",
"parameters": [
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"schema": {
"$ref": "#/definitions/LogAnalyticsCollection"
}
},
"202": {
"description": "Resource operation accepted.",
"headers": {
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
},
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true,
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationStatusSample/postVmSizesArmCombined": {
"post": {
"operationId": "ProviderOperations_PostVmSizesArmCombined",
"tags": [
"ProviderOperations"
],
"description": "Operation to post virtual machines for subscription with ARM combined header (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizesArmCombined)",
"parameters": [
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"headers": {
"Azure-AsyncOperation": {
"type": "string",
"format": "uri",
"description": "A link to the status monitor"
},
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
}
}
},
"202": {
"description": "Resource operation accepted.",
"headers": {
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
},
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationStatusSample/postVmSizesRetry": {
"post": {
"operationId": "ProviderOperations_PostVmSizesRetry",
"tags": [
"ProviderOperations"
],
"description": "Operation to post virtual machines for subscription with retry after header (/subscriptions/{subscriptionId}/providers/Microsoft.ContosoProviderHub/postVmSizesRetry)",
"parameters": [
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The request has succeeded.",
"headers": {
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
}
}
},
"202": {
"description": "Resource operation accepted.",
"headers": {
"Location": {
"type": "string",
"description": "The Location header contains the URL where the status of the long running operation can be checked."
},
"Retry-After": {
"type": "integer",
"format": "int32",
"description": "The Retry-After header can indicate how long the client should wait before polling the operation status."
}
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "../../../../../../../../../specs/resource-manager/common-types/v5/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-long-running-operation": true
}
}
},
"definitions": {
"Azure.Core.Foundations.RetryAfterHeader": {
"type": "object",
"description": "The retry-after envelope."
},
"Azure.ResourceManager.ArmCombinedLroHeaders<Azure.ResourceManager.ArmOperationStatus<never, Azure.ResourceManager.ResourceProvisioningState>, void, TypeSpec.Rest.ResourceLocation, string>": {
"type": "object",
"description": "Provide Both Azure-AsyncOperation and Location headers"
},
"LogAnalyticsCollection": {
"type": "object",
"description": "LogAnalytics collection of operation status response",
Expand Down
7 changes: 7 additions & 0 deletions packages/typespec-azure-resource-manager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log - @azure-tools/typespec-azure-resource-manager

## 0.47.1

### Bug Fixes

- [#1673](https://github.com/Azure/typespec-azure/pull/1673) Fix `ArmProviderActionAsync` to correctly return 202 responses.


## 0.47.0

### Bug Fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,4 +752,4 @@ op ArmProviderActionAsync<

/** The request body */
@bodyRoot body: Request,
): Response | ErrorResponse;
): ArmAcceptedLroResponse<"Resource operation accepted.", LroHeaders> | Response | ErrorResponse;
2 changes: 1 addition & 1 deletion packages/typespec-azure-resource-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-azure-resource-manager",
"version": "0.47.0",
"version": "0.47.1",
"author": "Microsoft Corporation",
"description": "TypeSpec Azure Resource Manager library",
"homepage": "https://azure.github.io/typespec-azure",
Expand Down
7 changes: 7 additions & 0 deletions packages/typespec-client-generator-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log - @azure-tools/typespec-client-generator-core

## 0.47.2

### Bug Fixes

- [#1606](https://github.com/Azure/typespec-azure/pull/1606) overwrite original value when set multiple value for same decorator


## 0.47.1

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-client-generator-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-client-generator-core",
"version": "0.47.1",
"version": "0.47.2",
"author": "Microsoft Corporation",
"description": "TypeSpec Data Plane Generation library",
"homepage": "https://azure.github.io/typespec-azure",
Expand Down
Loading

0 comments on commit a3fb3fb

Please sign in to comment.