-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
mentat9
merged 25 commits into
Azure:release-sql-Microsoft.Sql-2023-05-01-preview
from
jacobopac:dev/jpacheco/elastic-jobs-private-endpoint-apis
Sep 7, 2023
Merged
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 925c088
Updates readme
jeremyfrosti cae3704
Updates API version in new specs and examples
jeremyfrosti 45b66dd
add mi refresh API (#24093)
guptanitish-ms 145a559
Adding changes from main to release branch. PRs 24175 and 24185 (#24221)
jeremyfrosti aa87b5f
Enable multiple partner servers and failover of read-only endpoint fo…
lobashh 04d4d83
Changes to Location Capabilities (#24209)
Aleksand4rZivanovic dbc1e3a
DAG API 2023-02-01 (#24108)
a-lazarlazic c2b5c55
Add FreeLimitExhaustion Capability in 2023-02-01-preview API (#24224)
mykolian 8ee2f18
generate swagger for LocationCapabilites (#24290)
srnanikolicmdcs 91e9137
inital commit for LTR Policy Immutability (#24347)
rebeccaxu-ms aeb2171
inital commit for immutable ltr backups (#24349)
rebeccaxu-ms 10bdc6e
Update Servers swagger files with adding property "IsIPv6Enabled" (#2…
LeiWang3 dc4129c
Add auto rotation param to databases api (#24339)
viparek d895aa8
Adding IsFreemium and CreateTime to Get MI API (#24239)
nmirkovic-microsoft 996f0e5
job private endpoint swagger
jacobopac 577a476
rerun pipelines
jacobopac 9e9db16
adding job private endpoints to readme
jacobopac 70ce3b7
rerun pipelines
jacobopac ca10a62
trying to fix lint errors
jacobopac b1950e4
fixing typos - singular resource name and description.
jacobopac 0a114e4
adding arm-id
jacobopac 0fb196b
merging with new API feature branch
jacobopac 338373c
Moving files to the new version; no changes to the files themselves.
jacobopac 5831413
adding job agent private endpoints to readme
jacobopac File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
337 changes: 337 additions & 0 deletions
337
...on/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { | ||
"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" | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
} | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
...r/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?