Try AWS Native preview for resources not in the classic version.
aws.servicecatalog.ServiceAction
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages a Service Catalog self-service action.
Example Usage
Basic Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.ServiceCatalog.ServiceAction("example", new()
{
Definition = new Aws.ServiceCatalog.Inputs.ServiceActionDefinitionArgs
{
Name = "AWS-RestartEC2Instance",
},
Description = "Motor generator unit",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicecatalog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := servicecatalog.NewServiceAction(ctx, "example", &servicecatalog.ServiceActionArgs{
Definition: &servicecatalog.ServiceActionDefinitionArgs{
Name: pulumi.String("AWS-RestartEC2Instance"),
},
Description: pulumi.String("Motor generator unit"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.servicecatalog.ServiceAction;
import com.pulumi.aws.servicecatalog.ServiceActionArgs;
import com.pulumi.aws.servicecatalog.inputs.ServiceActionDefinitionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ServiceAction("example", ServiceActionArgs.builder()
.definition(ServiceActionDefinitionArgs.builder()
.name("AWS-RestartEC2Instance")
.build())
.description("Motor generator unit")
.build());
}
}
import pulumi
import pulumi_aws as aws
example = aws.servicecatalog.ServiceAction("example",
definition=aws.servicecatalog.ServiceActionDefinitionArgs(
name="AWS-RestartEC2Instance",
),
description="Motor generator unit")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.servicecatalog.ServiceAction("example", {
definition: {
name: "AWS-RestartEC2Instance",
},
description: "Motor generator unit",
});
resources:
example:
type: aws:servicecatalog:ServiceAction
properties:
definition:
name: AWS-RestartEC2Instance
description: Motor generator unit
Create ServiceAction Resource
new ServiceAction(name: string, args: ServiceActionArgs, opts?: CustomResourceOptions);
@overload
def ServiceAction(resource_name: str,
opts: Optional[ResourceOptions] = None,
accept_language: Optional[str] = None,
definition: Optional[ServiceActionDefinitionArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None)
@overload
def ServiceAction(resource_name: str,
args: ServiceActionArgs,
opts: Optional[ResourceOptions] = None)
func NewServiceAction(ctx *Context, name string, args ServiceActionArgs, opts ...ResourceOption) (*ServiceAction, error)
public ServiceAction(string name, ServiceActionArgs args, CustomResourceOptions? opts = null)
public ServiceAction(String name, ServiceActionArgs args)
public ServiceAction(String name, ServiceActionArgs args, CustomResourceOptions options)
type: aws:servicecatalog:ServiceAction
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServiceActionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceActionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ServiceAction Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ServiceAction resource accepts the following input properties:
- Definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- Accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- Description string
Self-service action description.
- Name string
Self-service action name.
The following arguments are optional:
- Definition
Service
Action Definition Args Self-service action definition configuration block. Detailed below.
- Accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- Description string
Self-service action description.
- Name string
Self-service action name.
The following arguments are optional:
- definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- accept
Language String Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- description String
Self-service action description.
- name String
Self-service action name.
The following arguments are optional:
- definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- description string
Self-service action description.
- name string
Self-service action name.
The following arguments are optional:
- definition
Service
Action Definition Args Self-service action definition configuration block. Detailed below.
- accept_
language str Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- description str
Self-service action description.
- name str
Self-service action name.
The following arguments are optional:
- definition Property Map
Self-service action definition configuration block. Detailed below.
- accept
Language String Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- description String
Self-service action description.
- name String
Self-service action name.
The following arguments are optional:
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceAction resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ServiceAction Resource
Get an existing ServiceAction resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ServiceActionState, opts?: CustomResourceOptions): ServiceAction
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
accept_language: Optional[str] = None,
definition: Optional[ServiceActionDefinitionArgs] = None,
description: Optional[str] = None,
name: Optional[str] = None) -> ServiceAction
func GetServiceAction(ctx *Context, name string, id IDInput, state *ServiceActionState, opts ...ResourceOption) (*ServiceAction, error)
public static ServiceAction Get(string name, Input<string> id, ServiceActionState? state, CustomResourceOptions? opts = null)
public static ServiceAction get(String name, Output<String> id, ServiceActionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- Definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- Description string
Self-service action description.
- Name string
Self-service action name.
The following arguments are optional:
- Accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- Definition
Service
Action Definition Args Self-service action definition configuration block. Detailed below.
- Description string
Self-service action description.
- Name string
Self-service action name.
The following arguments are optional:
- accept
Language String Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- description String
Self-service action description.
- name String
Self-service action name.
The following arguments are optional:
- accept
Language string Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- definition
Service
Action Definition Self-service action definition configuration block. Detailed below.
- description string
Self-service action description.
- name string
Self-service action name.
The following arguments are optional:
- accept_
language str Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- definition
Service
Action Definition Args Self-service action definition configuration block. Detailed below.
- description str
Self-service action description.
- name str
Self-service action name.
The following arguments are optional:
- accept
Language String Language code. Valid values are
en
(English),jp
(Japanese), andzh
(Chinese). Default isen
.- definition Property Map
Self-service action definition configuration block. Detailed below.
- description String
Self-service action description.
- name String
Self-service action name.
The following arguments are optional:
Supporting Types
ServiceActionDefinition, ServiceActionDefinitionArgs
- Name string
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- Version string
SSM document version. For example,
1
.- Assume
Role string 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 toLAUNCH_ROLE
.- Parameters string
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- Type string
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
- Name string
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- Version string
SSM document version. For example,
1
.- Assume
Role string 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 toLAUNCH_ROLE
.- Parameters string
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- Type string
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
- name String
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- version String
SSM document version. For example,
1
.- assume
Role String 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 toLAUNCH_ROLE
.- parameters String
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- type String
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
- name string
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- version string
SSM document version. For example,
1
.- assume
Role string 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 toLAUNCH_ROLE
.- parameters string
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- type string
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
- name str
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- version str
SSM document version. For example,
1
.- assume_
role str 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 toLAUNCH_ROLE
.- parameters str
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- type str
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
- name String
Name of the SSM document. For example,
AWS-RestartEC2Instance
. If you are using a shared SSM document, you must provide the ARN instead of the name.- version String
SSM document version. For example,
1
.- assume
Role String 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 toLAUNCH_ROLE
.- parameters String
List of parameters in JSON format. For example:
[{\"Name\":\"InstanceId\",\"Type\":\"TARGET\"}]
or[{\"Name\":\"InstanceId\",\"Type\":\"TEXT_VALUE\"}]
.- type String
Service action definition type. Valid value is
SSM_AUTOMATION
. Default isSSM_AUTOMATION
.
Import
Using pulumi import
, import aws_servicecatalog_service_action
using the service action ID. For example:
$ pulumi import aws:servicecatalog/serviceAction:ServiceAction example act-f1w12eperfslh
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.