View a markdown version of this page

CreateEnvironment - AWS Assurance

CreateEnvironment

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.

Request Parameters

description

A description of the environment.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 512.

Required: No

domainPrefix

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

The name of the environment.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9._-]+

Required: Yes

environmentScope

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.

Type: String

Valid Values: ORGANIZATION | SINGLE_ACCOUNT

Required: No

identityStore

The identity store configuration.

Type: IdentityStoreConfig object

Required: No

kmsKeyArn

The ARN of an optional AWS KMS key that encrypts evidence. The AWS Assurance service role must have kms:Decrypt and kms:GenerateDataKey permissions on 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

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.

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

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.

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

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.

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

tags

The tags attached to the resource, as key-value pairs.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Required: No

Response Elements

The following element is returned by the service.

environmentArn

The ARN of the newly created governance environment.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 512.

Pattern: arn:.+

Errors

For information about the errors that are common to all actions, see Common Error Types.

AccessDeniedException

You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.

HTTP Status Code: 403

ConflictException

A conflict occurred (for example, resource already exists).

HTTP Status Code: 409

InternalServerException

An internal server error occurred.

HTTP Status Code: 500

ThrottlingException

The request was throttled.

HTTP Status Code: 429

ValidationException

The request failed validation.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: