service_actions
Creates, updates, deletes or gets a service_action resource or lists service_actions in a region
Overview
| Name | service_actions |
| Type | Resource |
| Description | Resource Schema for AWS::ServiceCatalog::ServiceAction |
| Id | awscc.servicecatalog.service_actions |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
accept_language | string | |
name | string | |
definition_type | string | |
definition | array | |
description | string | |
id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::ServiceCatalog::ServiceAction.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | service_actions | INSERT | Name, DefinitionType, Definition, region |
delete_resource | service_actions | DELETE | Identifier, region |
update_resource | service_actions | UPDATE | Identifier, PatchDocument, region |
list_resources | service_actions_list_only | SELECT | region |
get_resource | service_actions | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual service_action.
SELECT
region,
accept_language,
name,
definition_type,
definition,
description,
id
FROM awscc.servicecatalog.service_actions
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all service_actions in a region.
SELECT
region,
id
FROM awscc.servicecatalog.service_actions_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new service_action resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.servicecatalog.service_actions (
Name,
DefinitionType,
Definition,
region
)
SELECT
'{{ name }}',
'{{ definition_type }}',
'{{ definition }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.servicecatalog.service_actions (
AcceptLanguage,
Name,
DefinitionType,
Definition,
Description,
region
)
SELECT
'{{ accept_language }}',
'{{ name }}',
'{{ definition_type }}',
'{{ definition }}',
'{{ description }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_action
props:
- name: accept_language
value: '{{ accept_language }}'
- name: name
value: '{{ name }}'
- name: definition_type
value: '{{ definition_type }}'
- name: definition
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: description
value: '{{ description }}'
UPDATE example
Use the following StackQL query and manifest file to update a service_action resource, using stack-deploy.
/*+ update */
UPDATE awscc.servicecatalog.service_actions
SET PatchDocument = string('{{ {
"AcceptLanguage": accept_language,
"Name": name,
"DefinitionType": definition_type,
"Definition": definition,
"Description": description
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.servicecatalog.service_actions
WHERE
Identifier = '{{ id }}' 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:
| Parameter | Description |
|---|---|
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 service_actions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
servicecatalog:CreateServiceAction,
ssm:DescribeDocument,
iam:GetRole
servicecatalog:DescribeServiceAction
servicecatalog:UpdateServiceAction,
iam:GetRole,
ssm:DescribeDocument
servicecatalog:DeleteServiceAction
servicecatalog:ListServiceActions