environment_account_connections
Creates, updates, deletes or gets an environment_account_connection resource or lists environment_account_connections in a region
Overview
| Name | environment_account_connections |
| Type | Resource |
| Description | Resource Schema describing various properties for AWS Proton Environment Account Connections resources. |
| Id | awscc.proton.environment_account_connections |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
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. AWS Proton uses this role to provision infrastructure resources using CodeBuild-based provisioning in the associated environment account. |
component_role_arn | string | The 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_id | string | The environment account that's connected to the environment account connection. |
environment_name | string | The name of the AWS Proton environment that's created in the associated management account. |
id | string | The ID of the environment account connection. |
management_account_id | string | The 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_arn | string | The 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. |
status | string | The status of the environment account connection. |
tags | array | <p>An optional list of metadata items that you can associate with the Proton environment account connection. A tag is a key-value pair.</p><br /><p>For more information, see <a href="https://docs.aws.amazon.com/proton/latest/userguide/resources.html">Proton resources and tagging</a> in the<br /><i>Proton User Guide</i>.</p> |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | The Amazon Resource Name (ARN) of the environment account connection. |
region | string | AWS region. |
For more information, see AWS::Proton::EnvironmentAccountConnection.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | environment_account_connections | INSERT | region |
delete_resource | environment_account_connections | DELETE | Identifier, region |
update_resource | environment_account_connections | UPDATE | Identifier, PatchDocument, region |
list_resources | environment_account_connections_list_only | SELECT | region |
get_resource | environment_account_connections | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all environment_account_connections in a region.
SELECT
region,
arn
FROM awscc.proton.environment_account_connections_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new environment_account_connection resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ 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 }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: environment_account_connection
props:
- name: codebuild_role_arn
value: '{{ codebuild_role_arn }}'
- name: component_role_arn
value: '{{ component_role_arn }}'
- name: environment_account_id
value: '{{ environment_account_id }}'
- name: environment_name
value: '{{ environment_name }}'
- name: management_account_id
value: '{{ management_account_id }}'
- name: role_arn
value: '{{ role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.proton.environment_account_connections
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the environment_account_connections resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
proton:CreateEnvironmentAccountConnection,
proton:TagResource,
iam:PassRole,
proton:ListTagsForResource,
proton:GetEnvironmentAccountConnection
proton:GetEnvironmentAccountConnection,
proton:ListTagsForResource,
iam:PassRole,
proton:GetEnvironmentAccountConnection
proton:CreateEnvironmentAccountConnection,
proton:ListTagsForResource,
proton:TagResource,
proton:UntagResource,
proton:UpdateEnvironmentAccountConnection,
iam:PassRole,
proton:GetEnvironmentAccountConnection
proton:DeleteEnvironmentAccountConnection,
proton:UntagResource,
iam:PassRole,
proton:ListTagsForResource,
proton:GetEnvironmentAccountConnection
proton:ListEnvironmentAccountConnections