Assurance / Client / create_environment
create_environment¶
- Assurance.Client.create_environment(**kwargs)¶
Creates a new governance environment with the specified name and service role. If you provide
identityStore, AWS Assurance creates an IAM Identity Center managed application for the environment.See also: AWS API Documentation
Request Syntax
response = client.create_environment( environmentName='string', description='string', domainPrefix='string', operatorRole='string', identityStore={ 'instanceArn': 'string', 'identityCenterRole': 'string' }, kmsKeyArn='string', regions=[ 'string', ], environmentScope='ORGANIZATION'|'SINGLE_ACCOUNT', organizationalUnitIds=[ 'string', ], tags=[ { 'key': 'string', 'value': 'string' }, ] )
- Parameters:
environmentName (string) –
[REQUIRED]
The name of the environment.
description (string) – A description of the environment.
domainPrefix (string) – The optional custom domain prefix for the environment portal URL. The prefix must be unique within the AWS Region. If you don’t specify a prefix, AWS Assurance uses the environment ID. You can’t change the prefix after you create the environment.
operatorRole (string) – The AWS Identity and Access Management (IAM) role that AWS Assurance assumes to issue temporary credentials to operators who use your application. You must specify this role to support operator sessions. The role’s trust policy must allow the AWS Assurance service principal to call
sts:AssumeRole.identityStore (dict) –
The identity store configuration.
instanceArn (string) – [REQUIRED]
The ARN of your IAM Identity Center instance.
identityCenterRole (string) – [REQUIRED]
The IAM role assumed through Trusted Identity Propagation to issue temporary credentials for IAM Identity Center users. Trust policy must allow the AWS Assurance service principal to sts:AssumeRole and sts:SetContext.
kmsKeyArn (string) – The ARN of an optional AWS KMS key that encrypts evidence. The AWS Assurance service role must have
kms:Decryptandkms:GenerateDataKeypermissions on this key.regions (list) –
The AWS Regions to evaluate across. When empty or omitted, the environment evaluates all generally available Regions in the partition. Applies to all accounts in scope.
(string) –
An AWS Region code, such as
aa-example-3.
environmentScope (string) –
The set of AWS accounts that the new environment evaluates. If you omit the scope, AWS Assurance uses
SINGLE_ACCOUNT. Valid values:ORGANIZATION– Evaluates the member accounts in your organization in AWS Organizations. Call this operation from the management account or a delegated administrator account, with trusted access for AWS Assurance turned on.SINGLE_ACCOUNT– Evaluates only the account where you create the environment.
organizationalUnitIds (list) –
The organizational units to scope the organization environment’s evaluation to. Only valid when the environment scope is ORGANIZATION. When omitted, the entire organization is in scope. Must contain at least one OU when provided. Accounts in nested OUs under a listed OU are included.
(string) –
The ID of an organizational unit (OU) in AWS Organizations.
tags (list) –
The tags attached to the resource, as key-value pairs.
(dict) –
A key-value tag.
key (string) – [REQUIRED]
The tag key.
value (string) – [REQUIRED]
The tag value.
- Return type:
dict
- Returns:
Response Syntax
{ 'environmentArn': 'string' }
Response Structure
(dict) –
environmentArn (string) –
The ARN of the newly created governance environment.
Exceptions
Assurance.Client.exceptions.ConflictExceptionAssurance.Client.exceptions.ValidationExceptionAssurance.Client.exceptions.InternalServerExceptionAssurance.Client.exceptions.ThrottlingExceptionAssurance.Client.exceptions.AccessDeniedException