diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json index 65048a244a9f..2042daec260a 100644 --- a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/billing.json @@ -3460,6 +3460,150 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/createBillingRoleAssignment": { + "post": { + "tags": [ + "BillingRoleAssignments" + ], + "operationId": "BillingRoleAssignments_AddByBillingAccount", + "description": "Adds a role assignment on a billing account. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.", + "x-ms-examples": { + "AddRoleAssignmentToBillingAccount": { + "$ref": "./examples/AddRoleAssignmentToBillingAccount.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingRoleAssignmentRequestProperties" + }, + "description": "Request parameters that are provided to the create billing role assignment operation." + } + ], + "responses": { + "201": { + "description": "Role assignment is successfully created", + "schema": { + "$ref": "#/definitions/BillingRoleAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/createBillingRoleAssignment": { + "post": { + "tags": [ + "BillingRoleAssignments" + ], + "operationId": "BillingRoleAssignments_AddByInvoiceSection", + "description": "Adds a role assignment on an invoice section. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.", + "x-ms-examples": { + "AddRoleAssignmentToInvoiceSection": { + "$ref": "./examples/AddRoleAssignmentToInvoiceSection.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "$ref": "#/parameters/invoiceSectionNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingRoleAssignmentRequestProperties" + }, + "description": "Request parameters that are provided to the create billing role assignment operation." + } + ], + "responses": { + "201": { + "description": "Role assignment is successfully created", + "schema": { + "$ref": "#/definitions/BillingRoleAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/createBillingRoleAssignment": { + "post": { + "tags": [ + "BillingRoleAssignments" + ], + "operationId": "BillingRoleAssignments_AddByBillingProfile", + "description": "Adds a role assignment on a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.", + "x-ms-examples": { + "AddRoleAssignmentToBillingProfile": { + "$ref": "./examples/AddRoleAssignmentToBillingProfile.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountNameParameter" + }, + { + "$ref": "#/parameters/billingProfileNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/BillingRoleAssignmentRequestProperties" + }, + "description": "Request parameters that are provided to the create billing role assignment operation." + } + ], + "responses": { + "201": { + "description": "Role assignment is successfully created", + "schema": { + "$ref": "#/definitions/BillingRoleAssignment" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/agreements": { "get": { "tags": [ @@ -6026,6 +6170,19 @@ } } }, + "BillingRoleAssignmentRequestProperties": { + "description": "The request parameters to add the role assignment on a scope", + "properties": { + "principalId": { + "description": "The user's principal id that the role gets assigned to", + "type": "string" + }, + "roleDefinitionId": { + "description": "The role definition id", + "type": "string" + } + } + }, "BillingRoleDefinitionListResult": { "description": "The list of role definitions.", "properties": { diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingAccount.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingAccount.json new file mode 100644 index 000000000000..8141ec0ad1fc --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingAccount.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "parameters": { + "principalId": "00000000-0000-0000-0000-000000000000", + "roleDefinitionId": "{roleDefinitionId}" + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleAssignments/10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9", + "name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9", + "properties": { + "createdOn": "2018-06-21T21:34:12.2363515+00:00", + "createdByPrincipalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f", + "createdByPrincipalId": "10000000-aaaa-bbbb-cccc-3fd5ff9d6aa1", + "principalId": "00000000-0000-0000-0000-000000000000", + "scope": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}", + "principalTenantId": "10000000-aaaa-bbbb-cccc-2d7cd011db47", + "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000002" + }, + "type": "Microsoft.Billing/billingAccounts/billingRoleAssignments" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingProfile.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingProfile.json new file mode 100644 index 000000000000..33fc83cd034d --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToBillingProfile.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "parameters": { + "principalId": "00000000-0000-0000-0000-000000000000", + "roleDefinitionId": "{roleDefinitionId}" + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/billingRoleAssignments/10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47", + "name": "10000000-aaaa-bbbb-cccc-100000000000_b1839933-b3ac-42ca-8112-d29c43f3ab47", + "properties": { + "createdOn": "2018-06-21T21:58:19.9073876+00:00", + "scope": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}", + "createdByPrincipalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f", + "createdByPrincipalId": "10000000-aaaa-bbbb-cccc-3fd5ff9d6aa1", + "principalId": "00000000-0000-0000-0000-000000000000", + "principalTenantId": "10000000-aaaa-bbbb-cccc-2d7cd011db47", + "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000002" + }, + "type": "Microsoft.Billing/billingAccounts/billingProfiles/billingRoleAssignments" + } + } + } +} diff --git a/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToInvoiceSection.json b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToInvoiceSection.json new file mode 100644 index 000000000000..662c68878d7e --- /dev/null +++ b/specification/billing/resource-manager/Microsoft.Billing/stable/2020-05-01/examples/AddRoleAssignmentToInvoiceSection.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2020-05-01", + "billingAccountName": "{billingAccountName}", + "billingProfileName": "{billingProfileName}", + "invoiceSectionName": "{invoiceSectionName}", + "parameters": { + "principalId": "00000000-0000-0000-0000-000000000000", + "roleDefinitionId": "{roleDefinitionId}" + } + }, + "responses": { + "201": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}/10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9", + "name": "10000000-aaaa-bbbb-cccc-100000000000_6fd330f6-7d26-4aff-b9cf-7bd699f965b9", + "properties": { + "createdOn": "2018-06-21T21:34:12.2363515+00:00", + "scope": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}", + "createdByPrincipalTenantId": "7ca289b9-c32d-4f01-8566-7ff93261d76f", + "createdByPrincipalId": "10000000-aaaa-bbbb-cccc-3fd5ff9d6aa1", + "principalId": "00000000-0000-0000-0000-000000000000", + "principalTenantId": "10000000-aaaa-bbbb-cccc-2d7cd011db47", + "roleDefinitionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingRoleDefinitions/50000000-aaaa-bbbb-cccc-100000000002" + }, + "type": "Microsoft.Billing/billingAccounts/billingProfiles/invoiceSections/billingRoleAssignments" + } + } + } +}