diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json new file mode 100644 index 000000000000..8e3550efc473 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json @@ -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" + }, + "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" + } + ], + "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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json new file mode 100644 index 000000000000..a01d8159dfc5 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/CreateOrUpdateJobPrivateEndpoint.json @@ -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" + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json new file mode 100644 index 000000000000..0c12bf32a510 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/DeleteJobPrivateEndpoint.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "privateEndpointName": "endpoint1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": {}, + "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" + } + }, + "204": {} + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json new file mode 100644 index 000000000000..82cd42f11206 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/GetJobPrivateEndpoint.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "privateEndpointName": "endpoint1", + "api-version": "2023-05-01-preview" + }, + "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" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json new file mode 100644 index 000000000000..af972d248275 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2023-05-01-preview/examples/ListJobPrivateEndpointsByAgent.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2023-05-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "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" + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/privateEndpoints/endpoint2", + "name": "endpoint2", + "type": "Microsoft.Sql/servers/jobAgents/privateEndpoints", + "properties": { + "targetServerAzureResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/targetserver2", + "privateEndpointId": "EJ_00000000-85ff-222-8d78-444444444444_endpoint2" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 3c76b2968562..2512a32e5b87 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -81,6 +81,7 @@ input-file: - Microsoft.Sql/preview/2023-05-01-preview/JobAgents.json - Microsoft.Sql/preview/2023-05-01-preview/JobCredentials.json - Microsoft.Sql/preview/2023-05-01-preview/JobExecutions.json + - Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json - Microsoft.Sql/preview/2023-05-01-preview/JobStepExecutions.json - Microsoft.Sql/preview/2023-05-01-preview/JobSteps.json - Microsoft.Sql/preview/2023-05-01-preview/JobTargetExecutions.json @@ -1177,6 +1178,7 @@ input-file: - ./Microsoft.Sql/preview/2020-11-01-preview/JobAgents.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobCredentials.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobExecutions.json +- ./Microsoft.Sql/preview/2023-05-01-preview/JobPrivateEndpoints.json - ./Microsoft.Sql/preview/2020-11-01-preview/Jobs.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobStepExecutions.json - ./Microsoft.Sql/preview/2020-11-01-preview/JobSteps.json