Skip to main content

environment_account_connections

Creates, updates, deletes or gets an environment_account_connection resource or lists environment_account_connections in a region

Overview

Nameenvironment_account_connections
TypeResource
DescriptionResource Schema describing various properties for AWS Proton Environment Account Connections resources.
Idawscc.proton.environment_account_connections

Fields

NameDatatypeDescription
arnstringThe Amazon Resource Name (ARN) of the environment account connection.
codebuild_role_arnstringThe Amazon Resource Name (ARN) of an IAM service role in the environment account. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
component_role_arnstringThe Amazon Resource Name (ARN) of the IAM service role that AWS Proton uses when provisioning directly defined components in the associated environment account. It determines the scope of infrastructure that a component can provision in the account.
environment_account_idstringThe environment account that's connected to the environment account connection.
environment_namestringThe name of the AWS Proton environment that's created in the associated management account.
idstringThe ID of the environment account connection.
management_account_idstringThe ID of the management account that accepts or rejects the environment account connection. You create an manage the AWS Proton environment in this account. If the management account accepts the environment account connection, AWS Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.
role_arnstringThe Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. AWS Proton uses this role to provision infrastructure resources in the associated environment account.
statusstringThe status of the environment account connection.
tagsarray

An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.

For more information, see Proton resources and tagging in the
Proton User Guide.

regionstringAWS region.

For more information, see AWS::Proton::EnvironmentAccountConnection.

Methods

NameResourceAccessible byRequired Params
create_resourceenvironment_account_connectionsINSERTregion
delete_resourceenvironment_account_connectionsDELETEIdentifier, region
update_resourceenvironment_account_connectionsUPDATEIdentifier, PatchDocument, region
list_resourcesenvironment_account_connections_list_onlySELECTregion
get_resourceenvironment_account_connectionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual environment_account_connection.

SELECT
region,
arn,
codebuild_role_arn,
component_role_arn,
environment_account_id,
environment_name,
id,
management_account_id,
role_arn,
status,
tags
FROM awscc.proton.environment_account_connections
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new environment_account_connection resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.proton.environment_account_connections (
CodebuildRoleArn,
ComponentRoleArn,
EnvironmentAccountId,
EnvironmentName,
ManagementAccountId,
RoleArn,
Tags,
region
)
SELECT
'{{ codebuild_role_arn }}',
'{{ component_role_arn }}',
'{{ environment_account_id }}',
'{{ environment_name }}',
'{{ management_account_id }}',
'{{ role_arn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a environment_account_connection resource, using stack-deploy.

/*+ update */
UPDATE awscc.proton.environment_account_connections
SET PatchDocument = string('{{ {
"CodebuildRoleArn": codebuild_role_arn,
"ComponentRoleArn": component_role_arn,
"EnvironmentAccountId": environment_account_id,
"EnvironmentName": environment_name,
"ManagementAccountId": management_account_id,
"RoleArn": role_arn,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.proton.environment_account_connections
WHERE
Identifier = '{{ arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the environment_account_connections resource, the following permissions are required:

proton:CreateEnvironmentAccountConnection,
proton:TagResource,
iam:PassRole,
proton:ListTagsForResource,
proton:GetEnvironmentAccountConnection