Skip to content

Commit

Permalink
[APIM]Add private endpoint connection APIs (Azure#15115)
Browse files Browse the repository at this point in the history
* Add private endpoint connection apis

* add readme

* quick fixes

* fix to PE contract

* Small fixes

* small fixes

* small fixes

* Small fixes

* small fixes

* small fix

* small fixes

* small fixes

* small fixes

* Update readme.md

* fix error

* small fix

* fix format

* address comments

* small fixes

* Change to lower case

* small fixes

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
  • Loading branch information
2 people authored and solankisamir committed Aug 27, 2021
1 parent 1112cc3 commit 1113911
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,13 @@
"description": "Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored.",
"default": false
},
"privateEndpointConnections": {
"type": "array",
"items": {
"$ref": "./definitions.json#/definitions/RemotePrivateEndpointConnectionWrapper"
},
"description": "List of Private Endpoint Connections of this service."
},
"platformVersion": {
"type": "string",
"description": "Compute Platform Version running the service in this location.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
{
"swagger": "2.0",
"info": {
"title": "ApiManagementClient",
"description": "Use these REST APIs for performing operations on Private Endpoint Connection in Azure API Management deployment.",
"version": "2021-04-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/service/{serviceName}/privateEndpointConnections": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"operationId": "PrivateEndpointConnection_ListByService",
"description": "Lists all private endpoint connections of the API Management service instance.",
"x-ms-examples": {
"ApiManagementListPrivateEndpointConnections": {
"$ref": "./examples/ApiManagementListPrivateEndpointConnections.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnectionListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": null
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"operationId": "PrivateEndpointConnection_GetByName",
"description": "Gets the details of the Private Endpoint Connection specified by its identifier.",
"x-ms-examples": {
"ApiManagementGetPrivateEndpointConnection": {
"$ref": "./examples/ApiManagementGetPrivateEndpointConnection.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "privateEndpointConnectionName",
"in": "path",
"description": "Name of the private endpoint connection.",
"required": true,
"type": "string"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
},
"put": {
"tags": [
"PrivateEndpointConnections"
],
"operationId": "PrivateEndpointConnection_CreateOrUpdate",
"description": "Creates a new Private Endpoint Connection or updates an existing one.",
"x-ms-examples": {
"ApiManagementApproveOrRejectPrivateEndpointConnection": {
"$ref": "./examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "privateEndpointConnectionName",
"in": "path",
"description": "Name of the private endpoint connection.",
"required": true,
"type": "string"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"name": "privateEndpointConnectionRequest",
"in": "body",
"required": true,
"schema": {
"$ref": "./definitions.json#/definitions/PrivateEndpointConnectionRequest"
}
}
],
"responses": {
"201": {
"description": "Request to approve or reject private endpoint connection. Location header contains the URL where the status of the long running operation can be checked."
},
"200": {
"description": "Private Endpoint Connection Request was completed.",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnection"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
},
"delete": {
"tags": [
"PrivateEndpointConnections"
],
"operationId": "PrivateEndpointConnection_Delete",
"description": "Deletes the specified Private Endpoint Connection.",
"x-ms-examples": {
"ApiManagementDeletePrivateEndpointConnection": {
"$ref": "./examples/ApiManagementDeletePrivateEndpointConnection.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "privateEndpointConnectionName",
"in": "path",
"description": "Name of the private endpoint connection.",
"required": true,
"type": "string"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The Private Endpoint Connection was successfully deleted."
},
"202": {
"description": "Request to delete API was accepted. Location header contains the URL where the status of the long running operation can be checked."
},
"204": {
"description": "Private endpoint connection does not exist."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
},
"x-ms-long-running-operation": true
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"description": "Description for Gets the private link resources",
"operationId": "PrivateEndpointConnection_ListPrivateLinkResources",
"x-ms-examples": {
"ApiManagementListPrivateLinkGroupResources": {
"$ref": "./examples/ApiManagementListPrivateLinkGroupResources.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateLinkResourceListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}": {
"get": {
"tags": [
"PrivateEndpointConnections"
],
"description": "Description for Gets the private link resources",
"operationId": "PrivateEndpointConnection_GetPrivateLinkResource",
"x-ms-examples": {
"ApiManagementGetPrivateLinkGroupResource": {
"$ref": "./examples/ApiManagementGetPrivateLinkGroupResource.json"
}
},
"parameters": [
{
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"name": "privateLinkSubResourceName",
"in": "path",
"description": "Name of the private link resource.",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateLinkResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
}
},
"definitions": {},
"parameters": {}
}
Loading

0 comments on commit 1113911

Please sign in to comment.