aws.ssmcontacts.Contact
Explore with Pulumi AI
Resource for managing an AWS SSM Contact.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ssmcontacts.Contact("example", {
alias: "alias",
type: "PERSONAL",
}, {
dependsOn: [exampleAwsSsmincidentsReplicationSet],
});
import pulumi
import pulumi_aws as aws
example = aws.ssmcontacts.Contact("example",
alias="alias",
type="PERSONAL",
opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_replication_set]))
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.NewContact(ctx, "example", &ssmcontacts.ContactArgs{
Alias: pulumi.String("alias"),
Type: pulumi.String("PERSONAL"),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAwsSsmincidentsReplicationSet,
}))
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 = new Aws.SsmContacts.Contact("example", new()
{
Alias = "alias",
Type = "PERSONAL",
}, new CustomResourceOptions
{
DependsOn =
{
exampleAwsSsmincidentsReplicationSet,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssmcontacts.Contact;
import com.pulumi.aws.ssmcontacts.ContactArgs;
import com.pulumi.resources.CustomResourceOptions;
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 Contact("example", ContactArgs.builder()
.alias("alias")
.type("PERSONAL")
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAwsSsmincidentsReplicationSet)
.build());
}
}
resources:
example:
type: aws:ssmcontacts:Contact
properties:
alias: alias
type: PERSONAL
options:
dependson:
- ${exampleAwsSsmincidentsReplicationSet}
Usage With All Fields
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ssmcontacts.Contact("example", {
alias: "alias",
displayName: "displayName",
type: "ESCALATION",
tags: {
key: "value",
},
}, {
dependsOn: [exampleAwsSsmincidentsReplicationSet],
});
import pulumi
import pulumi_aws as aws
example = aws.ssmcontacts.Contact("example",
alias="alias",
display_name="displayName",
type="ESCALATION",
tags={
"key": "value",
},
opts = pulumi.ResourceOptions(depends_on=[example_aws_ssmincidents_replication_set]))
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.NewContact(ctx, "example", &ssmcontacts.ContactArgs{
Alias: pulumi.String("alias"),
DisplayName: pulumi.String("displayName"),
Type: pulumi.String("ESCALATION"),
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
},
}, pulumi.DependsOn([]pulumi.Resource{
exampleAwsSsmincidentsReplicationSet,
}))
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 = new Aws.SsmContacts.Contact("example", new()
{
Alias = "alias",
DisplayName = "displayName",
Type = "ESCALATION",
Tags =
{
{ "key", "value" },
},
}, new CustomResourceOptions
{
DependsOn =
{
exampleAwsSsmincidentsReplicationSet,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ssmcontacts.Contact;
import com.pulumi.aws.ssmcontacts.ContactArgs;
import com.pulumi.resources.CustomResourceOptions;
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 Contact("example", ContactArgs.builder()
.alias("alias")
.displayName("displayName")
.type("ESCALATION")
.tags(Map.of("key", "value"))
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAwsSsmincidentsReplicationSet)
.build());
}
}
resources:
example:
type: aws:ssmcontacts:Contact
properties:
alias: alias
displayName: displayName
type: ESCALATION
tags:
key: value
options:
dependson:
- ${exampleAwsSsmincidentsReplicationSet}
Create Contact Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Contact(name: string, args: ContactArgs, opts?: CustomResourceOptions);
@overload
def Contact(resource_name: str,
args: ContactArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Contact(resource_name: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
type: Optional[str] = None,
display_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewContact(ctx *Context, name string, args ContactArgs, opts ...ResourceOption) (*Contact, error)
public Contact(string name, ContactArgs args, CustomResourceOptions? opts = null)
public Contact(String name, ContactArgs args)
public Contact(String name, ContactArgs args, CustomResourceOptions options)
type: aws:ssmcontacts:Contact
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ContactArgs
- 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 ContactArgs
- 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 ContactArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ContactArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ContactArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var contactResource = new Aws.SsmContacts.Contact("contactResource", new()
{
Alias = "string",
Type = "string",
DisplayName = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := ssmcontacts.NewContact(ctx, "contactResource", &ssmcontacts.ContactArgs{
Alias: pulumi.String("string"),
Type: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var contactResource = new Contact("contactResource", ContactArgs.builder()
.alias("string")
.type("string")
.displayName("string")
.tags(Map.of("string", "string"))
.build());
contact_resource = aws.ssmcontacts.Contact("contactResource",
alias="string",
type="string",
display_name="string",
tags={
"string": "string",
})
const contactResource = new aws.ssmcontacts.Contact("contactResource", {
alias: "string",
type: "string",
displayName: "string",
tags: {
string: "string",
},
});
type: aws:ssmcontacts:Contact
properties:
alias: string
displayName: string
tags:
string: string
type: string
Contact Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Contact resource accepts the following input properties:
- Alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - Type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- Display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Dictionary<string, string>
- Map of tags to assign to the resource.
- Alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - Type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- Display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - map[string]string
- Map of tags to assign to the resource.
- alias String
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - type String
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- display
Name String - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Map<String,String>
- Map of tags to assign to the resource.
- alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - {[key: string]: string}
- Map of tags to assign to the resource.
- alias str
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - type str
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- display_
name str - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Mapping[str, str]
- Map of tags to assign to the resource.
- alias String
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - type String
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- display
Name String - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Map<String>
- Map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Contact resource produces the following output properties:
Look up Existing Contact Resource
Get an existing Contact 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?: ContactState, opts?: CustomResourceOptions): Contact
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alias: Optional[str] = None,
arn: Optional[str] = None,
display_name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> Contact
func GetContact(ctx *Context, name string, id IDInput, state *ContactState, opts ...ResourceOption) (*Contact, error)
public static Contact Get(string name, Input<string> id, ContactState? state, CustomResourceOptions? opts = null)
public static Contact get(String name, Output<String> id, ContactState 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.
- Alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - Arn string
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- Display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Dictionary<string, string>
- Map of tags to assign to the resource.
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- Alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - Arn string
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- Display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - map[string]string
- Map of tags to assign to the resource.
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- alias String
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - arn String
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- display
Name String - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Map<String,String>
- Map of tags to assign to the resource.
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type String
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- alias string
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - arn string
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- display
Name string - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - {[key: string]: string}
- Map of tags to assign to the resource.
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type string
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- alias str
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - arn str
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- display_
name str - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Mapping[str, str]
- Map of tags to assign to the resource.
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type str
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
- alias String
- A unique and identifiable alias for the contact or escalation plan. Must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), and hyphens (-
). - arn String
- The Amazon Resource Name (ARN) of the contact or escalation plan.
- display
Name String - Full friendly name of the contact or escalation plan. If set, must be between 1 and 255 characters, and may contain alphanumerics, underscores (
_
), hyphens (-
), periods (.
), and spaces. - Map<String>
- Map of tags to assign to the resource.
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - type String
The type of contact engaged. A single contact is type PERSONAL and an escalation plan is type ESCALATION.
The following arguments are optional:
Import
Using pulumi import
, import SSM Contact using the ARN
. For example:
$ pulumi import aws:ssmcontacts/contact:Contact example {ARNValue}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.