WellArchitected / Client / create_workload_share
create_workload_share#
- WellArchitected.Client.create_workload_share(**kwargs)#
Create a workload share.
The owner of a workload can share it with other Amazon Web Services accounts and users in the same Amazon Web Services Region. Shared access to a workload is not removed until the workload invitation is deleted.
If you share a workload with an organization or OU, all accounts in the organization or OU are granted access to the workload.
For more information, see Sharing a workload in the Well-Architected Tool User Guide.
See also: AWS API Documentation
Request Syntax
response = client.create_workload_share( WorkloadId='string', SharedWith='string', PermissionType='READONLY'|'CONTRIBUTOR', ClientRequestToken='string' )
- Parameters:
WorkloadId (string) –
[REQUIRED]
The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.
SharedWith (string) –
[REQUIRED]
The Amazon Web Services account ID, IAM role, organization ID, or organizational unit (OU) ID with which the workload is shared.
PermissionType (string) –
[REQUIRED]
Permission granted on a workload share.
ClientRequestToken (string) –
[REQUIRED]
A unique case-sensitive string used to ensure that this request is idempotent (executes only once).
You should not reuse the same token for other requests. If you retry a request with the same client request token and the same parameters after the original request has completed successfully, the result of the original request is returned.
Warning
This token is listed as required, however, if you do not specify it, the Amazon Web Services SDKs automatically generate one for you. If you are not using the Amazon Web Services SDK or the CLI, you must provide this token or the request will fail.
This field is autopopulated if not provided.
- Return type:
dict
- Returns:
Response Syntax
{ 'WorkloadId': 'string', 'ShareId': 'string' }
Response Structure
(dict) –
Input for Create Workload Share
WorkloadId (string) –
The ID assigned to the workload. This ID is unique within an Amazon Web Services Region.
ShareId (string) –
The ID associated with the workload share.
Exceptions
WellArchitected.Client.exceptions.ValidationException
WellArchitected.Client.exceptions.ConflictException
WellArchitected.Client.exceptions.InternalServerException
WellArchitected.Client.exceptions.ResourceNotFoundException
WellArchitected.Client.exceptions.ServiceQuotaExceededException
WellArchitected.Client.exceptions.AccessDeniedException
WellArchitected.Client.exceptions.ThrottlingException