{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "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.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "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" } } }, "tags": [ { "name": "JobCredentials" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials": { "get": { "operationId": "JobCredentials_ListByAgent", "tags": [ "JobCredentials" ], "description": "Gets a list of jobs credentials.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/JobCredentialListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "List credentials in a job agent": { "$ref": "./examples/ListJobCredentialsByAgent.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}": { "get": { "operationId": "JobCredentials_Get", "tags": [ "JobCredentials" ], "description": "Gets a jobs credential.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" }, { "name": "credentialName", "in": "path", "description": "The name of the credential.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/JobCredential" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a credential": { "$ref": "./examples/GetJobCredential.json" } } }, "put": { "operationId": "JobCredentials_CreateOrUpdate", "tags": [ "JobCredentials" ], "description": "Creates or updates a job credential.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" }, { "name": "credentialName", "in": "path", "description": "The name of the credential.", "required": true, "type": "string" }, { "name": "parameters", "in": "body", "description": "The requested job credential state.", "required": true, "schema": { "$ref": "#/definitions/JobCredential" } } ], "responses": { "200": { "description": "Resource 'JobCredential' update operation succeeded", "schema": { "$ref": "#/definitions/JobCredential" } }, "201": { "description": "Resource 'JobCredential' create operation succeeded", "schema": { "$ref": "#/definitions/JobCredential" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create or update a credential": { "$ref": "./examples/CreateOrUpdateJobCredential.json" } } }, "delete": { "operationId": "JobCredentials_Delete", "tags": [ "JobCredentials" ], "description": "Deletes a job credential.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string" }, { "name": "jobAgentName", "in": "path", "description": "The name of the job agent to be retrieved.", "required": true, "type": "string" }, { "name": "credentialName", "in": "path", "description": "The name of the credential.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Resource deleted successfully." }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Delete a credential": { "$ref": "./examples/DeleteJobCredential.json" } } } } }, "definitions": { "JobCredential": { "type": "object", "description": "A stored credential that can be used by a job to connect to target databases.", "properties": { "properties": { "$ref": "#/definitions/JobCredentialProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "JobCredentialListResult": { "type": "object", "description": "The response of a JobCredential list operation.", "properties": { "value": { "type": "array", "description": "The JobCredential items on this page", "items": { "$ref": "#/definitions/JobCredential" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "JobCredentialProperties": { "type": "object", "description": "Properties of a job credential.", "properties": { "username": { "type": "string", "description": "The credential user name." }, "password": { "type": "string", "description": "The credential password.", "x-ms-mutability": [ "update", "create" ] } }, "required": [ "username", "password" ] } }, "parameters": {} }