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

Adding JobPrivateEndpoints API to version 2023-05-01-preview #24902

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da65ff8
Adds base for updating Microsoft.Sql from version preview/2022-11-01-…
jeremyfrosti May 20, 2023
925c088
Updates readme
jeremyfrosti May 20, 2023
cae3704
Updates API version in new specs and examples
jeremyfrosti May 20, 2023
45b66dd
add mi refresh API (#24093)
guptanitish-ms May 26, 2023
145a559
Adding changes from main to release branch. PRs 24175 and 24185 (#24221)
jeremyfrosti Jun 6, 2023
aa87b5f
Enable multiple partner servers and failover of read-only endpoint fo…
lobashh Jun 6, 2023
04d4d83
Changes to Location Capabilities (#24209)
Aleksand4rZivanovic Jun 7, 2023
dbc1e3a
DAG API 2023-02-01 (#24108)
a-lazarlazic Jun 8, 2023
c2b5c55
Add FreeLimitExhaustion Capability in 2023-02-01-preview API (#24224)
mykolian Jun 8, 2023
8ee2f18
generate swagger for LocationCapabilites (#24290)
srnanikolicmdcs Jun 9, 2023
91e9137
inital commit for LTR Policy Immutability (#24347)
rebeccaxu-ms Jun 13, 2023
aeb2171
inital commit for immutable ltr backups (#24349)
rebeccaxu-ms Jun 13, 2023
10bdc6e
Update Servers swagger files with adding property "IsIPv6Enabled" (#2…
LeiWang3 Jun 13, 2023
dc4129c
Add auto rotation param to databases api (#24339)
viparek Jun 13, 2023
d895aa8
Adding IsFreemium and CreateTime to Get MI API (#24239)
nmirkovic-microsoft Jun 15, 2023
996f0e5
job private endpoint swagger
jacobopac Jul 19, 2023
577a476
rerun pipelines
jacobopac Jul 20, 2023
9e9db16
adding job private endpoints to readme
jacobopac Jul 20, 2023
70ce3b7
rerun pipelines
jacobopac Jul 20, 2023
ca10a62
trying to fix lint errors
jacobopac Jul 21, 2023
b1950e4
fixing typos - singular resource name and description.
jacobopac Jul 25, 2023
0a114e4
adding arm-id
jacobopac Jul 26, 2023
0fb196b
merging with new API feature branch
jacobopac Aug 29, 2023
338373c
Moving files to the new version; no changes to the files themselves.
jacobopac Aug 29, 2023
5831413
adding job agent private endpoints to readme
jacobopac Aug 29, 2023
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,337 @@
{
"swagger": "2.0",
"info": {
"version": "2023-05-01-preview",
"title": "SqlManagementClient",
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities."
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints": {
"get": {
"tags": [
"JobPrivateEndpoints"
],
"description": "Gets a list of job agent private endpoints.",
"operationId": "JobPrivateEndpoints_ListByAgent",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "jobAgentName",
"in": "path",
"description": "The name of the job agent.",
"required": true,
"type": "string"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the list of private endpoints.",
"schema": {
"$ref": "#/definitions/JobPrivateEndpointListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 409 ServerDisabled - Server is disabled."
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List private endpoints in a job agent": {
"$ref": "./examples/ListJobPrivateEndpointsByAgent.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/privateEndpoints/{privateEndpointName}": {
"get": {
"tags": [
"JobPrivateEndpoints"
],
"description": "Gets a private endpoint.",
"operationId": "JobPrivateEndpoints_Get",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "jobAgentName",
"in": "path",
"description": "The name of the job agent.",
"required": true,
"type": "string"
},
{
"name": "privateEndpointName",
"in": "path",
"description": "The name of the private endpoint to get.",
"required": true,
"type": "string"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the private endpoint.",
"schema": {
"$ref": "#/definitions/JobPrivateEndpoint"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 409 ServerDisabled - Server is disabled."
}
},
"x-ms-examples": {
"Get a private endpoint.": {
"$ref": "./examples/GetJobPrivateEndpoint.json"
}
}
},
"put": {
"tags": [
"JobPrivateEndpoints"
],
"description": "Creates or updates a private endpoint.",
"operationId": "JobPrivateEndpoints_CreateOrUpdate",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "jobAgentName",
"in": "path",
"description": "The name of the job agent.",
"required": true,
"type": "string"
},
{
"name": "privateEndpointName",
"in": "path",
"description": "The name of the private endpoint.",
"required": true,
"type": "string"
},
{
"name": "parameters",
"in": "body",
"description": "The requested private endpoint state.",
"required": true,
"schema": {
"$ref": "#/definitions/JobPrivateEndpoint"
}
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully updated the private endpoint.",
"schema": {
"$ref": "#/definitions/JobPrivateEndpoint"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidParameterValue - An invalid value was given to a parameter.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 ElasticJobAgentIsBusy - The Elastic Job Agent '{0}' is currently busy processing another request. Please retry operation later.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 ElasticJobAgentInvalidOperationParameter - An invalid operation parameter was identified for this Elastic Job Agent operation. {0}\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 ElasticJobAgentResourceAlreadyExists - Elastic job agent '{0}' already contains the resource '{1}'\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 400 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources."
},
"202": {

Choose a reason for hiding this comment

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

Do not return 202 for PUT, please remove. If it's long running, 201 will handle it by setting x-ms-long-running-operation: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @sjanamma , thanks for review. My swagger had already been signed off on. I just changed the base branch that I'm merging to. I received exceptions. Did you still need me to change it?

"description": "Accepted"
},
"201": {
"description": "Successfully created the private endpoint.",
"schema": {
"$ref": "#/definitions/JobPrivateEndpoint"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},

Choose a reason for hiding this comment

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

for control plane operations, not required to set long running operation options, safe to remove

"x-ms-examples": {
"Create a private endpoint.": {
"$ref": "./examples/CreateOrUpdateJobPrivateEndpoint.json"
}
}
},
"delete": {
"tags": [
"JobPrivateEndpoints"
],
"description": "Deletes a private endpoint.",
"operationId": "JobPrivateEndpoints_Delete",
"parameters": [
{
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"name": "jobAgentName",
"in": "path",
"description": "The name of the job agent.",
"required": true,
"type": "string"
},
{
"name": "privateEndpointName",
"in": "path",
"description": "The name of the private endpoint to delete.",
"required": true,
"type": "string"
},
{
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully deleted the private endpoint."
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 ElasticJobAgentInvalidOperationParameter - An invalid operation parameter was identified for this Elastic Job Agent operation. {0}\n\n * 400 TokenTooLong - The provided token is too long.\n\n * 400 CannotUseTrailingWhitespacesInDatabaseName - The database name validation failed.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 ElasticJobAgentIsBusy - The Elastic Job Agent '{0}' is currently busy processing another request. Please retry operation later.\n\n * 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 OperationIdNotFound - The operation with Id does not exist.\n\n * 409 ServerDisabled - Server is disabled.\n\n * 409 CannotCancelOperation - The management operation is in a state that cannot be cancelled.\n\n * 409 OperationCancelled - The operation has been cancelled by user.\n\n * 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.\n\n * 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources."
},
"202": {
"description": "Accepted"
},
"204": {
"description": "The specified private endpoint does not exist."
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"x-ms-examples": {
"Delete a private endpoint": {
"$ref": "./examples/DeleteJobPrivateEndpoint.json"
}
}
}
}
},
"definitions": {
"JobPrivateEndpoint": {
"description": "A job agent private endpoint.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"

Choose a reason for hiding this comment

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

use the latest common types. v3 or v5

}
],
"properties": {
"properties": {
"$ref": "#/definitions/JobPrivateEndpointProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"JobPrivateEndpointListResult": {
"description": "A list of job agent private endpoints.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/JobPrivateEndpoint"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"JobPrivateEndpointProperties": {
"description": "Properties of job agent private endpoint.",
"required": [
"targetServerAzureResourceId"
],
"type": "object",
"properties": {
"targetServerAzureResourceId": {
"description": "ARM resource id of the server the private endpoint will target.",
"type": "string",
"format": "arm-id",
"x-ms-arm-id-details": {
"allowedResources": [
{
"type": "Microsoft.Sql/servers"
}
]
}
},
"privateEndpointId": {
"description": "Private endpoint id of the private endpoint.",
"type": "string",
"readOnly": true
}
}
}
},
"parameters": {
"ServerNameParameter": {
"name": "serverName",
"in": "path",
"description": "The name of the server.",
"required": true,
"type": "string",
"x-ms-parameter-location": "method"
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"description": "Azure Active Directory OAuth2 Flow",
"flow": "implicit",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "group1",
"serverName": "server1",
"jobAgentName": "agent1",
"privateEndpointName": "endpoint1",
"api-version": "2023-05-01-preview",
"parameters": {
"properties": {
"targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1",
"name": "endpoint1",
"type": "Microsoft.Sql/servers/jobAgents/privateEndpoints",
"properties": {
"targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1",
"privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1"
}
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint1",
"name": "endpoint1",
"type": "Microsoft.Sql/servers/jobAgents/privateEndpoints",
"properties": {
"targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver1",
"privateEndpointId": "EJ_47e33188-85ff-4705-8d78-444444444444_endpoint1"
}
}
},
"202": {
"headers": {
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Sql/locations/westus/jobAgentPrivateEndpointOperationResults/00000000-1111-2222-3333-444444444444?api-version=2023-05-01-preview"
}
}
}
}
Loading