Skip to content

Commit

Permalink
Add API for checkNameAvailability in 2022-03-01 (#18204)
Browse files Browse the repository at this point in the history
* add API

* update

* fix

* update

* update
  • Loading branch information
Juliehzl authored Mar 16, 2022
1 parent 5902f70 commit f917749
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,65 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}/checkNameAvailability": {
"post": {
"tags": [
"ManagedEnvironments"
],
"summary": "Checks the resource name availability.",
"description": "Checks if resource name is available.",
"operationId": "Namespaces_CheckNameAvailability",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"name": "managedEnvironmentName",
"in": "path",
"description": "Name of the Managed Environment.",
"required": true,
"type": "string"
},
{
"name": "checkNameAvailabilityRequest",
"in": "body",
"description": "The check name availability request.",
"required": true,
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest"
}
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityResponse"
}
},
"default": {
"description": "Error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"ContainerApps_CheckNameAvailability": {
"$ref": "./examples/ContainerApps_CheckNameAvailability.json"
},
"Certificates_CheckNameAvailability": {
"$ref": "./examples/Certificates_CheckNameAvailability.json"
}
}
}
}
},
"definitions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"api-version": "2022-03-01",
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "examplerg",
"managedEnvironmentName": "testcontainerenv",
"checkNameAvailabilityRequest": {
"name": "testcertificatename",
"type": "Microsoft.App/managedEnvironments/certificates"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": true,
"reason": "None",
"message": ""
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"api-version": "2022-03-01",
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "examplerg",
"managedEnvironmentName": "testcontainerenv",
"checkNameAvailabilityRequest": {
"name": "testcappname",
"type": "Microsoft.App/containerApps"
}
},
"responses": {
"200": {
"body": {
"nameAvailable": true,
"reason": "None",
"message": ""
}
}
}
}

0 comments on commit f917749

Please sign in to comment.