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

azure-http-specs, add ARM Location-Based case #1932

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,7 @@
---
changeKind: feature
packages:
- "@azure-tools/azure-http-specs"
---

Added Location-based Resource case for ARM tests.
229 changes: 189 additions & 40 deletions packages/azure-http-specs/spec-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -946,55 +946,55 @@ Expected response body:

- Endpoint: `post https://management.azure.com`

Resource POST operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.OperationTemplates/locations/westus/checkNameAvailability
Expected query parameter: api-version=2023-12-01-preview
Expected request body:
Resource POST operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.OperationTemplates/locations/westus/checkNameAvailability
Expected query parameter: api-version=2023-12-01-preview
Expected request body:

```json
{
"name": "checkName",
"type": "Microsoft.Web/site"
}
```
```json
{
"name": "checkName",
"type": "Microsoft.Web/site"
}
```

Expected response body:
Expected response body:

```json
{
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "Hostname 'checkName' already exists. Please select a different name."
}
```
```json
{
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "Hostname 'checkName' already exists. Please select a different name."
}
```

### Azure_ResourceManager_OperationTemplates_ListAvailableOperations

- Endpoint: `get https://management.azure.com`

Resource GET operation.
Expected path: /providers/Azure.ResourceManager.OperationTemplates/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
Resource GET operation.
Expected path: /providers/Azure.ResourceManager.OperationTemplates/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:

```json
{
"value": [
{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}
]
}
```
```json
{
"value": [
{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}
]
}
```

### Azure_ResourceManager_OperationTemplates_Lro_createOrReplace

Expand Down Expand Up @@ -1208,6 +1208,155 @@ Expected response body:
}
```

### Azure_ResourceManager_Resources_LocationResources_createOrUpdate

- Endpoint: `put https://management.azure.com`

Resource PUT operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource
Expected query parameter: api-version=2022-12-01-preview
Expected request body:

```json
{
"properties": {
"description": "valid"
}
}
```

Expected response body:

```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource",
"name": "resource",
"type": "Azure.ResourceManager.Resources/locationResources",
"properties": {
"description": "valid",
"provisioningState": "Succeeded",
},
"systemData": {
"createdBy": "AzureSDK",
"createdByType": "User",
"createdAt": <any date>,
"lastModifiedBy": "AzureSDK",
"lastModifiedAt": <any date>,
"lastModifiedByType": "User",
}
}
```

### Azure_ResourceManager_Resources_LocationResources_delete

- Endpoint: `delete https://management.azure.com`

Resource DELETE operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource
Expected query parameter: api-version=2023-12-01-preview
Expected response status code: 204

### Azure_ResourceManager_Resources_LocationResources_get

- Endpoint: `get https://management.azure.com`

Resource GET operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource
Expected query parameter: api-version=2023-12-01-preview

Expected response body:

```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource",
"name": "resource",
"type": "Azure.ResourceManager.Resources/locationResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
},
"systemData": {
"createdBy": "AzureSDK",
"createdByType": "User",
"createdAt": <any date>,
"lastModifiedBy": "AzureSDK",
"lastModifiedAt": <any date>,
"lastModifiedByType": "User",
}
}
```

### Azure_ResourceManager_Resources_LocationResources_listByLocation

- Endpoint: `get https://management.azure.com`

Resource List operation by location.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources
Expected query parameter: api-version=2023-12-01-preview

Expected response body:

```json
{
"value": [{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource",
"name": "resource",
"type": "Azure.ResourceManager.Resources/locationResources",
"properties":{
"description": "valid",
"provisioningState": "Succeeded"
},
"systemData": {
"createdBy": "AzureSDK",
"createdByType": "User",
"createdAt": <any date>,
"lastModifiedBy": "AzureSDK",
"lastModifiedAt": <any date>,
"lastModifiedByType": "User",
}
}]
}
```

### Azure_ResourceManager_Resources_LocationResources_update

- Endpoint: `patch https://management.azure.com`

Resource PATCH operation.
Expected path: /subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource
Expected query parameter: api-version=2023-12-01-preview
Expected request body:

```json
{
"properties": {
"description": "valid2"
}
}
```

Expected response body:

```json
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Azure.ResourceManager.Resources/locations/eastus/locationResources/resource",
"name": "resource",
"type": "Azure.ResourceManager.Resources/locationResources",
"properties":{
"description": "valid2",
"provisioningState": "Succeeded"
},
"systemData": {
"createdBy": "AzureSDK",
"createdByType": "User",
"createdAt": <any date>,
"lastModifiedBy": "AzureSDK",
"lastModifiedAt": <any date>,
"lastModifiedByType": "User",
}
}
```

### Azure_ResourceManager_Resources_Nested_createOrReplace

- Endpoint: `put https://management.azure.com`
Expand Down
Loading
Loading