environment_account_connections
Creates, updates, deletes, gets or lists an environment_account_connections resource.
Overview
| Name | environment_account_connections |
| Type | Resource |
| Id | aws.proton.environment_account_connections |
Fields
The following fields are returned by SELECT queries:
- get_environment_account_connection
- list_environment_account_connections
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the environment account connection. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
arn | string | The Amazon Resource Name (ARN) of the environment account connection. |
codebuild_role_arn | string | The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):iam::\d{12}:role/([\w+=,.@-]{1,512}[/:])*([\w+=,.@-]{1,64})$</code>) |
component_role_arn | string | The Amazon Resource Name (ARN) of the IAM service role that 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. The environment account connection must have a componentRoleArn to allow directly defined components to be associated with any environments running in the account. For more information about components, see Proton components in the Proton User Guide. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):iam::\d{12}:role/([\w+=,.@-]{1,512}[/:])*([\w+=,.@-]{1,64})$</code>) |
environment_account_id | string | The environment account that's connected to the environment account connection. (pattern: <code>^\d{12}$</code>) |
environment_name | string | The name of the environment that's associated with the environment account connection. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
last_modified_at | string (date-time) | The time when the environment account connection was last modified. |
management_account_id | string | The ID of the management account that's connected to the environment account connection. (pattern: <code>^\d{12}$</code>) |
requested_at | string (date-time) | The time when the environment account connection request was made. |
role_arn | string | The IAM service role that's associated with the environment account connection. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
status | string | The status of the environment account connection. (PENDING, CONNECTED, REJECTED) |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the environment account connection. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
arn | string | The Amazon Resource Name (ARN) of the environment account connection. |
component_role_arn | string | The Amazon Resource Name (ARN) of the IAM service role that 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. The environment account connection must have a componentRoleArn to allow directly defined components to be associated with any environments running in the account. For more information about components, see Proton components in the Proton User Guide. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
environment_account_id | string | The ID of the environment account that's connected to the environment account connection. (pattern: <code>^\d{12}$</code>) |
environment_name | string | The name of the environment that's associated with the environment account connection. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
last_modified_at | string (date-time) | The time when the environment account connection was last modified. |
management_account_id | string | The ID of the management account that's connected to the environment account connection. (pattern: <code>^\d{12}$</code>) |
requested_at | string (date-time) | The time when the environment account connection request was made. |
role_arn | string | The IAM service role that's associated with the environment account connection. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov):[a-zA-Z0-9-]+:[a-zA-Z0-9-]:\d{12}:([\w+=,.@-]+[/:])[\w+=,.@-]+$</code>) |
status | string | The status of the environment account connection. (PENDING, CONNECTED, REJECTED) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_environment_account_connection | select | region | In an environment account, get the detailed data for an environment account connection. For more information, see Environment account connections in the Proton User guide. | |
list_environment_account_connections | select | region | View a list of environment account connections. For more information, see Environment account connections in the Proton User guide. | |
create_environment_account_connection | insert | region, environmentName, managementAccountId | Create an environment account connection in an environment account so that environment infrastructure resources can be provisioned in the environment account from a management account. An environment account connection is a secure bi-directional connection between a management account and an environment account that maintains authorization and permissions. For more information, see Environment account connections in the Proton User guide. | |
update_environment_account_connection | update | region, id | In an environment account, update an environment account connection to use a new IAM role. For more information, see Environment account connections in the Proton User guide. | |
delete_environment_account_connection | delete | region | In an environment account, delete an environment account connection. After you delete an environment account connection that’s in use by an Proton environment, Proton can’t manage the environment infrastructure resources until a new environment account connection is accepted for the environment account and associated environment. You're responsible for cleaning up provisioned resources that remain without an environment connection. For more information, see Environment account connections in the Proton User guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_environment_account_connection
- list_environment_account_connections
In an environment account, get the detailed data for an environment account connection. For more information, see Environment account connections in the Proton User guide.
SELECT
id,
arn,
codebuild_role_arn,
component_role_arn,
environment_account_id,
environment_name,
last_modified_at,
management_account_id,
requested_at,
role_arn,
status
FROM aws.proton.environment_account_connections
WHERE region = '{{ region }}' -- required
;
View a list of environment account connections. For more information, see Environment account connections in the Proton User guide.
SELECT
id,
arn,
component_role_arn,
environment_account_id,
environment_name,
last_modified_at,
management_account_id,
requested_at,
role_arn,
status
FROM aws.proton.environment_account_connections
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_environment_account_connection
- Manifest
Create an environment account connection in an environment account so that environment infrastructure resources can be provisioned in the environment account from a management account. An environment account connection is a secure bi-directional connection between a management account and an environment account that maintains authorization and permissions. For more information, see Environment account connections in the Proton User guide.
INSERT INTO aws.proton.environment_account_connections (
clientToken,
codebuildRoleArn,
componentRoleArn,
environmentName,
managementAccountId,
roleArn,
tags,
region
)
SELECT
'{{ clientToken }}',
'{{ codebuildRoleArn }}',
'{{ componentRoleArn }}',
'{{ environmentName }}' /* required */,
'{{ managementAccountId }}' /* required */,
'{{ roleArn }}',
'{{ tags }}',
'{{ region }}'
RETURNING
environment_account_connection
;
# Description fields are for documentation purposes
- name: environment_account_connections
props:
- name: region
value: "{{ region }}"
description: Required parameter for the environment_account_connections resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
When included, if two identical requests are made with the same client token, Proton returns the environment account connection that the first request created.
- name: codebuildRoleArn
value: "{{ codebuildRoleArn }}"
description: |
The Amazon Resource Name (ARN) of an IAM service role in the environment account. Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account.
- name: componentRoleArn
value: "{{ componentRoleArn }}"
description: |
The Amazon Resource Name (ARN) of the IAM service role that 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. You must specify componentRoleArn to allow directly defined components to be associated with any environments running in this account. For more information about components, see Proton components in the Proton User Guide.
- name: environmentName
value: "{{ environmentName }}"
description: |
The name of the Proton environment that's created in the associated management account.
- name: managementAccountId
value: "{{ managementAccountId }}"
description: |
The ID of the management account that accepts or rejects the environment account connection. You create and manage the Proton environment in this account. If the management account accepts the environment account connection, Proton can use the associated IAM role to provision environment infrastructure resources in the associated environment account.
- name: roleArn
value: "{{ roleArn }}"
description: |
The Amazon Resource Name (ARN) of the IAM service role that's created in the environment account. Proton uses this role to provision infrastructure resources in the associated environment account.
- name: tags
description: |
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.
value:
- key: "{{ key }}"
value: "{{ value }}"
UPDATE examples
- update_environment_account_connection
In an environment account, update an environment account connection to use a new IAM role. For more information, see Environment account connections in the Proton User guide.
UPDATE aws.proton.environment_account_connections
SET
codebuildRoleArn = '{{ codebuildRoleArn }}',
componentRoleArn = '{{ componentRoleArn }}',
id = '{{ id }}',
roleArn = '{{ roleArn }}'
WHERE
region = '{{ region }}' --required
AND id = '{{ id }}' --required
RETURNING
environment_account_connection;
DELETE examples
- delete_environment_account_connection
In an environment account, delete an environment account connection. After you delete an environment account connection that’s in use by an Proton environment, Proton can’t manage the environment infrastructure resources until a new environment account connection is accepted for the environment account and associated environment. You're responsible for cleaning up provisioned resources that remain without an environment connection. For more information, see Environment account connections in the Proton User guide.
DELETE FROM aws.proton.environment_account_connections
WHERE region = '{{ region }}' --required
;