Package com.pulumi.aws.notifications
Class ChannelAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.notifications.ChannelAssociation
-
public class ChannelAssociation extends com.pulumi.resources.CustomResourceResource for managing an AWS User Notifications Channel Association. This resource associates a channel (such as an email contact) with a notification configuration. ## Example Usage ### Basic Usage
## Import Using `pulumi import`, import User Notifications Channel Association using the `notification_configuration_arn,channel_arn` format. For example: ```sh $ pulumi import aws:notifications/channelAssociation:ChannelAssociation example arn:aws:notifications:us-west-2:123456789012:configuration:example-notification-config,arn:aws:notificationscontacts:us-west-2:123456789012:emailcontact:example-contact ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.notifications.NotificationConfiguration; import com.pulumi.aws.notifications.NotificationConfigurationArgs; import com.pulumi.aws.notifications.ContactsEmailContact; import com.pulumi.aws.notifications.ContactsEmailContactArgs; import com.pulumi.aws.notifications.ChannelAssociation; import com.pulumi.aws.notifications.ChannelAssociationArgs; import java.util.ArrayList; import java.util.Arrays; 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 NotificationConfiguration("example", NotificationConfigurationArgs.builder() .name("example-notification-config") .description("Example notification configuration") .build()); var exampleContactsEmailContact = new ContactsEmailContact("exampleContactsEmailContact", ContactsEmailContactArgs.builder() .name("example-contact") .emailAddress("example@example.com") .build()); var exampleChannelAssociation = new ChannelAssociation("exampleChannelAssociation", ChannelAssociationArgs.builder() .arn(exampleContactsEmailContact.arn()) .notificationConfigurationArn(example.arn()) .build());}}
-
-
Constructor Summary
Constructors Constructor Description ChannelAssociation(java.lang.String name)ChannelAssociation(java.lang.String name, ChannelAssociationArgs args)ChannelAssociation(java.lang.String name, ChannelAssociationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()static ChannelAssociationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ChannelAssociationState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>notificationConfigurationArn()
-
-
-
Constructor Detail
-
ChannelAssociation
public ChannelAssociation(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ChannelAssociation
public ChannelAssociation(java.lang.String name, ChannelAssociationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ChannelAssociation
public ChannelAssociation(java.lang.String name, ChannelAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the channel to associate with the notification configuration. Must match pattern `^arn:aws:(chatbot|consoleapp|notifications-contacts):[a-zA-Z0-9-]*:[0-9]{12}:[a-zA-Z0-9-_.@]+/[a-zA-Z0-9/_.@:-]+$`.
-
notificationConfigurationArn
public com.pulumi.core.Output<java.lang.String> notificationConfigurationArn()
- Returns:
- ARN of the notification configuration to associate the channel with.
-
get
public static ChannelAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ChannelAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-