components
Creates, updates, deletes, gets or lists a components resource.
Overview
| Name | components |
| Type | Resource |
| Id | aws.proton.components |
Fields
The following fields are returned by SELECT queries:
- get_component
- list_components
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the component. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
arn | string | The Amazon Resource Name (ARN) of the component. |
created_at | string (date-time) | The time when the component was created. |
deployment_status | string | The component deployment status. (IN_PROGRESS, FAILED, SUCCEEDED, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, CANCELLING, CANCELLED) |
deployment_status_message | string | The message associated with the component deployment status. |
description | string | A description of the component. |
environment_name | string | The name of the Proton environment that this component is associated with. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
last_attempted_deployment_id | string | The ID of the last attempted deployment of this component. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
last_client_request_token | string | The last token the client requested. |
last_deployment_attempted_at | string (date-time) | The time when a deployment of the component was last attempted. |
last_deployment_succeeded_at | string (date-time) | The time when the component was last deployed successfully. |
last_modified_at | string (date-time) | The time when the component was last modified. |
last_succeeded_deployment_id | string | The ID of the last successful deployment of this component. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
service_instance_name | string | The name of the service instance that this component is attached to. Provided when a component is attached to a service instance. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
service_name | string | The name of the service that serviceInstanceName is associated with. Provided when a component is attached to a service instance. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
service_spec | string | The service spec that the component uses to access service inputs. Provided when a component is attached to a service instance. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the component. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
arn | string | The Amazon Resource Name (ARN) of the component. |
created_at | string (date-time) | The time when the component was created. |
deployment_status | string | The component deployment status. (IN_PROGRESS, FAILED, SUCCEEDED, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, CANCELLING, CANCELLED) |
deployment_status_message | string | The message associated with the component deployment status. |
environment_name | string | The name of the Proton environment that this component is associated with. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
last_attempted_deployment_id | string | The ID of the last attempted deployment of this component. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
last_deployment_attempted_at | string (date-time) | The time when a deployment of the component was last attempted. |
last_deployment_succeeded_at | string (date-time) | The time when the component was last deployed successfully. |
last_modified_at | string (date-time) | The time when the component was last modified. |
last_succeeded_deployment_id | string | The ID of the last successful deployment of this component. (pattern: <code>^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$</code>) |
service_instance_name | string | The name of the service instance that this component is attached to. Provided when a component is attached to a service instance. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
service_name | string | The name of the service that serviceInstanceName is associated with. Provided when a component is attached to a service instance. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_component | select | region | Get detailed data for a component. For more information about components, see Proton components in the Proton User Guide. | |
list_components | select | region | List components with summary data. You can filter the result list by environment, service, or a single service instance. For more information about components, see Proton components in the Proton User Guide. | |
create_component | insert | region, manifest, name, templateFile | Create an Proton component. A component is an infrastructure extension for a service instance. For more information about components, see Proton components in the Proton User Guide. | |
update_component | update | region, deploymentType, name | Update a component. There are a few modes for updating a component. The deploymentType field defines the mode. You can't update a component while its deployment status, or the deployment status of a service instance attached to it, is IN_PROGRESS. For more information about components, see Proton components in the Proton User Guide. | |
delete_component | delete | region | Delete an Proton component resource. For more information about components, see Proton components in the Proton User Guide. | |
cancel_component_deployment | exec | region, componentName | Attempts to cancel a component deployment (for a component that is in the IN_PROGRESS deployment status). For more information about components, see Proton components 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_component
- list_components
Get detailed data for a component. For more information about components, see Proton components in the Proton User Guide.
SELECT
name,
arn,
created_at,
deployment_status,
deployment_status_message,
description,
environment_name,
last_attempted_deployment_id,
last_client_request_token,
last_deployment_attempted_at,
last_deployment_succeeded_at,
last_modified_at,
last_succeeded_deployment_id,
service_instance_name,
service_name,
service_spec
FROM aws.proton.components
WHERE region = '{{ region }}' -- required
;
List components with summary data. You can filter the result list by environment, service, or a single service instance. For more information about components, see Proton components in the Proton User Guide.
SELECT
name,
arn,
created_at,
deployment_status,
deployment_status_message,
environment_name,
last_attempted_deployment_id,
last_deployment_attempted_at,
last_deployment_succeeded_at,
last_modified_at,
last_succeeded_deployment_id,
service_instance_name,
service_name
FROM aws.proton.components
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_component
- Manifest
Create an Proton component. A component is an infrastructure extension for a service instance. For more information about components, see Proton components in the Proton User Guide.
INSERT INTO aws.proton.components (
clientToken,
description,
environmentName,
manifest,
name,
serviceInstanceName,
serviceName,
serviceSpec,
tags,
templateFile,
region
)
SELECT
'{{ clientToken }}',
'{{ description }}',
'{{ environmentName }}',
'{{ manifest }}' /* required */,
'{{ name }}' /* required */,
'{{ serviceInstanceName }}',
'{{ serviceName }}',
'{{ serviceSpec }}',
'{{ tags }}',
'{{ templateFile }}' /* required */,
'{{ region }}'
RETURNING
component
;
# Description fields are for documentation purposes
- name: components
props:
- name: region
value: "{{ region }}"
description: Required parameter for the components resource.
- name: clientToken
value: "{{ clientToken }}"
description: |
The client token for the created component.
- name: description
value: "{{ description }}"
description: |
An optional customer-provided description of the component.
- name: environmentName
value: "{{ environmentName }}"
description: |
The name of the Proton environment that you want to associate this component with. You must specify this when you don't specify serviceInstanceName and serviceName.
- name: manifest
value: "{{ manifest }}"
description: |
A path to a manifest file that lists the Infrastructure as Code (IaC) file, template language, and rendering engine for infrastructure that a custom component provisions.
- name: name
value: "{{ name }}"
description: |
The customer-provided name of the component.
- name: serviceInstanceName
value: "{{ serviceInstanceName }}"
description: |
The name of the service instance that you want to attach this component to. If you don't specify this, the component isn't attached to any service instance. Specify both serviceInstanceName and serviceName or neither of them.
- name: serviceName
value: "{{ serviceName }}"
description: |
The name of the service that serviceInstanceName is associated with. If you don't specify this, the component isn't attached to any service instance. Specify both serviceInstanceName and serviceName or neither of them.
- name: serviceSpec
value: "{{ serviceSpec }}"
description: |
The service spec that you want the component to use to access service inputs. Set this only when you attach the component to a service instance.
- name: tags
description: |
An optional list of metadata items that you can associate with the Proton component. 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 }}"
- name: templateFile
value: "{{ templateFile }}"
description: |
A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions. Components support a single IaC file, even if you use Terraform as your template language.
UPDATE examples
- update_component
Update a component. There are a few modes for updating a component. The deploymentType field defines the mode. You can't update a component while its deployment status, or the deployment status of a service instance attached to it, is IN_PROGRESS. For more information about components, see Proton components in the Proton User Guide.
UPDATE aws.proton.components
SET
clientToken = '{{ clientToken }}',
deploymentType = '{{ deploymentType }}',
description = '{{ description }}',
name = '{{ name }}',
serviceInstanceName = '{{ serviceInstanceName }}',
serviceName = '{{ serviceName }}',
serviceSpec = '{{ serviceSpec }}',
templateFile = '{{ templateFile }}'
WHERE
region = '{{ region }}' --required
AND deploymentType = '{{ deploymentType }}' --required
AND name = '{{ name }}' --required
RETURNING
component;
DELETE examples
- delete_component
Delete an Proton component resource. For more information about components, see Proton components in the Proton User Guide.
DELETE FROM aws.proton.components
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- cancel_component_deployment
Attempts to cancel a component deployment (for a component that is in the IN_PROGRESS deployment status). For more information about components, see Proton components in the Proton User Guide.
EXEC aws.proton.components.cancel_component_deployment
@region='{{ region }}' --required
@@json=
'{
"componentName": "{{ componentName }}"
}'
;