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

add api for private link resources #10548

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
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ AZFW
AZNB
azns
azpkg
azpodpolicy
azureaccounts
azureactivedirectory
azureblob
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"api-version": "2020-09-01",
"subscriptionId": "subid1",
"resourceGroupName": "rg1",
"resourceName": "clustername1"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "management",
"type": "Microsoft.ContainerService/managedClusters/privateLinkResources",
"groupId": "management",
"requiredMembers": [
"management"
],
"privateLinkServiceID": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateLinkServices/plsName"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"api-version": "2020-09-01",
"subscriptionId": "subid1",
"resourceGroupName": "rg1",
"resourceName": "clustername1",
"parameters": {
"name": "management"
}
},
"responses": {
"200": {
"body": {
"privateLinkServiceID": "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Network/privateLinkServices/plsName"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1280,6 +1280,101 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources": {
"get": {
"tags": [
"privateLinkResources"
],
"operationId": "PrivateLinkResources_List",
"summary": "Gets a list of private link resources in the specified managed cluster.",
"description": "Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private link resource.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/PrivateLinkResourcesListResult"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"List Private Link Resources by Managed Cluster": {
"$ref": "./examples/PrivateLinkResourcesList.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId": {
"post": {
"tags": [
"resolvePrivateLinkServiceId"
],
"operationId": "ResolvePrivateLinkServiceId_POST",
"summary": "Gets the private link service ID for the specified managed cluster.",
"description": "Gets the private link service ID the specified managed cluster.",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ResourceNameParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PrivateLinkResource"
},
"description": "Parameters (name, groupId) supplied in order to resolve a private link service ID."
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/PrivateLinkResource"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-examples": {
"Resolve the Private Link Service ID for Managed Cluster": {
"$ref": "./examples/ResolvePrivateLinkServiceId.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -2985,6 +3080,56 @@
"description": "The private link service connection description."
}
}
},
"PrivateLinkResourcesListResult": {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for reviewers: we has only 1 item in the list currently, so pagination is not needed.

"type": "object",
"description": "A list of private link resources",
"properties": {
"value": {
"description": "The collection value.",
"type": "array",
"items": {
"$ref": "#/definitions/PrivateLinkResource"
}
}
}
},
"PrivateLinkResource": {
"description": "A private link resource",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The ID of the private link resource."
},
"name": {
"type": "string",
"description": "The name of the private link resource.",
"externalDocs": {
"url": "https://aka.ms/search-naming-rules"
}
},
"type": {
"type": "string",
"description": "The resource type."
},
"groupId": {
"type": "string",
"description": "The group ID of the resource."
},
"requiredMembers": {
"type": "array",
"items": {
"type": "string"
},
"description": "RequiredMembers of the resource"
},
"privateLinkServiceID": {
"readOnly": true,
"type": "string",
"description": "The private link service ID of the resource, this field is exposed only to NRP internally."
}
}
}
},
"parameters": {
Expand Down