1. Packages
  2. Ibm Provider
  3. API Docs
  4. EnSubscriptionSms
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.EnSubscriptionSms

Explore with Pulumi AI

ibm logo
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

    Create, update, or delete a SMS subscription by using IBM Cloud™ Event Notifications.

    Example Usage

    Create EnSubscriptionSms Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnSubscriptionSms(name: string, args: EnSubscriptionSmsArgs, opts?: CustomResourceOptions);
    @overload
    def EnSubscriptionSms(resource_name: str,
                          args: EnSubscriptionSmsArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnSubscriptionSms(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          destination_id: Optional[str] = None,
                          instance_guid: Optional[str] = None,
                          topic_id: Optional[str] = None,
                          attributes: Optional[EnSubscriptionSmsAttributesArgs] = None,
                          description: Optional[str] = None,
                          en_subscription_sms_id: Optional[str] = None,
                          name: Optional[str] = None)
    func NewEnSubscriptionSms(ctx *Context, name string, args EnSubscriptionSmsArgs, opts ...ResourceOption) (*EnSubscriptionSms, error)
    public EnSubscriptionSms(string name, EnSubscriptionSmsArgs args, CustomResourceOptions? opts = null)
    public EnSubscriptionSms(String name, EnSubscriptionSmsArgs args)
    public EnSubscriptionSms(String name, EnSubscriptionSmsArgs args, CustomResourceOptions options)
    
    type: ibm:EnSubscriptionSms
    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 EnSubscriptionSmsArgs
    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 EnSubscriptionSmsArgs
    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 EnSubscriptionSmsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnSubscriptionSmsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnSubscriptionSmsArgs
    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 enSubscriptionSmsResource = new Ibm.EnSubscriptionSms("enSubscriptionSmsResource", new()
    {
        DestinationId = "string",
        InstanceGuid = "string",
        TopicId = "string",
        Attributes = new Ibm.Inputs.EnSubscriptionSmsAttributesArgs
        {
            Adds = new[]
            {
                "string",
            },
            Inviteds = new[]
            {
                "string",
            },
            Removes = new[]
            {
                "string",
            },
        },
        Description = "string",
        EnSubscriptionSmsId = "string",
        Name = "string",
    });
    
    example, err := ibm.NewEnSubscriptionSms(ctx, "enSubscriptionSmsResource", &ibm.EnSubscriptionSmsArgs{
    DestinationId: pulumi.String("string"),
    InstanceGuid: pulumi.String("string"),
    TopicId: pulumi.String("string"),
    Attributes: &.EnSubscriptionSmsAttributesArgs{
    Adds: pulumi.StringArray{
    pulumi.String("string"),
    },
    Inviteds: pulumi.StringArray{
    pulumi.String("string"),
    },
    Removes: pulumi.StringArray{
    pulumi.String("string"),
    },
    },
    Description: pulumi.String("string"),
    EnSubscriptionSmsId: pulumi.String("string"),
    Name: pulumi.String("string"),
    })
    
    var enSubscriptionSmsResource = new EnSubscriptionSms("enSubscriptionSmsResource", EnSubscriptionSmsArgs.builder()
        .destinationId("string")
        .instanceGuid("string")
        .topicId("string")
        .attributes(EnSubscriptionSmsAttributesArgs.builder()
            .adds("string")
            .inviteds("string")
            .removes("string")
            .build())
        .description("string")
        .enSubscriptionSmsId("string")
        .name("string")
        .build());
    
    en_subscription_sms_resource = ibm.EnSubscriptionSms("enSubscriptionSmsResource",
        destination_id="string",
        instance_guid="string",
        topic_id="string",
        attributes={
            "adds": ["string"],
            "inviteds": ["string"],
            "removes": ["string"],
        },
        description="string",
        en_subscription_sms_id="string",
        name="string")
    
    const enSubscriptionSmsResource = new ibm.EnSubscriptionSms("enSubscriptionSmsResource", {
        destinationId: "string",
        instanceGuid: "string",
        topicId: "string",
        attributes: {
            adds: ["string"],
            inviteds: ["string"],
            removes: ["string"],
        },
        description: "string",
        enSubscriptionSmsId: "string",
        name: "string",
    });
    
    type: ibm:EnSubscriptionSms
    properties:
        attributes:
            adds:
                - string
            inviteds:
                - string
            removes:
                - string
        description: string
        destinationId: string
        enSubscriptionSmsId: string
        instanceGuid: string
        name: string
        topicId: string
    

    EnSubscriptionSms 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 EnSubscriptionSms resource accepts the following input properties:

    DestinationId string
    Destination ID.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Topic ID.
    Attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    EnSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    Name string
    Subscription name.
    DestinationId string
    Destination ID.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    TopicId string
    Topic ID.
    Attributes EnSubscriptionSmsAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    EnSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    Name string
    Subscription name.
    destinationId String
    Destination ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Topic ID.
    attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    enSubscriptionSmsId String
    (String) The unique identifier of the sms_subscription.
    name String
    Subscription name.
    destinationId string
    Destination ID.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId string
    Topic ID.
    attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    description string
    Subscription description.
    enSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    name string
    Subscription name.
    destination_id str
    Destination ID.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    topic_id str
    Topic ID.
    attributes EnSubscriptionSmsAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    description str
    Subscription description.
    en_subscription_sms_id str
    (String) The unique identifier of the sms_subscription.
    name str
    Subscription name.
    destinationId String
    Destination ID.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    topicId String
    Topic ID.
    attributes Property Map
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    enSubscriptionSmsId String
    (String) The unique identifier of the sms_subscription.
    name String
    Subscription name.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnSubscriptionSms resource produces the following output properties:

    DestinationName string
    The Destination name.
    DestinationType string
    The type of Destination.
    Id string
    The provider-assigned unique ID for this managed resource.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    DestinationName string
    The Destination name.
    DestinationType string
    The type of Destination.
    Id string
    The provider-assigned unique ID for this managed resource.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    destinationName String
    The Destination name.
    destinationType String
    The type of Destination.
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.
    destinationName string
    The Destination name.
    destinationType string
    The type of Destination.
    id string
    The provider-assigned unique ID for this managed resource.
    subscriptionId string
    (String) The unique identifier of the created subscription.
    topicName string
    Name of the topic.
    updatedAt string
    (String) Last updated time.
    destination_name str
    The Destination name.
    destination_type str
    The type of Destination.
    id str
    The provider-assigned unique ID for this managed resource.
    subscription_id str
    (String) The unique identifier of the created subscription.
    topic_name str
    Name of the topic.
    updated_at str
    (String) Last updated time.
    destinationName String
    The Destination name.
    destinationType String
    The type of Destination.
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.

    Look up Existing EnSubscriptionSms Resource

    Get an existing EnSubscriptionSms 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?: EnSubscriptionSmsState, opts?: CustomResourceOptions): EnSubscriptionSms
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            attributes: Optional[EnSubscriptionSmsAttributesArgs] = None,
            description: Optional[str] = None,
            destination_id: Optional[str] = None,
            destination_name: Optional[str] = None,
            destination_type: Optional[str] = None,
            en_subscription_sms_id: Optional[str] = None,
            instance_guid: Optional[str] = None,
            name: Optional[str] = None,
            subscription_id: Optional[str] = None,
            topic_id: Optional[str] = None,
            topic_name: Optional[str] = None,
            updated_at: Optional[str] = None) -> EnSubscriptionSms
    func GetEnSubscriptionSms(ctx *Context, name string, id IDInput, state *EnSubscriptionSmsState, opts ...ResourceOption) (*EnSubscriptionSms, error)
    public static EnSubscriptionSms Get(string name, Input<string> id, EnSubscriptionSmsState? state, CustomResourceOptions? opts = null)
    public static EnSubscriptionSms get(String name, Output<String> id, EnSubscriptionSmsState state, CustomResourceOptions options)
    resources:  _:    type: ibm:EnSubscriptionSms    get:      id: ${id}
    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:
    Attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    DestinationId string
    Destination ID.
    DestinationName string
    The Destination name.
    DestinationType string
    The type of Destination.
    EnSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Name string
    Subscription name.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicId string
    Topic ID.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    Attributes EnSubscriptionSmsAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    Description string
    Subscription description.
    DestinationId string
    Destination ID.
    DestinationName string
    The Destination name.
    DestinationType string
    The type of Destination.
    EnSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Name string
    Subscription name.
    SubscriptionId string
    (String) The unique identifier of the created subscription.
    TopicId string
    Topic ID.
    TopicName string
    Name of the topic.
    UpdatedAt string
    (String) Last updated time.
    attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    destinationId String
    Destination ID.
    destinationName String
    The Destination name.
    destinationType String
    The type of Destination.
    enSubscriptionSmsId String
    (String) The unique identifier of the sms_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    name String
    Subscription name.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicId String
    Topic ID.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.
    attributes EnSubscriptionSmsAttributes
    Subscription attributes. Nested scheme for attributes:
    description string
    Subscription description.
    destinationId string
    Destination ID.
    destinationName string
    The Destination name.
    destinationType string
    The type of Destination.
    enSubscriptionSmsId string
    (String) The unique identifier of the sms_subscription.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    name string
    Subscription name.
    subscriptionId string
    (String) The unique identifier of the created subscription.
    topicId string
    Topic ID.
    topicName string
    Name of the topic.
    updatedAt string
    (String) Last updated time.
    attributes EnSubscriptionSmsAttributesArgs
    Subscription attributes. Nested scheme for attributes:
    description str
    Subscription description.
    destination_id str
    Destination ID.
    destination_name str
    The Destination name.
    destination_type str
    The type of Destination.
    en_subscription_sms_id str
    (String) The unique identifier of the sms_subscription.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    name str
    Subscription name.
    subscription_id str
    (String) The unique identifier of the created subscription.
    topic_id str
    Topic ID.
    topic_name str
    Name of the topic.
    updated_at str
    (String) Last updated time.
    attributes Property Map
    Subscription attributes. Nested scheme for attributes:
    description String
    Subscription description.
    destinationId String
    Destination ID.
    destinationName String
    The Destination name.
    destinationType String
    The type of Destination.
    enSubscriptionSmsId String
    (String) The unique identifier of the sms_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    name String
    Subscription name.
    subscriptionId String
    (String) The unique identifier of the created subscription.
    topicId String
    Topic ID.
    topicName String
    Name of the topic.
    updatedAt String
    (String) Last updated time.

    Supporting Types

    EnSubscriptionSmsAttributes, EnSubscriptionSmsAttributesArgs

    Adds List<string>
    The phone number to add in case of updating the list of contact
    Inviteds List<string>
    The phone number to send the SMS to.
    Removes List<string>
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.
    Adds []string
    The phone number to add in case of updating the list of contact
    Inviteds []string
    The phone number to send the SMS to.
    Removes []string
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.
    adds List<String>
    The phone number to add in case of updating the list of contact
    inviteds List<String>
    The phone number to send the SMS to.
    removes List<String>
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.
    adds string[]
    The phone number to add in case of updating the list of contact
    inviteds string[]
    The phone number to send the SMS to.
    removes string[]
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.
    adds Sequence[str]
    The phone number to add in case of updating the list of contact
    inviteds Sequence[str]
    The phone number to send the SMS to.
    removes Sequence[str]
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.
    adds List<String>
    The phone number to add in case of updating the list of contact
    inviteds List<String>
    The phone number to send the SMS to.
    removes List<String>
    The phone number to remove in case of update to send the SMS to in case of sms_ibm. The email id in case of smtp_ibm destination type.

    Import

    You can import the ibm_en_subscription_sms resource by using id.

    The id property can be formed from instance_guid, and subscription_id in the following format:

    <instance_guid>/<subscription_id>

    • instance_guid: A string. Unique identifier for IBM Cloud Event Notifications instance.

    • subscription_id: A string. Unique identifier for Subscription.

    Example

    $ pulumi import ibm:index/enSubscriptionSms:EnSubscriptionSms sms_subscription <instance_guid>/<subscription_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud