diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_CreateRoleAssignment.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_CreateRoleAssignment.json new file mode 100644 index 000000000000..97212e8071ce --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_CreateRoleAssignment.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "api-version": "2020-02-01-preview", + "request": { + "roleId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "roleId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_DeleteRoleAssignmentById.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_DeleteRoleAssignmentById.json new file mode 100644 index 000000000000..ba09f1f27aa0 --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_DeleteRoleAssignmentById.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "roleAssignmentId": "00000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "api-version": "2020-02-01-preview" + }, + "responses": { + "200": {}, + "204": {}, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_GetRoleAssignmentById.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_GetRoleAssignmentById.json new file mode 100644 index 000000000000..4374be7f52ec --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_GetRoleAssignmentById.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "roleAssignmentId": "00000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "api-version": "2020-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "roleId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListCallerRoleAssignments.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListCallerRoleAssignments.json new file mode 100644 index 000000000000..2dca414a3784 --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListCallerRoleAssignments.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "api-version": "2020-02-01-preview" + }, + "responses": { + "200": { + "body": [ + "00000000-0000-0000-0000-000000000000", + "10000000-0000-0000-0000-000000000000" + ] + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListRoleAssignments.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListRoleAssignments.json new file mode 100644 index 000000000000..f1af57ba8b4b --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/RoleAssignments_ListRoleAssignments.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "api-version": "2020-02-01-preview", + "roleId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "headers": { + "x-ms-continuation": null + }, + "body": [ + { + "id": "00000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "roleId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + }, + { + "id": "10000000-0000-0000-0000-000000000000-00000000-0000-0000-0000-000000000000", + "roleId": "10000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + ] + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_GetRoleById.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_GetRoleById.json new file mode 100644 index 000000000000..5c6f07d2e9f0 --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_GetRoleById.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "roleId": "00000000-0000-0000-0000-000000000000", + "api-version": "2020-02-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "00000000-0000-0000-0000-000000000000", + "name": "Synapse role name", + "isBuiltIn": true + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_ListRoles.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_ListRoles.json new file mode 100644 index 000000000000..74838831ed04 --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/examples/Roles_ListRoles.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "workspaceName": "exampleWorkspace", + "SynapseDnsSuffix": "azuresynapse.net", + "api-version": "2020-02-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "00000000-0000-0000-0000-000000000000", + "name": "Synapse role name 1", + "isBuiltIn": true + }, + { + "id": "10000000-0000-0000-0000-000000000000", + "name": "Synapse role name 2", + "isBuiltIn": true + } + ] + } + }, + "default": { + "body": { + "error": { + "code": "Error code", + "message": "Error message" + } + } + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json new file mode 100644 index 000000000000..d39a8e501db0 --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json @@ -0,0 +1,352 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-11-01-preview", + "title": "SynapseClient" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{workspaceName}.{SynapseDnsSuffix}", + "parameters": [ + { + "name": "workspaceName", + "description": "The name of the workspace to execute operations on.", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/SynapseDnsSuffixInPath" + } + ] + }, + "schemes": [ + "https" + ], + "paths": { + "/rbac/roleAssignments": { + "post": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_CreateRoleAssignment", + "description": "Create role assignment.", + "x-ms-examples": { + "Create role assignment": { + "$ref": "./examples/RoleAssignments_CreateRoleAssignment.json" + } + }, + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "request", + "in": "body", + "required": true, + "description": "Details of role id and object id.", + "schema": { + "$ref": "#/definitions/RoleAssignmentRequest" + } + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success response.", + "schema": { + "$ref": "#/definitions/RoleAssignmentDetails" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + }, + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_ListRoleAssignments", + "description": "List role assignments.", + "x-ms-examples": { + "Get role assignment information": { + "$ref": "./examples/RoleAssignments_ListRoleAssignments.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/RoleIdParameterInQuery" + }, + { + "$ref": "#/parameters/PrincipalIdParameter" + }, + { + "$ref": "#/parameters/XMsContinuationToken" + } + ], + "responses": { + "200": { + "description": "Success response.", + "headers": { + "x-ms-continuation": { + "description": "If the number of role assignments to be listed exceeds the maxResults limit, a continuation token is returned in this response header. When a continuation token is returned in the response, it must be specified in a subsequent invocation of the list operation to continue listing the role assignments.", + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/RoleAssignmentDetailsList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + } + }, + "/rbac/roleAssignments/{roleAssignmentId}": { + "get": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_GetRoleAssignmentById", + "description": "Get role assignment by role assignment Id.", + "x-ms-examples": { + "Get role assignment information": { + "$ref": "./examples/RoleAssignments_GetRoleAssignmentById.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/RoleAssignmentIdParameter" + } + ], + "responses": { + "200": { + "description": "Success response.", + "schema": { + "$ref": "#/definitions/RoleAssignmentDetails" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + }, + "delete": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_DeleteRoleAssignmentById", + "description": "Delete role assignment by role assignment Id.", + "x-ms-examples": { + "Delete role assignment": { + "$ref": "./examples/RoleAssignments_DeleteRoleAssignmentById.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/RoleAssignmentIdParameter" + } + ], + "responses": { + "200": { + "description": "Success response." + }, + "204": { + "description": "No Content." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + } + }, + "/rbac/getMyAssignedRoles": { + "post": { + "tags": [ + "RoleAssignments" + ], + "operationId": "RoleAssignments_ListCallerRoleAssignments", + "description": "List role assignments of the caller.", + "x-ms-examples": { + "Get caller role assignments": { + "$ref": "./examples/RoleAssignments_ListCallerRoleAssignments.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success response.", + "schema": { + "type": "array", + "items": { + "description": "Role ID of the Synapse Built-In Role", + "format": "uuid", + "type": "string" + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorContract" + } + } + } + } + } + }, + "definitions": { + "ErrorContract": { + "title": "Error details.", + "description": "Contains details when the response code indicates an error.", + "type": "object", + "properties": { + "error": { + "description": "The error details.", + "$ref": "./workspaceAcl.json#/definitions/ErrorResponse" + } + } + }, + "RoleAssignmentDetailsList": { + "description": "A list of role assignments", + "type": "array", + "items": { + "$ref": "#/definitions/RoleAssignmentDetails" + } + }, + "RoleAssignmentRequest": { + "description": "Role Assignment request details", + "type": "object", + "properties": { + "roleId": { + "description": "Role ID of the Synapse Built-In Role", + "format": "uuid", + "type": "string" + }, + "principalId": { + "description": "Object ID of the AAD principal or security-group", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "roleId", + "principalId" + ] + }, + "RoleAssignmentDetails": { + "description": "Role Assignment response details", + "type": "object", + "properties": { + "id": { + "description": "Role Assignment ID", + "type": "string" + }, + "roleId": { + "description": "Role ID of the Synapse Built-In Role", + "format": "uuid", + "type": "string" + }, + "principalId": { + "description": "Object ID of the AAD principal or security-group", + "format": "uuid", + "type": "string" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The Synapse client API Version." + }, + "SynapseDnsSuffixInPath": { + "name": "SynapseDnsSuffix", + "in": "path", + "required": true, + "type": "string", + "default": "dev.azuresynapse.net", + "x-ms-skip-url-encoding": true, + "description": "Gets the DNS suffix used as the base for all Synapse service requests.", + "x-ms-parameter-location": "client" + }, + "RoleIdParameterInQuery": { + "name": "roleId", + "in": "query", + "required": false, + "type": "string", + "description": "Synapse Built-In Role Id.", + "x-ms-parameter-location": "method" + }, + "PrincipalIdParameter": { + "name": "principalId", + "in": "query", + "required": false, + "type": "string", + "description": "Object ID of the AAD principal or security-group.", + "x-ms-parameter-location": "method" + }, + "RoleAssignmentIdParameter": { + "name": "roleAssignmentId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the role assignment.", + "minLength": 1, + "x-ms-parameter-location": "method" + }, + "XMsContinuationToken": { + "name": "x-ms-continuation", + "in": "header", + "required": false, + "type": "string", + "description": "Continuation token.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roles.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roles.json new file mode 100644 index 000000000000..f566e171de1f --- /dev/null +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2019-11-01-preview/roles.json @@ -0,0 +1,173 @@ +{ + "swagger": "2.0", + "info": { + "version": "2019-11-01-preview", + "title": "SynapseClient" + }, + "x-ms-parameterized-host": { + "hostTemplate": "{workspaceName}.{SynapseDnsSuffix}", + "parameters": [ + { + "name": "workspaceName", + "description": "The name of the workspace to execute operations on.", + "required": true, + "type": "string", + "in": "path", + "x-ms-skip-url-encoding": true + }, + { + "$ref": "#/parameters/SynapseDnsSuffixInPath" + } + ] + }, + "schemes": [ + "https" + ], + "paths": { + "/rbac/roles": { + "get": { + "tags": [ + "SynapseRoles" + ], + "operationId": "Roles_ListRoles", + "description": "List roles.", + "x-ms-examples": { + "Get access control information": { + "$ref": "./examples/Roles_ListRoles.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success response.", + "schema": { + "$ref": "#/definitions/RolesListResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./roleAssignments.json#/definitions/ErrorContract" + } + } + } + } + }, + "/rbac/roles/{roleId}": { + "get": { + "tags": [ + "SynapseRoles" + ], + "operationId": "Roles_GetRoleById", + "description": "Get role by role Id.", + "x-ms-examples": { + "Get access control information": { + "$ref": "./examples/Roles_GetRoleById.json" + } + }, + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/RoleIdParameter" + } + ], + "responses": { + "200": { + "description": "Success response.", + "schema": { + "$ref": "#/definitions/SynapseRole" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./roleAssignments.json#/definitions/ErrorContract" + } + } + } + } + } + }, + "definitions": { + "RolesListResponse": { + "description": "A list of Synapse roles available.", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "array", + "description": "List of Synapse roles.", + "items": { + "$ref": "#/definitions/SynapseRole" + } + }, + "nextLink": { + "description": "The link to the next page of results, if any remaining results exist.", + "type": "string" + } + } + }, + "SynapseRole": { + "description": "Synapse role details", + "type": "object", + "properties": { + "id": { + "description": "Role ID", + "format": "uuid", + "type": "string" + }, + "name": { + "description": "Name of the Synapse role", + "type": "string" + }, + "isBuiltIn": { + "description": "Is a built-in role or not", + "type": "boolean" + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "The Synapse client API Version." + }, + "SynapseDnsSuffixInPath": { + "name": "SynapseDnsSuffix", + "in": "path", + "required": true, + "type": "string", + "default": "dev.azuresynapse.net", + "x-ms-skip-url-encoding": true, + "description": "Gets the DNS suffix used as the base for all Synapse service requests.", + "x-ms-parameter-location": "client" + }, + "RoleIdParameter": { + "name": "roleId", + "in": "path", + "required": true, + "type": "string", + "description": "Synapse Built-In Role Id.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/synapse/data-plane/readme.md b/specification/synapse/data-plane/readme.md index a60e478e2fea..63886203e58d 100644 --- a/specification/synapse/data-plane/readme.md +++ b/specification/synapse/data-plane/readme.md @@ -62,6 +62,8 @@ input-file: - Microsoft.Synapse/preview/2019-11-01-preview/monitoring.json - Microsoft.Synapse/preview/2019-11-01-preview/sparkFrontend.json - Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json +- Microsoft.Synapse/preview/2019-11-01-preview/roles.json +- Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json - Microsoft.Synapse/preview/2019-11-01-preview/adf/datafactory.json ``` @@ -105,6 +107,8 @@ input-file: - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/monitoring.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/sparkFrontend.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/workspaceAcl.json + - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/roles.json + - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/roleAssignments.json - $(this-folder)/Microsoft.Synapse/preview/2019-11-01-preview/adf/datafactory.json ```