Skip to main content

components

Creates, updates, deletes, gets or lists a components resource.

Overview

Namecomponents
TypeResource
Idaws.proton.components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the component. (pattern: <code>^[0-9A-Za-z]+[0-9A-Za-z_-]*$</code>)
arnstringThe Amazon Resource Name (ARN) of the component.
created_atstring (date-time)The time when the component was created.
deployment_statusstringThe component deployment status. (IN_PROGRESS, FAILED, SUCCEEDED, DELETE_IN_PROGRESS, DELETE_FAILED, DELETE_COMPLETE, CANCELLING, CANCELLED)
deployment_status_messagestringThe message associated with the component deployment status.
descriptionstringA description of the component.
environment_namestringThe 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_idstringThe 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_tokenstringThe last token the client requested.
last_deployment_attempted_atstring (date-time)The time when a deployment of the component was last attempted.
last_deployment_succeeded_atstring (date-time)The time when the component was last deployed successfully.
last_modified_atstring (date-time)The time when the component was last modified.
last_succeeded_deployment_idstringThe 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_namestringThe 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_namestringThe 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_specstringThe service spec that the component uses to access service inputs. Provided when a component is attached to a service instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_componentselectregionGet detailed data for a component. For more information about components, see Proton components in the Proton User Guide.
list_componentsselectregionList 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_componentinsertregion, manifest, name, templateFileCreate 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_componentupdateregion, deploymentType, nameUpdate 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_componentdeleteregionDelete an Proton component resource. For more information about components, see Proton components in the Proton User Guide.
cancel_component_deploymentexecregion, componentNameAttempts 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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 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

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 }}"
}'
;