Skip to content

Resource: awsServicecatalogServiceAction

Manages a Service Catalog self-service action.

Example Usage

Basic Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.servicecatalogServiceAction.ServicecatalogServiceAction(
  this,
  "example",
  {
    definition: {
      name: "AWS-RestartEC2Instance",
    },
    description: "Motor generator unit",
    name: "MGU",
  }
);

Argument Reference

The following arguments are required:

  • definition - (Required) Self-service action definition configuration block. Detailed below.
  • name - (Required) Self-service action name.

The following arguments are optional:

  • acceptLanguage - (Optional) Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.
  • description - (Optional) Self-service action description.

definition

The definition configuration block supports the following attributes:

  • assumeRole - (Optional) ARN of the role that performs the self-service actions on your behalf. For example, arn:aws:iam::12345678910:role/actionRole. To reuse the provisioned product launch role, set to LAUNCH_ROLE.
  • name - (Required) Name of the SSM document. For example, awsRestartEc2Instance. If you are using a shared SSM document, you must provide the ARN instead of the name.
  • parameters - (Optional) List of parameters in JSON format. For example: [{\"name\":\"instanceId\",\"type\":\"target\"}] or [{\"name\":\"instanceId\",\"type\":\"textValue\"}].
  • type - (Optional) Service action definition type. Valid value is SSM_AUTOMATION. Default is SSM_AUTOMATION.
  • version - (Required) SSM document version. For example, 1.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - Identifier of the service action.

Timeouts

Configuration options:

  • create - (Default 3M)
  • read - (Default 10M)
  • update - (Default 3M)
  • delete - (Default 3M)

Import

awsServicecatalogServiceAction can be imported using the service action ID, e.g.,

$ terraform import aws_servicecatalog_service_action.example act-f1w12eperfslh