swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Credential API schemes: - https tags: - name: Credential paths: /credentials: post: tags: - Credential summary: Microsoft Azure Create A New Data Source Credential operationId: microsoftAzureCreatecredential consumes: - application/json produces: - application/json parameters: - in: body name: body description: Create data source credential request required: true schema: $ref: '#/definitions/DataSourceCredential' responses: '201': description: Success headers: Location: description: Location of the newly created resource. type: string default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-examples: Create a new data source credential: $ref: ./examples/createCredential.json description: Needs a more full description created. get: tags: - Credential summary: Microsoft Azure List All Credentials operationId: microsoftAzureListcredentials produces: - application/json parameters: - in: query name: $skip description: for paging, skipped number type: integer format: int32 - in: query name: $maxpagesize description: the maximum number of items in one page type: integer format: int32 responses: '200': description: Success schema: $ref: '#/definitions/DataSourceCredentialList' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-pageable: nextLinkName: '@nextLink' x-ms-examples: List all credentials: $ref: ./examples/listCredentials.json description: Needs a more full description created. /credentials/{credentialId}: patch: tags: - Credential summary: Microsoft Azure Update A Data Source Credential operationId: microsoftAzureUpdatecredential consumes: - application/merge-patch+json produces: - application/json parameters: - in: path name: credentialId description: Data source credential unique ID required: true type: string format: uuid - in: body name: body description: Update data source credential request required: true schema: $ref: '#/definitions/DataSourceCredentialPatch' responses: '200': description: Success schema: $ref: '#/definitions/DataSourceCredential' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-examples: Update a data source credential: $ref: ./examples/updateCredential.json description: Needs a more full description created. delete: tags: - Credential summary: Microsoft Azure Delete A Data Source Credential operationId: microsoftAzureDeletecredential produces: - application/json parameters: - in: path name: credentialId description: Data source credential unique ID required: true type: string format: uuid responses: '204': description: The resource is deleted successfully or does not exist. default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-examples: Delete a data source credential: $ref: ./examples/deleteCredential.json description: Needs a more full description created. get: tags: - Credential summary: Microsoft Azure Get A Data Source Credential operationId: microsoftAzureGetcredential produces: - application/json parameters: - in: path name: credentialId description: Data source credential unique ID required: true type: string format: uuid responses: '200': description: Success schema: $ref: '#/definitions/DataSourceCredential' default: description: Client error or server error (4xx or 5xx) schema: $ref: '#/definitions/ErrorCode' x-ms-examples: Get a data source credential: $ref: ./examples/getCredential.json description: Needs a more full description created. /credentials/{credentialName}: get: tags: - Credential description: Gets credential information operationId: microsoftAzureCredentialGet produces: - application/json parameters: - in: path name: credentialName required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: Success schema: $ref: '#/definitions/Credential' default: description: An error response received from the Scanning Service schema: $ref: '#/definitions/ErrorResponseModel' x-ms-examples: Credential_Get: $ref: ./examples/Credential_Get.json summary: Microsoft Azure Get Credentials Credentialname put: tags: - Credential description: Creates an instance of a credential operationId: microsoftAzureCredentialCreateorupdate consumes: - application/json produces: - application/json parameters: - in: path name: credentialName required: true type: string - $ref: '#/parameters/api-version' - in: body name: body required: true schema: $ref: '#/definitions/Credential' responses: '200': description: Success schema: $ref: '#/definitions/Credential' '201': description: Success schema: $ref: '#/definitions/Credential' default: description: An error response received from the Scanning Service schema: $ref: '#/definitions/ErrorResponseModel' x-ms-examples: Credential_CreateOrUpdate: $ref: ./examples/Credential_CreateOrUpdate.json summary: Microsoft Azure Put Credentials Credentialname delete: tags: - Credential description: Deletes the credentials associated with the account operationId: microsoftAzureCredentialDelete produces: - application/json parameters: - in: path name: credentialName required: true type: string - $ref: '#/parameters/api-version' responses: '200': description: Success schema: $ref: '#/definitions/Credential' '204': description: Success default: description: An error response received from the Scanning Service schema: $ref: '#/definitions/ErrorResponseModel' x-ms-examples: Credential_Delete: $ref: ./examples/Credential_Delete.json summary: Microsoft Azure Delete Credentials Credentialname definitions: DataSourceCredentialPatch: required: - dataSourceCredentialType type: object properties: dataSourceCredentialType: description: Type of data source credential enum: - AzureSQLConnectionString - DataLakeGen2SharedKey - ServicePrincipal - ServicePrincipalInKV type: string x-ms-enum: name: DataSourceCredentialType modelAsString: true dataSourceCredentialName: description: Name of data source credential type: string dataSourceCredentialDescription: description: Description of data source credential type: string discriminator: dataSourceCredentialType example: dataSourceCredentialDescription: This is a data source credential ErrorCode: type: object properties: message: type: string code: type: string ProxyResource: type: object properties: id: type: string readOnly: true name: type: string readOnly: true ErrorResponseModel: type: object properties: error: allOf: - $ref: '#/definitions/ErrorModel' ErrorModel: type: object properties: code: type: string message: type: string target: type: string details: type: array items: $ref: '#/definitions/ErrorModel' Credential: required: - kind type: object allOf: - $ref: '#/definitions/ProxyResource' properties: kind: enum: - AccountKey - ServicePrincipal - BasicAuth - SqlAuth - AmazonARN - ConsumerKeyAuth - DelegatedAuth - ManagedIdentity type: string x-ms-enum: name: CredentialType modelAsString: true discriminator: kind DataSourceCredentialList: type: object properties: '@nextLink': type: string readOnly: true value: uniqueItems: true type: array items: $ref: '#/definitions/DataSourceCredential' readOnly: true DataSourceCredential: required: - dataSourceCredentialName - dataSourceCredentialType type: object properties: dataSourceCredentialType: description: Type of data source credential enum: - AzureSQLConnectionString - DataLakeGen2SharedKey - ServicePrincipal - ServicePrincipalInKV type: string x-ms-enum: name: DataSourceCredentialType modelAsString: true dataSourceCredentialId: format: uuid description: Unique id of data source credential type: string readOnly: true dataSourceCredentialName: description: Name of data source credential type: string dataSourceCredentialDescription: description: Description of data source credential type: string discriminator: dataSourceCredentialType example: parameters: clientId: 88888888-8888-8888-8888-888888888888 clientSecret: fake-client-secret tenantId: 12345678-1234-1234-1234-123456788888 dataSourceCredentialName: A data source credential dataSourceCredentialDescription: This is a data source credential dataSourceCredentialType: ServicePrincipal parameters: api-version: in: query name: api-version description: The api version to use. required: true type: string x-ms-client-name: ApiVersion x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'