1. Packages
  2. AWS
  3. API Docs
  4. ssmcontacts
  5. getContact
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ssmcontacts.getContact

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for managing an AWS SSM Contact.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ssmcontacts.getContact({
        arn: "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ssmcontacts.get_contact(arn="arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ssmcontacts"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ssmcontacts.LookupContact(ctx, &ssmcontacts.LookupContactArgs{
    			Arn: "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.SsmContacts.GetContact.Invoke(new()
        {
            Arn = "arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ssmcontacts.SsmcontactsFunctions;
    import com.pulumi.aws.ssmcontacts.inputs.GetContactArgs;
    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) {
            final var example = SsmcontactsFunctions.getContact(GetContactArgs.builder()
                .arn("arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:ssmcontacts:getContact
          Arguments:
            arn: arn:aws:ssm-contacts:us-west-2:123456789012:contact/contactalias
    

    Using getContact

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getContact(args: GetContactArgs, opts?: InvokeOptions): Promise<GetContactResult>
    function getContactOutput(args: GetContactOutputArgs, opts?: InvokeOptions): Output<GetContactResult>
    def get_contact(arn: Optional[str] = None,
                    tags: Optional[Mapping[str, str]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetContactResult
    def get_contact_output(arn: Optional[pulumi.Input[str]] = None,
                    tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetContactResult]
    func LookupContact(ctx *Context, args *LookupContactArgs, opts ...InvokeOption) (*LookupContactResult, error)
    func LookupContactOutput(ctx *Context, args *LookupContactOutputArgs, opts ...InvokeOption) LookupContactResultOutput

    > Note: This function is named LookupContact in the Go SDK.

    public static class GetContact 
    {
        public static Task<GetContactResult> InvokeAsync(GetContactArgs args, InvokeOptions? opts = null)
        public static Output<GetContactResult> Invoke(GetContactInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContactResult> getContact(GetContactArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:ssmcontacts/getContact:getContact
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Arn string
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource.
    Arn string
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    Tags map[string]string
    Map of tags to assign to the resource.
    arn String
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    tags Map<String,String>
    Map of tags to assign to the resource.
    arn string
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    tags {[key: string]: string}
    Map of tags to assign to the resource.
    arn str
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    tags Mapping[str, str]
    Map of tags to assign to the resource.
    arn String
    The Amazon Resource Name (ARN) of the contact or escalation plan.
    tags Map<String>
    Map of tags to assign to the resource.

    getContact Result

    The following output properties are available:

    Alias string
    A unique and identifiable alias of the contact or escalation plan.
    Arn string
    DisplayName string
    Full friendly name of the contact or escalation plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    Tags Dictionary<string, string>
    Map of tags to assign to the resource.
    Type string
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
    Alias string
    A unique and identifiable alias of the contact or escalation plan.
    Arn string
    DisplayName string
    Full friendly name of the contact or escalation plan.
    Id string
    The provider-assigned unique ID for this managed resource.
    Tags map[string]string
    Map of tags to assign to the resource.
    Type string
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
    alias String
    A unique and identifiable alias of the contact or escalation plan.
    arn String
    displayName String
    Full friendly name of the contact or escalation plan.
    id String
    The provider-assigned unique ID for this managed resource.
    tags Map<String,String>
    Map of tags to assign to the resource.
    type String
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
    alias string
    A unique and identifiable alias of the contact or escalation plan.
    arn string
    displayName string
    Full friendly name of the contact or escalation plan.
    id string
    The provider-assigned unique ID for this managed resource.
    tags {[key: string]: string}
    Map of tags to assign to the resource.
    type string
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
    alias str
    A unique and identifiable alias of the contact or escalation plan.
    arn str
    display_name str
    Full friendly name of the contact or escalation plan.
    id str
    The provider-assigned unique ID for this managed resource.
    tags Mapping[str, str]
    Map of tags to assign to the resource.
    type str
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
    alias String
    A unique and identifiable alias of the contact or escalation plan.
    arn String
    displayName String
    Full friendly name of the contact or escalation plan.
    id String
    The provider-assigned unique ID for this managed resource.
    tags Map<String>
    Map of tags to assign to the resource.
    type String
    The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.

    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
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi