From 25788eb60aabe9402070e1d1c0f0ab8861e50e7b Mon Sep 17 00:00:00 2001 From: Tom Kerkhove Date: Thu, 21 Mar 2024 01:20:24 +0100 Subject: [PATCH] feat(apim): Introduce gateway resource (#27757) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * WIP * Update sample * WIP * Add GatewayNameParameter * Clean up * Update sample * Add another sample * Add sample for delete gateway * Remove endpoints * Fix typo * Add list sample * Clean up Signed-off-by: Tom Kerkhove * Add disclaimer Signed-off-by: Tom Kerkhove * Make it pretty 💄 Signed-off-by: Tom Kerkhove * Refer to new file Signed-off-by: Tom Kerkhove * Add missing ApiManagementGatewayListResult Signed-off-by: Tom Kerkhove * Update sample reference Signed-off-by: Tom Kerkhove * Remove ApiManagementGatewayIdentity + List by operation Signed-off-by: Tom Kerkhove * Add more sample Signed-off-by: Tom Kerkhove * Latest version of common types Signed-off-by: Tom Kerkhove * Remove 200 for delete Signed-off-by: Tom Kerkhove * Formatting and re-order Signed-off-by: Tom Kerkhove * Align with spec Signed-off-by: Tom Kerkhove * Align sample with spec Signed-off-by: Tom Kerkhove * Error response from common types Signed-off-by: Tom Kerkhove * Rename SKU name * Have seperate SKU for patch to not make it mandatory * Remove empty required * Improve note * Rename schema * Remove unused type * sku.capacity should not be required --------- Signed-off-by: Tom Kerkhove --- .../2023-09-01-preview/apigateway.json | 633 ++++++++++++++++++ .../2023-09-01-preview/apimanagement.json | 11 + .../ApiManagementCreateStandardGateway.json | 106 +++ .../ApiManagementGatewayDeleteGateway.json | 44 ++ .../ApiManagementGatewayGetGateway.json | 51 ++ ...iManagementListGatewaysBySubscription.json | 83 +++ ...atewaysBySubscriptionAndResourceGroup.json | 84 +++ .../ApiManagementUpdateStandardGateway.json | 67 ++ .../apimanagement/resource-manager/readme.md | 1 + 9 files changed, 1080 insertions(+) create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementCreateStandardGateway.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayDeleteGateway.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayGetGateway.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscription.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json create mode 100644 specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementUpdateStandardGateway.json diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json new file mode 100644 index 000000000000..70f15762b803 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json @@ -0,0 +1,633 @@ +{ + "swagger": "2.0", + "info": { + "title": "ApiManagementClient", + "description": "Use these REST APIs to manage Azure API Management gateway deployments.", + "version": "2023-09-01-preview" + }, + "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}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}": { + "put": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_CreateOrUpdate", + "description": "Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete.", + "x-ms-examples": { + "ApiManagementCreateStandardGateway": { + "$ref": "./examples/ApiManagementCreateStandardGateway.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/GatewayNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + }, + "description": "Parameters supplied to the CreateOrUpdate API Management gateway operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The gateway was successfully set up.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "patch": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_Update", + "description": "Updates an existing API Management gateway.", + "x-ms-examples": { + "ApiManagementUpdateStandardGateway": { + "$ref": "./examples/ApiManagementUpdateStandardGateway.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/GatewayNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ApiManagementGatewayUpdateParameters" + }, + "description": "Parameters supplied to the CreateOrUpdate API Management gateway operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The gateway was successfully updated.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + } + }, + "202": { + "description": "The gateway update request was Accepted.", + "headers": { + "location": { + "description": "Location header", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + }, + "get": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_Get", + "description": "Gets an API Management gateway resource description.", + "x-ms-examples": { + "ApiManagementGatewayGetGateway": { + "$ref": "./examples/ApiManagementGatewayGetGateway.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/GatewayNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the API Management gateway Resource.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_Delete", + "description": "Deletes an existing API Management gateway.", + "x-ms-examples": { + "ApiManagementGatewayDeleteGateway": { + "$ref": "./examples/ApiManagementGatewayDeleteGateway.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./apimanagement.json#/parameters/GatewayNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "202": { + "description": "The gateway delete request was accepted.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayResource" + }, + "headers": { + "location": { + "description": "Location header", + "type": "string" + } + } + }, + "204": { + "description": "The gateway does not exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateway": { + "get": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_ListByResourceGroup", + "description": "List all API Management gateways within a resource group.", + "x-ms-examples": { + "ApiManagementListGatewaysBySubscriptionAndResourceGroup": { + "$ref": "./examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The API Management gateways list.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateway": { + "get": { + "tags": [ + "ApiManagementGateway" + ], + "operationId": "ApiManagementGateway_List", + "description": "List all API Management gateways within a subscription.", + "x-ms-examples": { + "ApiManagementListGatewaysBySubscription": { + "$ref": "./examples/ApiManagementListGatewaysBySubscription.json" + } + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "The API Management gateways list.", + "schema": { + "$ref": "#/definitions/ApiManagementGatewayListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "GatewaySku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Sku.", + "externalDocs": { + "url": "https://azure.microsoft.com/en-us/pricing/details/api-management/" + }, + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "SkuType", + "modelAsString": true, + "values": [ + { + "value": "Standard", + "description": "Standard SKU of the API gateway." + } + ] + } + } + }, + "description": "Describes an available API Management SKU for gateways." + }, + "GatewayConfigurationApi": { + "type": "object", + "properties": { + "hostname": { + "readOnly": true, + "type": "string", + "description": "Hostname to which the agent connects to propagate configuration to the cloud." + } + }, + "description": "Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU." + }, + "FrontendConfiguration": { + "type": "object", + "properties": { + "defaultHostname": { + "readOnly": true, + "type": "string", + "description": "The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU." + } + }, + "description": "Information regarding how the gateway should be exposed." + }, + "BackendConfiguration": { + "type": "object", + "properties": { + "subnet": { + "$ref": "#/definitions/BackendSubnetConfiguration", + "description": "The default hostname of the data-plane gateway to which requests can be sent." + } + }, + "description": "Information regarding how the gateway should integrate with backend systems." + }, + "BackendSubnetConfiguration": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ARM ID of the subnet in which the backend systems are hosted." + } + }, + "description": "Information regarding how the subnet to which the gateway should be injected." + }, + "ApiManagementGatewayProperties": { + "type": "object", + "properties": {}, + "allOf": [ + { + "$ref": "#/definitions/ApiManagementGatewayBaseProperties" + } + ], + "description": "Properties of an API Management gateway resource description." + }, + "ApiManagementGatewayUpdateProperties": { + "type": "object", + "properties": {}, + "allOf": [ + { + "$ref": "#/definitions/ApiManagementGatewayBaseProperties" + } + ], + "description": "Properties of an API Management gateway resource description." + }, + "ApiManagementGatewayBaseProperties": { + "type": "object", + "properties": { + "provisioningState": { + "type": "string", + "description": "The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted.", + "readOnly": true + }, + "targetProvisioningState": { + "type": "string", + "description": "The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway.", + "readOnly": true + }, + "createdAtUtc": { + "type": "string", + "format": "date-time", + "description": "Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.", + "readOnly": true + }, + "frontend": { + "$ref": "#/definitions/FrontendConfiguration", + "description": "Information regarding how the gateway should be exposed." + }, + "backend": { + "$ref": "#/definitions/BackendConfiguration", + "description": "Information regarding how the gateway should integrate with backend systems." + }, + "configurationApi": { + "$ref": "#/definitions/GatewayConfigurationApi", + "description": "Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU." + } + }, + "description": "Base Properties of an API Management gateway resource description." + }, + "ApiManagementGatewayListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ApiManagementGatewayResource" + }, + "description": "Result of the List API Management gateway operation." + }, + "nextLink": { + "type": "string", + "description": "Link to the next set of results. Not empty if Value contains incomplete list of API Management services." + } + }, + "required": [ + "value" + ], + "description": "The response of the List API Management gateway operation." + }, + "ApiManagementGatewaySkuProperties": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Sku.", + "externalDocs": { + "url": "https://azure.microsoft.com/en-us/pricing/details/api-management/" + }, + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "SkuType", + "modelAsString": true, + "values": [ + { + "value": "Standard", + "description": "Standard SKU of the API gateway." + } + ] + } + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "Capacity of the SKU (number of deployed units of the SKU)" + } + }, + "required": [ + "name" + ], + "description": "API Management gateway resource SKU properties." + }, + "ApiManagementGatewaySkuPropertiesForPatch": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the Sku.", + "externalDocs": { + "url": "https://azure.microsoft.com/en-us/pricing/details/api-management/" + }, + "enum": [ + "Standard" + ], + "x-ms-enum": { + "name": "SkuType", + "modelAsString": true, + "values": [ + { + "value": "Standard", + "description": "Standard SKU of the API gateway." + } + ] + } + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "Capacity of the SKU (number of deployed units of the SKU)" + } + }, + "description": "API Management gateway resource SKU properties for PATCH operations given nothing should be required." + }, + "ApiManagementGatewayResource": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ApiManagementGatewayProperties", + "description": "Properties of the API Management gateway." + }, + "sku": { + "$ref": "#/definitions/ApiManagementGatewaySkuProperties", + "description": "SKU properties of the API Management gateway." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/systemData", + "description": "Metadata pertaining to creation and last modification of the resource.", + "readOnly": true + }, + "location": { + "type": "string", + "description": "Resource location.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "etag": { + "type": "string", + "description": "ETag of the resource.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ApimResource" + } + ], + "required": [ + "location", + "sku", + "properties" + ], + "description": "A single API Management gateway resource in List or Get response." + }, + "ApimResource": { + "type": "object", + "description": "The Resource definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource ID." + }, + "name": { + "type": "string", + "description": "Resource name.", + "readOnly": true + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type for API Management resource is set to Microsoft.ApiManagement." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": true + }, + "ApiManagementGatewayUpdateParameters": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ApiManagementGatewayUpdateProperties", + "description": "Properties of the API Management gateway." + }, + "sku": { + "$ref": "#/definitions/ApiManagementGatewaySkuPropertiesForPatch", + "description": "SKU properties of the API Management gateway." + }, + "etag": { + "type": "string", + "description": "ETag of the resource.", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ApimResource" + } + ], + "description": "Parameter supplied to Update API Management gateway." + } + }, + "parameters": {} +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json index 1fa4abd6657c..f534233e354f 100644 --- a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json @@ -357,6 +357,17 @@ "description": "Email identifier.", "x-ms-parameter-location": "method" }, + "GatewayNameParameter": { + "name": "gatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the API Management gateway.", + "minLength": 1, + "maxLength": 50, + "pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$", + "x-ms-parameter-location": "method" + }, "GroupIdParameter": { "name": "groupId", "in": "path", diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementCreateStandardGateway.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementCreateStandardGateway.json new file mode 100644 index 000000000000..38c2066910ef --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementCreateStandardGateway.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "gatewayName": "apimGateway1", + "resourceGroupName": "rg1", + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters": { + "properties": { + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "location": "South Central US", + "tags": { + "Name": "Contoso", + "Test": "User" + } + } + }, + "responses": { + "201": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1", + "name": "apimGateway1", + "type": "Microsoft.ApiManagement/gateway", + "tags": { + "api-version": "2023-09-01-preview" + }, + "location": "East US", + "etag": "AAAAAAAmRAM=", + "properties": { + "provisioningState": "Created", + "targetProvisioningState": "Activating", + "createdAtUtc": "2022-07-11T18:41:01.2506031Z", + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2022-07-11T18:41:00.9390609Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-07-11T18:41:00.9390609Z" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1", + "name": "apimGateway1", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "api-version": "2023-09-01-preview" + }, + "location": "East US", + "etag": "AAAAAAAmREI=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2022-07-11T18:41:01.2506031Z", + "frontend": { + "defaultHostname": "apimGateway1.eastus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "apimGateway1.eastus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2022-07-11T18:41:00.9390609Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-07-11T18:41:00.9390609Z" + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayDeleteGateway.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayDeleteGateway.json new file mode 100644 index 000000000000..82c92639ec72 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayDeleteGateway.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "gatewayName": "example-gateway", + "resourceGroupName": "rg1", + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2023-09-01-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway", + "name": "example-gateway", + "type": "Microsoft.ApiManagement/gateway", + "tags": {}, + "location": "West US", + "etag": "AAAAAAFfhHY=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "Deleting", + "createdAtUtc": "2016-12-20T19:41:21.5823069Z", + "frontend": { + "defaultHostname": "example-gateway.westus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "example-gateway.westus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + } + } + }, + "204": {} + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayGetGateway.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayGetGateway.json new file mode 100644 index 000000000000..dd7d1d08ddcc --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementGatewayGetGateway.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "gatewayName": "apimService1", + "resourceGroupName": "rg1", + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateway/example-gateway", + "name": "example-gateway", + "type": "Microsoft.ApiManagement/gateway", + "tags": { + "owner": "v-aswmoh", + "ReleaseName": "Z3" + }, + "location": "East US", + "etag": "AAAAAAAWN/4=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "frontend": { + "defaultHostname": "example-gateway.eastus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "example-gateway.eastus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "string", + "createdByType": "User", + "createdAt": "2021-06-16T09:40:00.7106733Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z" + } + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscription.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscription.json new file mode 100644 index 000000000000..3fd9644bd886 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscription.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-1", + "name": "standard-gw-1", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "owner": "v-aswmoh", + "ReleaseName": "Z3" + }, + "location": "West US", + "etag": "AAAAAAAWN/4=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "frontend": { + "defaultHostname": "standard-gw-1.westus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "standard-gw-1.westus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "bar@contoso.com", + "createdByType": "User", + "createdAt": "2021-06-16T09:40:00.7106733Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg2/providers/Microsoft.ApiManagement/gateways/standard-gw-2", + "name": "standard-gw-2", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "Owner": "vitaliik" + }, + "location": "East US", + "etag": "AAAAAAAWKwo=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "frontend": { + "defaultHostname": "standard-gw-2.eastus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn2/subnets/sn2" + } + }, + "configurationApi": { + "hostname": "standard-gw-2.eastus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json new file mode 100644 index 000000000000..981066ad0a32 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "resourceGroupName": "rg1", + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-1", + "name": "standard-gw-1", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "owner": "v-aswmoh", + "ReleaseName": "Z3" + }, + "location": "West US", + "etag": "AAAAAAAWN/4=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "frontend": { + "defaultHostname": "standard-gw-1.westus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "standard-gw-1.westus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "bar@contoso.com", + "createdByType": "User", + "createdAt": "2021-06-16T09:40:00.7106733Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z" + } + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/standard-gw-2", + "name": "standard-gw-2", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "Owner": "vitaliik" + }, + "location": "East US", + "etag": "AAAAAAAWKwo=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "frontend": { + "defaultHostname": "standard-gw-2.eastus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn2/subnets/sn2" + } + }, + "configurationApi": { + "hostname": "standard-gw-2.eastus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + } + } + ] + } + } + } +} diff --git a/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementUpdateStandardGateway.json b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementUpdateStandardGateway.json new file mode 100644 index 000000000000..24bdaf646b48 --- /dev/null +++ b/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/examples/ApiManagementUpdateStandardGateway.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "gatewayName": "apimGateway1", + "resourceGroupName": "rg1", + "api-version": "2023-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters": { + "properties": {}, + "sku": { + "name": "Standard", + "capacity": 10 + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1", + "name": "apimGateway1", + "type": "Microsoft.ApiManagement/gateways", + "tags": { + "api-version": "2023-09-01-preview" + }, + "location": "East US", + "etag": "AAAAAAAmREI=", + "properties": { + "provisioningState": "Succeeded", + "targetProvisioningState": "", + "createdAtUtc": "2022-07-11T18:41:01.2506031Z", + "frontend": { + "defaultHostname": "apimGateway1.eastus.gateway.azure-api.net" + }, + "backend": { + "subnet": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1" + } + }, + "configurationApi": { + "hostname": "apimGateway1.eastus.configuration.gateway.azure-api.net" + } + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "systemData": { + "createdBy": "user@contoso.com", + "createdByType": "User", + "createdAt": "2022-07-11T18:41:00.9390609Z", + "lastModifiedBy": "user@contoso.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2022-07-11T18:41:00.9390609Z" + } + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse", + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/gateways/apimGateway1/operationresults/ZWFzdHVzOmFuZHktdGVzdGluZy0yMDIyLTA0LTAxLXByZXZpZXctNF9BY3RfODQ2ZWE4Ng==?api-version=2023-09-01-preview&asyncResponse" + } + } + } +} diff --git a/specification/apimanagement/resource-manager/readme.md b/specification/apimanagement/resource-manager/readme.md index db55eadaae32..e698f2afda57 100644 --- a/specification/apimanagement/resource-manager/readme.md +++ b/specification/apimanagement/resource-manager/readme.md @@ -39,6 +39,7 @@ These settings apply only when `--tag=package-preview-2023-09` is specified on t ```yaml $(tag) == 'package-preview-2023-09' input-file: - Microsoft.ApiManagement/preview/2023-09-01-preview/apimallpolicies.json + - Microsoft.ApiManagement/preview/2023-09-01-preview/apigateway.json - Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json - Microsoft.ApiManagement/preview/2023-09-01-preview/apimapis.json - Microsoft.ApiManagement/preview/2023-09-01-preview/apimapisByTags.json