

# Environment

Contains details about a governance environment, including its configuration, connected identity store, service role, evaluation scope, and lifecycle status.

## Contents
<a name="API_Environment_Contents"></a>

 ** environmentArn **   <a name="assurance-Type-Environment-environmentArn"></a>
The ARN of this governance environment.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 512.  
Pattern: `arn:.+`   
Required: Yes

 ** environmentId **   <a name="assurance-Type-Environment-environmentId"></a>
The unique identifier of the environment.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 36.  
Pattern: `[a-zA-Z0-9][a-zA-Z0-9\-]*`   
Required: Yes

 ** status **   <a name="assurance-Type-Environment-status"></a>
The current lifecycle state of the environment.  
Type: String  
Valid Values: `CREATED`   
Required: Yes

 ** createdAt **   <a name="assurance-Type-Environment-createdAt"></a>
The timestamp when the environment was created.  
Type: Timestamp  
Required: No

 ** description **   <a name="assurance-Type-Environment-description"></a>
A description of the environment.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 512.  
Required: No

 ** domainPrefix **   <a name="assurance-Type-Environment-domainPrefix"></a>
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.  
Type: String  
Length Constraints: Minimum length of 3. Maximum length of 64.  
Pattern: `[a-z][a-z0-9-]{1,62}[a-z0-9]`   
Required: No

 ** environmentName **   <a name="assurance-Type-Environment-environmentName"></a>
The name of the environment.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 128.  
Pattern: `[a-zA-Z0-9._-]+`   
Required: No

 ** environmentScope **   <a name="assurance-Type-Environment-environmentScope"></a>
The set of AWS accounts this environment evaluates (read-only).  
Type: String  
Valid Values: `ORGANIZATION | SINGLE_ACCOUNT`   
Required: No

 ** evidenceLocation **   <a name="assurance-Type-Environment-evidenceLocation"></a>
The evidence bucket location. Read-only. To configure evidence sources, use `CreateEnvironmentConnection`.  
Type: String  
Length Constraints: Minimum length of 0. Maximum length of 2048.  
Pattern: `$|^s3://[a-z0-9][a-z0-9.-]{1,61}[a-z0-9](/.*)?`   
Required: No

 ** identityStore **   <a name="assurance-Type-Environment-identityStore"></a>
The identity store configuration.  
Type: [IdentityStoreInfo](API_IdentityStoreInfo.md) object  
Required: No

 ** kmsKeyArn **   <a name="assurance-Type-Environment-kmsKeyArn"></a>
The ARN of a customer managed AWS KMS key used to encrypt evidence at rest. When set, the service encrypts new evidence uploads using this key.  
Type: String  
Length Constraints: Minimum length of 20. Maximum length of 2048.  
Pattern: `arn:aws[a-zA-Z-]*:kms:[a-z0-9-]+:[0-9]{12}:key/[a-zA-Z0-9-]+`   
Required: No

 ** operatorRole **   <a name="assurance-Type-Environment-operatorRole"></a>
The IAM role assumed to issue temporary credentials for operator application users (both IAM and IAM Identity Center flows). Trust policy must allow the AWS Assurance service principal to sts:AssumeRole.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `arn:aws[a-zA-Z-]*:iam::[0-9]{12}:role/.+`   
Required: No

 ** organizationalUnitIds **   <a name="assurance-Type-Environment-organizationalUnitIds"></a>
The organizational units this environment's evaluation is scoped to. Only present on organization environments. When absent, the entire organization is in scope. Accounts in nested OUs under a listed OU are included.  
Type: Array of strings  
Array Members: Minimum number of 1 item. Maximum number of 10 items.  
Length Constraints: Minimum length of 16. Maximum length of 68.  
Pattern: `ou-[0-9a-z]{4,32}-[0-9a-z]{8,32}`   
Required: No

 ** regions **   <a name="assurance-Type-Environment-regions"></a>
The AWS Regions in scope for evaluation. When empty or omitted, the environment evaluates all generally available Regions in the partition. Applies to all accounts.  
Type: Array of strings  
Array Members: Minimum number of 0 items. Maximum number of 50 items.  
Length Constraints: Minimum length of 1. Maximum length of 64.  
Required: No

 ** serviceRole **   <a name="assurance-Type-Environment-serviceRole"></a>
The IAM role AWS Assurance assumes to discover and evaluate the account's resources. Not set for ORGANIZATION environments, which always use the AWS Assurance service-linked role (AWSServiceRoleForAssurance) in each member account.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 256.  
Pattern: `arn:aws[a-zA-Z-]*:iam::[0-9]{12}:role/.+`   
Required: No

 ** tags **   <a name="assurance-Type-Environment-tags"></a>
The tags attached to the resource, as key-value pairs.  
Type: Array of [Tag](API_Tag.md) objects  
Array Members: Minimum number of 0 items. Maximum number of 50 items.  
Required: No

 ** updatedAt **   <a name="assurance-Type-Environment-updatedAt"></a>
The timestamp when the environment was last updated.  
Type: Timestamp  
Required: No

## See Also
<a name="API_Environment_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\+\+](https://docs.aws.amazon.com/goto/SdkForCpp/assurance-2022-07-26/Environment) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/assurance-2022-07-26/Environment) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/assurance-2022-07-26/Environment) 