-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Changes from 28 commits
dc85021
89ec162
27e6197
fb994e8
02b7516
bd40ccf
b3779a5
fb3082a
999cb03
434bca0
b0b70c8
f5b643e
8739086
a2d9b3b
2d1d72b
b3ee006
65c2554
50fe19a
8ec19a2
a0c02f9
74a51ad
4d0764c
c174963
d29ccf8
fe25d5f
5f8c2e8
664aace
d073098
46dd177
dd90e1c
7196123
d95f8e8
407be69
c5ebfed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "subid", | ||
"locationName": "centralus2euap", | ||
"api-version": "2024-08-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": { | ||
"value": "BasicRegionalAutomationAccounts", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add what will be the value of Id here There was a problem hiding this comment. Choose a reason for hiding this commentThe 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", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we reference LocationParameter from common-types ? azure-rest-api-specs/specification/common-types/resource-management/v6/types.json Line 655 in a651ba2
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this set to null? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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." | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the Usage properties should be readonly ? |
||||
}, | ||||
"name": { | ||||
"$ref": "#/definitions/UsageCounterName", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Candidates for Enum There was a problem hiding this comment. Choose a reason for hiding this commentThe 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." | ||||
} | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also looks like a candidate for enum There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure will make the changes There was a problem hiding this comment. Choose a reason for hiding this commentThe 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": {} | ||||
} |
There was a problem hiding this comment.
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