Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation/locations api 2024 preview #29961

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
dc85021
Locations API exposed at Subscription level
Jul 18, 2024
89ec162
Locations API exposed at Subscription level
dhruvesh Jul 18, 2024
27e6197
Merge branch 'main' into dhruvesh/locations-api
dhruvesh Jul 18, 2024
fb994e8
Removing changes from stable version
dhruvesh Jul 18, 2024
02b7516
Removing changes from stable version
dhruvesh Jul 18, 2024
bd40ccf
1. removing resource group name from locations api
dhruvesh Jul 18, 2024
b3779a5
1. Adding location name pattern
dhruvesh Jul 18, 2024
fb3082a
added new preview version
dhruvesh Jul 22, 2024
999cb03
added new preview version
dhruvesh Jul 22, 2024
434bca0
added new preview version
dhruvesh Jul 22, 2024
b0b70c8
added new preview version
dhruvesh Jul 25, 2024
f5b643e
added new preview version
dhruvesh Jul 25, 2024
8739086
Merge branch 'main' of https://github.com/Azure/azure-rest-api-specs …
dhruvesh Jul 25, 2024
a2d9b3b
honoring: BodyTopLevelProperties
dhruvesh Jul 25, 2024
2d1d72b
honoring: CollectionObjectPropertiesNaming
dhruvesh Jul 25, 2024
b3ee006
AutoRest exception
dhruvesh Jul 25, 2024
65c2554
Locations pageable extension
dhruvesh Jul 25, 2024
50fe19a
Locations pageable extension
dhruvesh Jul 25, 2024
8ec19a2
fixed the example
dhruvesh Jul 25, 2024
a0c02f9
updated reference in readme.md
dhruvesh Jul 25, 2024
74a51ad
remove next link
dhruvesh Jul 25, 2024
4d0764c
1. adding next link again
dhruvesh Jul 25, 2024
c174963
1. Removed extra files
dhruvesh Jul 25, 2024
d29ccf8
1. Removed extra files
dhruvesh Jul 25, 2024
fe25d5f
Added in default tag
dhruvesh Jul 25, 2024
5f8c2e8
Added in default tag
dhruvesh Jul 25, 2024
664aace
added required property value
dhruvesh Jul 25, 2024
d073098
Merge branch 'main' into automation/locations-api-2024-preview
dhruvesh Jul 29, 2024
46dd177
reusing already defined type
dhruvesh Jul 29, 2024
dd90e1c
Merge remote-tracking branch 'origin/automation/locations-api-2024-pr…
dhruvesh Jul 29, 2024
7196123
reusing already defined type
dhruvesh Jul 29, 2024
d95f8e8
npx prettier
dhruvesh Jul 29, 2024
407be69
update location parameter in uri
dhruvesh Jul 30, 2024
c5ebfed
update location parameter in uri
dhruvesh Jul 30, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"subscriptionId": "subid",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its better to use a guid here, to illustrate the real format

"locationName": "centralus2euap",
"api-version": "2024-08-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"name": {
"value": "BasicRegionalAutomationAccounts",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add what will be the value of Id here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This we want to keep dynamic, the value will change based on localization

"localizedValue": "BasicRegionalAutomationAccounts"
},
"unit": "Count",
"currentValue": 2.0,
"limit": 3,
"throttleStatus": "NotThrottled"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"swagger": "2.0",
"info": {
"title": "AutomationManagement",
"version": "2024-08-01-preview",
"x-ms-code-generation-settings": {
"useDateTimeOffset": true
}
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Automation/locations/{locationName}/usages": {
"get": {
"tags": [
"Usages"
],
"operationId": "Usages_ListByLocation",
"description": "Retrieve the usage for the location.",
"externalDocs": {
"url": "http://aka.ms/azureautomationsdk/getUsagesOfLocation"
},
"x-ms-examples": {
"List usages": {
"$ref": "./examples/getUsagesOfLocation.json"
}
},
"parameters": [
{
"name": "locationName",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reference LocationParameter from common-types ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense done the changes

"in": "path",
"description": "The name of the region where the resource is located.",
"required": true,
"type": "string",
"pattern": "^[a-zA-Z0-9]*$",
"minLength": 3,
"maxLength": 63
},
{
"$ref": "../../common/v1/definitions.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../common/v1/definitions.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/UsageListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v6/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this set to null?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't want to paginate here

"itemName": "value"
}
}
}
},
"definitions": {
"Usage": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Gets or sets the id of the resource."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you dont have a PUT on this ... I see only a GET above ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the Usage properties should be readonly ?

},
"name": {
"$ref": "#/definitions/UsageCounterName",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Candidates for Enum

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This we want to keep dynamic, the value will change based on localization

"description": "Gets or sets the usage counter name."
},
"unit": {
"type": "string",
"description": "Gets or sets the usage unit name."
},
"currentValue": {
"type": "number",
"format": "double",
"description": "Gets or sets the current usage value."
},
"limit": {
"type": "integer",
"format": "int64",
"description": "Gets or sets max limit. -1 for unlimited"
},
"throttleStatus": {
"type": "string",
"description": "Gets or sets the throttle status."
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also looks like a candidate for enum

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure will make the changes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

},
"description": "Definition of Usage."
},
"UsageCounterName": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Gets or sets the usage counter name."
},
"localizedValue": {
"type": "string",
"description": "Gets or sets the localized usage counter name."
}
},
"description": "Definition of usage counter name."
},
"UsageListResult": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "array",
"items": {
"$ref": "#/definitions/Usage"
},
"description": "Gets or sets usage."
},
"nextLink": {
"type": "string",
"description": "Gets or sets the next link."
}
},
"required": [
"value"
],
"description": "The response model for the get usage operation."
}
},
"parameters": {}
}
57 changes: 57 additions & 0 deletions specification/automation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/job.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/runbook.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
Expand Down Expand Up @@ -74,6 +75,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/runbook.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
Expand Down Expand Up @@ -104,6 +106,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/runbook.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
Expand Down Expand Up @@ -138,6 +141,7 @@ input-file:
- Microsoft.Automation/stable/2015-10-31/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2015-10-31/jobSchedule.json
- Microsoft.Automation/stable/2015-10-31/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2015-10-31/module.json
- Microsoft.Automation/stable/2015-10-31/schedule.json
- Microsoft.Automation/stable/2015-10-31/variable.json
Expand Down Expand Up @@ -186,6 +190,7 @@ input-file:
- Microsoft.Automation/stable/2019-06-01/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2019-06-01/jobSchedule.json
- Microsoft.Automation/stable/2019-06-01/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2019-06-01/module.json
- Microsoft.Automation/stable/2019-06-01/operations.json
- Microsoft.Automation/stable/2019-06-01/schedule.json
Expand Down Expand Up @@ -218,6 +223,7 @@ input-file:
- Microsoft.Automation/preview/2020-01-13-preview/hybridRunbookWorkerGroup.json
- Microsoft.Automation/preview/2020-01-13-preview/jobSchedule.json
- Microsoft.Automation/preview/2020-01-13-preview/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/preview/2020-01-13-preview/module.json
- Microsoft.Automation/preview/2020-01-13-preview/schedule.json
- Microsoft.Automation/preview/2020-01-13-preview/variable.json
Expand Down Expand Up @@ -256,6 +262,7 @@ input-file:
- Microsoft.Automation/stable/2021-06-22/hybridRunbookWorkerGroup.json
- Microsoft.Automation/preview/2020-01-13-preview/jobSchedule.json
- Microsoft.Automation/preview/2020-01-13-preview/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/preview/2020-01-13-preview/module.json
- Microsoft.Automation/preview/2020-01-13-preview/schedule.json
- Microsoft.Automation/preview/2020-01-13-preview/variable.json
Expand Down Expand Up @@ -295,6 +302,7 @@ input-file:
- Microsoft.Automation/stable/2021-06-22/hybridRunbookWorkerGroup.json
- Microsoft.Automation/preview/2020-01-13-preview/jobSchedule.json
- Microsoft.Automation/preview/2020-01-13-preview/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/preview/2020-01-13-preview/module.json
- Microsoft.Automation/preview/2020-01-13-preview/schedule.json
- Microsoft.Automation/preview/2020-01-13-preview/variable.json
Expand Down Expand Up @@ -334,6 +342,7 @@ input-file:
- Microsoft.Automation/preview/2020-01-13-preview/credential.json
- Microsoft.Automation/preview/2020-01-13-preview/jobSchedule.json
- Microsoft.Automation/preview/2020-01-13-preview/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/preview/2020-01-13-preview/module.json
- Microsoft.Automation/preview/2020-01-13-preview/schedule.json
- Microsoft.Automation/preview/2020-01-13-preview/variable.json
Expand Down Expand Up @@ -378,6 +387,7 @@ input-file:
- Microsoft.Automation/stable/2022-08-08/job.json
- Microsoft.Automation/stable/2022-08-08/jobSchedule.json
- Microsoft.Automation/stable/2022-08-08/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2022-08-08/module.json
- Microsoft.Automation/stable/2022-08-08/operations.json
- Microsoft.Automation/stable/2022-08-08/python2package.json
Expand Down Expand Up @@ -416,6 +426,7 @@ input-file:
- Microsoft.Automation/preview/2023-05-15-preview/job.json
- Microsoft.Automation/preview/2023-05-15-preview/jobSchedule.json
- Microsoft.Automation/preview/2023-05-15-preview/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/preview/2023-05-15-preview/module.json
- Microsoft.Automation/preview/2023-05-15-preview/operations.json
- Microsoft.Automation/preview/2023-05-15-preview/package.json
Expand Down Expand Up @@ -461,6 +472,7 @@ input-file:
- Microsoft.Automation/stable/2023-11-01/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2023-11-01/job.json
- Microsoft.Automation/stable/2023-11-01/jobSchedule.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2023-11-01/linkedWorkspace.json
- Microsoft.Automation/stable/2023-11-01/module.json
- Microsoft.Automation/stable/2023-11-01/powershell72Module.json
Expand All @@ -477,6 +489,51 @@ input-file:
- Microsoft.Automation/stable/2023-11-01/variable.json
```


### Tag: package-2024-08-01-preview

These settings apply only when `--tag=package-2024-08-01-preview` is specified on the command line.

``` yaml $(tag) == 'package-2024-08-01-preview'
input-file:
- Microsoft.Automation/preview/2020-01-13-preview/privateEndpointConnection.json
- Microsoft.Automation/preview/2020-01-13-preview/privateLinkResources.json
- Microsoft.Automation/preview/2020-01-13-preview/dscNode.json
- Microsoft.Automation/preview/2020-01-13-preview/dscCompilationJob.json
- Microsoft.Automation/preview/2020-01-13-preview/dscNodeCounts.json
- Microsoft.Automation/preview/2020-01-13-preview/watcher.json
- Microsoft.Automation/stable/2019-06-01/softwareUpdateConfiguration.json
- Microsoft.Automation/stable/2015-10-31/webhook.json
- Microsoft.Automation/stable/2022-01-31/deletedAutomationAccount.json
- Microsoft.Automation/stable/2023-11-01/account.json
- Microsoft.Automation/stable/2023-11-01/certificate.json
- Microsoft.Automation/stable/2023-11-01/connection.json
- Microsoft.Automation/stable/2023-11-01/connectionType.json
- Microsoft.Automation/stable/2023-11-01/credential.json
- Microsoft.Automation/stable/2023-11-01/dscConfiguration.json
- Microsoft.Automation/stable/2023-11-01/dscNodeConfiguration.json
- Microsoft.Automation/stable/2023-11-01/hybridRunbookWorker.json
- Microsoft.Automation/stable/2023-11-01/hybridRunbookWorkerGroup.json
- Microsoft.Automation/stable/2023-11-01/job.json
- Microsoft.Automation/stable/2023-11-01/jobSchedule.json
- Microsoft.Automation/stable/2023-11-01/linkedWorkspace.json
- Microsoft.Automation/preview/2024-08-01-preview/locations.json
- Microsoft.Automation/stable/2023-11-01/module.json
- Microsoft.Automation/stable/2023-11-01/powershell72Module.json
- Microsoft.Automation/stable/2023-11-01/operations.json
- Microsoft.Automation/stable/2023-11-01/python2package.json
- Microsoft.Automation/stable/2023-11-01/python3package.json
- Microsoft.Automation/stable/2023-11-01/runbook.json
- Microsoft.Automation/stable/2023-11-01/schedule.json
- Microsoft.Automation/stable/2023-11-01/softwareUpdateConfigurationMachineRun.json
- Microsoft.Automation/stable/2023-11-01/softwareUpdateConfigurationRun.json
- Microsoft.Automation/stable/2023-11-01/sourceControl.json
- Microsoft.Automation/stable/2023-11-01/sourceControlSyncJob.json
- Microsoft.Automation/stable/2023-11-01/sourceControlSyncJobStreams.json
- Microsoft.Automation/stable/2023-11-01/variable.json
```


---
## Suppression
``` yaml
Expand Down