Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.Support to add version p…
Browse files Browse the repository at this point in the history
…review/2021-06-01-preview (Azure#14586)

* Adds base for updating Microsoft.Support from version stable/2020-04-01 to version 2021-06-01-preview

* Updates readme

* Updates API version in new specs and examples

* Add GetSupportTicketResourceId

* Delete CheckNameAvailabilityForSupportTicketCommunication.json

* Delete specification/support/resource-manager/Microsoft.Support/preview/2021-06-01-preview/examples directory

* add example

* list operations

* Update LookUpSupportTicketResourceId.json

* Update readme.md

* Update support.json

* Update support.json

* Rename support.json to supportLookUpResourceId.json

* Rename supportLookUpResourceId.json to supportTicketsResourceIdDetails.json

* Update readme.md

* Update ListOperations.json

* Update LookUpSupportTicketResourceId.json

* make swagger generic for resource id look up

* Update LookUpSupportTicketResourceId.json

* Update LookUpSupportTicketResourceId.json

* Rename LookUpSupportTicketResourceId.json to LookUpResourceId.json

* Update readme.md

* Update LookUpResourceId.json

* Update LookUpResourceId.json

* Update supportResourceIdDetails.json

* Update LookUpResourceId.json

* Update supportResourceIdDetails.json

* Update supportResourceIdDetails.json

* Update LookUpResourceId.json

* Update supportResourceIdDetails.json

* Update LookUpResourceId.json

* Update LookUpResourceId.json

* Update supportResourceIdDetails.json

* remove error code

* Update supportResourceIdDetails.json

* Update LookUpResourceId.json

* Update supportResourceIdDetails.json
  • Loading branch information
mudit794 authored Jun 8, 2021
1 parent c32349e commit 04adf29
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2021-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Support/register/action",
"display": {
"description": "Registers Support Resource Provider",
"operation": "Registers Support Resource Provider",
"provider": "Registers Support Resource Provider",
"resource": "Support Registration"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2020-06-01-preview",
"lookUpResourceIdRequest": {
"type": "Microsoft.Support/supportTickets",
"identifier": "1234668596"
}
},
"responses": {
"200": {
"body": {
"resourceId": "/subscriptions/subId/providers/Microsoft.Support/supportTickets/SupportTicketName"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
{
"swagger": "2.0",
"info": {
"version": "2021-06-01-preview",
"title": "Microsoft.Support",
"description": "Microsoft Azure Support Resource Provider."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
},
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow."
}
},
"paths": {
"/providers/Microsoft.Support/operations": {
"get": {
"tags": [
"Operations"
],
"description": "This lists all the available Microsoft Support REST API operations.",
"operationId": "Operations_List",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved list of operations.",
"schema": {
"$ref": "#/definitions/OperationsListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ExceptionResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
},
"x-ms-examples": {
"Get all operations": {
"$ref": "./examples/ListOperations.json"
}
}
}
},
"/providers/Microsoft.Support/lookUpResourceId": {
"post": {
"tags": [
"SupportTickets"
],
"summary": "This operation fetches ARM resource id of support resource type.",
"operationId": "LookUpResourceId_Post",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "lookUpResourceIdRequest",
"in": "body",
"description": "Look up resource id request body",
"required": true,
"schema": {
"$ref": "#/definitions/LookUpResourceIdRequest"
}
}
],
"responses": {
"200": {
"description": "OK. Successfully obtained resource id of support resource type.",
"schema": {
"$ref": "#/definitions/LookUpResourceIdResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/ExceptionResponse"
}
}
},
"deprecated": false,
"x-ms-examples": {
"Look up resource id of support resource type": {
"$ref": "./examples/LookUpResourceId.json"
}
}
}
}
},
"definitions": {
"OperationsListResult": {
"description": "The list of operations supported by Microsoft Support resource provider.",
"properties": {
"value": {
"description": "The list of operations supported by Microsoft Support resource provider.",
"type": "array",
"items": {
"$ref": "#/definitions/Operation"
}
}
}
},
"Operation": {
"description": "The operation supported by Microsoft Support resource provider.",
"type": "object",
"properties": {
"name": {
"description": "Operation name: {provider}/{resource}/{operation}.",
"type": "string",
"readOnly": true
},
"display": {
"description": "The object that describes the operation.",
"properties": {
"description": {
"description": "The description of the operation.",
"type": "string",
"readOnly": true
},
"operation": {
"description": "The action that users can perform, based on their permission level.",
"type": "string",
"readOnly": true
},
"provider": {
"description": "Service provider: Microsoft Support.",
"type": "string",
"readOnly": true
},
"resource": {
"description": "Resource on which the operation is performed.",
"type": "string",
"readOnly": true
}
}
}
}
},
"LookUpResourceIdRequest": {
"description": "The look up resource Id request body",
"type": "object",
"properties": {
"identifier": {
"description": "The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type.",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Microsoft.Support/supportTickets"
],
"x-ms-enum": {
"name": "Type",
"modelAsString": false
},
"description": "The type of resource."
}
}
},
"LookUpResourceIdResponse": {
"description": "The look up resource id response",
"type": "object",
"properties": {
"resourceId": {
"description": "The resource Id of support resource type.",
"type": "string"
}
}
},
"ExceptionResponse": {
"type": "object",
"properties": {
"error": {
"$ref": "#/definitions/ServiceError",
"description": "The API error details."
}
},
"description": "The API error."
},
"ServiceError": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The error code."
},
"message": {
"type": "string",
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the error."
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/ServiceErrorDetail"
},
"description": "The list of error details.",
"readOnly": true
}
},
"description": "The API error details."
},
"ServiceErrorDetail": {
"type": "object",
"properties": {
"code": {
"type": "string",
"readOnly": true,
"description": "The error code."
},
"message": {
"type": "string",
"readOnly": true,
"description": "The error message."
},
"target": {
"type": "string",
"description": "The target of the error."
}
},
"description": "The error details."
}
},
"parameters": {
"SubscriptionIdParameter": {
"name": "subscriptionId",
"in": "path",
"required": true,
"type": "string",
"description": "Azure subscription Id."
},
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "API version."
}
}
}
28 changes: 18 additions & 10 deletions specification/support/resource-manager/readme.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,48 @@
# Support

> see https://aka.ms/autorest
This is the AutoRest configuration file for Support.


---
## Getting Started

## Getting Started

To build the SDK for Support, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run:

> `autorest`
To see additional help and options, run:

> `autorest --help`
---

## Configuration

### Basic Information

### Basic Information
These are the global settings for the Support API.

``` yaml
openapi-type: arm
tag: package-2020-04
```
### Tag: package-preview-2021-06
These settings apply only when `--tag=package-preview-2021-06` is specified on the command line.

```yaml $(tag) == 'package-preview-2021-06'
input-file:
- Microsoft.Support/preview/2021-06-01-preview/supportResourceIdDetails.json
```
### Tag: package-2020-04

These settings apply only when `--tag=package-2020-04` is specified on the command line.

```yaml $(tag) == 'package-2020-04'
``` yaml $(tag) == 'package-2020-04'
input-file:
- Microsoft.Support/stable/2020-04-01/support.json
```
Expand All @@ -46,8 +57,8 @@ input-file:
```

---
# Code Generation

# Code Generation

## Swagger to SDK

Expand All @@ -68,7 +79,7 @@ swagger-to-sdk:
- repo: azure-resource-manager-schemas
```

## C#
## C#

See configuration in [readme.csharp.md](./readme.csharp.md)

Expand All @@ -91,6 +102,3 @@ See configuration in [readme.typescript.md](./readme.typescript.md)
## Ruby

See configuration in [readme.ruby.md](./readme.ruby.md)



0 comments on commit 04adf29

Please sign in to comment.