create_service_action
¶
create_service_action(
name: ServiceActionName,
definition_type: ServiceActionDefinitionType,
definition: ServiceActionDefinitionMap,
idempotency_token: IdempotencyToken,
*,
config_overrides: Optional[ServiceCatalogClientConfig] = None,
description: Optional[ServiceActionDescription] = None,
accept_language: Optional[AcceptLanguage] = None,
) -> CreateServiceActionOutput
Creates a self-service action.
Parameters:
-
name(ServiceActionName) –The self-service action name.
-
definition_type(ServiceActionDefinitionType) –The service action definition type. For example,
SSM_AUTOMATION. -
definition(ServiceActionDefinitionMap) –The self-service action definition. Can be one of the following:
- Name
-
The name of the Amazon Web Services Systems Manager document (SSM document). For example,
AWS-RestartEC2Instance.If you are using a shared SSM document, you must provide the ARN instead of the name.
- Version
-
The Amazon Web Services Systems Manager automation document version. For example,
"Version": "1" - AssumeRole
-
The Amazon Resource Name (ARN) of the role that performs the self-service actions on your behalf. For example,
"AssumeRole": "arn:aws:iam::12345678910:role/ActionRole".To reuse the provisioned product launch role, set to
"AssumeRole": "LAUNCH_ROLE". - Parameters
-
The list of parameters in JSON format.
For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}].
-
description(Optional[ServiceActionDescription], default:None) –The self-service action description.
-
accept_language(Optional[AcceptLanguage], default:None) –The language code.
-
jp- Japanese -
zh- Chinese
-
-
idempotency_token(IdempotencyToken) –A unique identifier that you provide to ensure idempotency. If multiple requests differ only by the idempotency token, the same response is returned for each repeated request.
Raises:
-
InvalidParametersException–One or more parameters provided to the operation are not valid.
-
LimitExceededException–The current limits of the service would have been exceeded by this operation. Decrease your resource use or increase your service limits and retry the operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_service_catalog/_services/service_catalog.py
1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 | |