1. Packages
  2. AWS Classic
  3. API Docs
  4. servicecatalog
  5. ServiceAction

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

aws.servicecatalog.ServiceAction

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

    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 ServiceActionDefinition

    Self-service action definition configuration block. Detailed below.

    AcceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    Description string

    Self-service action description.

    Name string

    Self-service action name.

    The following arguments are optional:

    Definition ServiceActionDefinitionArgs

    Self-service action definition configuration block. Detailed below.

    AcceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    Description string

    Self-service action description.

    Name string

    Self-service action name.

    The following arguments are optional:

    definition ServiceActionDefinition

    Self-service action definition configuration block. Detailed below.

    acceptLanguage String

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    description String

    Self-service action description.

    name String

    Self-service action name.

    The following arguments are optional:

    definition ServiceActionDefinition

    Self-service action definition configuration block. Detailed below.

    acceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    description string

    Self-service action description.

    name string

    Self-service action name.

    The following arguments are optional:

    definition ServiceActionDefinitionArgs

    Self-service action definition configuration block. Detailed below.

    accept_language str

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    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.

    acceptLanguage String

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    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.
    The following state arguments are supported:
    AcceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    Definition ServiceActionDefinition

    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:

    AcceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    Definition ServiceActionDefinitionArgs

    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:

    acceptLanguage String

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    definition ServiceActionDefinition

    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:

    acceptLanguage string

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    definition ServiceActionDefinition

    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), and zh (Chinese). Default is en.

    definition ServiceActionDefinitionArgs

    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:

    acceptLanguage String

    Language code. Valid values are en (English), jp (Japanese), and zh (Chinese). Default is en.

    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.

    AssumeRole 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 to LAUNCH_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 is SSM_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.

    AssumeRole 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 to LAUNCH_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 is SSM_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.

    assumeRole 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 to LAUNCH_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 is SSM_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.

    assumeRole 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 to LAUNCH_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 is SSM_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 to LAUNCH_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 is SSM_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.

    assumeRole 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 to LAUNCH_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 is SSM_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.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi