1. Registry
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getEnSubscriptionSms
Viewing docs for ibm 2.7.0
published on Wednesday, Oct 7, 2026 by ibm-cloud
ibm
Viewing docs for ibm 2.7.0
published on Wednesday, Oct 7, 2026 by ibm-cloud

    Provides a read-only data source for SMS subscription. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const smsSubscription = ibm.getEnSubscriptionSms({
        instanceGuid: enTerraformTestResource.guid,
        subscriptionId: subscriptionsmsnew.subscriptionId,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    sms_subscription = ibm.get_en_subscription_sms(instance_guid=en_terraform_test_resource["guid"],
        subscription_id=subscriptionsmsnew["subscriptionId"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupEnSubscriptionSms(ctx, &ibm.LookupEnSubscriptionSmsArgs{
    			InstanceGuid:   enTerraformTestResource.Guid,
    			SubscriptionId: subscriptionsmsnew.SubscriptionId,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var smsSubscription = Ibm.GetEnSubscriptionSms.Invoke(new()
        {
            InstanceGuid = enTerraformTestResource.Guid,
            SubscriptionId = subscriptionsmsnew.SubscriptionId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetEnSubscriptionSmsArgs;
    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 smsSubscription = IbmFunctions.getEnSubscriptionSms(GetEnSubscriptionSmsArgs.builder()
                .instanceGuid(enTerraformTestResource.guid())
                .subscriptionId(subscriptionsmsnew.subscriptionId())
                .build());
    
        }
    }
    
    variables:
      smsSubscription:
        fn::invoke:
          function: ibm:getEnSubscriptionSms
          arguments:
            instanceGuid: ${enTerraformTestResource.guid}
            subscriptionId: ${subscriptionsmsnew.subscriptionId}
    
    Example coming soon!
    

    Using getEnSubscriptionSms

    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 getEnSubscriptionSms(args: GetEnSubscriptionSmsArgs, opts?: InvokeOptions): Promise<GetEnSubscriptionSmsResult>
    function getEnSubscriptionSmsOutput(args: GetEnSubscriptionSmsOutputArgs, opts?: InvokeOutputOptions): Output<GetEnSubscriptionSmsResult>
    def get_en_subscription_sms(id: Optional[str] = None,
                                instance_guid: Optional[str] = None,
                                subscription_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetEnSubscriptionSmsResult
    def get_en_subscription_sms_output(id: pulumi.Input[Optional[str]] = None,
                                instance_guid: pulumi.Input[Optional[str]] = None,
                                subscription_id: pulumi.Input[Optional[str]] = None,
                                opts: Optional[InvokeOutputOptions] = None) -> Output[GetEnSubscriptionSmsResult]
    func LookupEnSubscriptionSms(ctx *Context, args *LookupEnSubscriptionSmsArgs, opts ...InvokeOption) (*LookupEnSubscriptionSmsResult, error)
    func LookupEnSubscriptionSmsOutput(ctx *Context, args *LookupEnSubscriptionSmsOutputArgs, opts ...InvokeOption) LookupEnSubscriptionSmsResultOutput

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

    public static class GetEnSubscriptionSms 
    {
        public static Task<GetEnSubscriptionSmsResult> InvokeAsync(GetEnSubscriptionSmsArgs args, InvokeOptions? opts = null)
        public static Output<GetEnSubscriptionSmsResult> Invoke(GetEnSubscriptionSmsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetEnSubscriptionSmsResult> Invoke(GetEnSubscriptionSmsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetEnSubscriptionSmsResult> getEnSubscriptionSms(GetEnSubscriptionSmsArgs args, InvokeOptions options)
    public static Output<GetEnSubscriptionSmsResult> getEnSubscriptionSms(GetEnSubscriptionSmsArgs args, InvokeOptions options)
    public static Output<GetEnSubscriptionSmsResult> getEnSubscriptionSms(GetEnSubscriptionSmsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: ibm:index/getEnSubscriptionSms:getEnSubscriptionSms
      arguments:
        # arguments dictionary
    data "ibm_get_en_subscription_sms" "name" {
        # arguments
    }

    The following arguments are supported:

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    SubscriptionId string
    Unique identifier for Subscription.
    Id string
    The unique identifier of the sms_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    SubscriptionId string
    Unique identifier for Subscription.
    Id string
    The unique identifier of the sms_subscription.
    instance_guid string
    Unique identifier for IBM Cloud Event Notifications instance.
    subscription_id string
    Unique identifier for Subscription.
    id string
    The unique identifier of the sms_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId String
    Unique identifier for Subscription.
    id String
    The unique identifier of the sms_subscription.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId string
    Unique identifier for Subscription.
    id string
    The unique identifier of the sms_subscription.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    subscription_id str
    Unique identifier for Subscription.
    id str
    The unique identifier of the sms_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId String
    Unique identifier for Subscription.
    id String
    The unique identifier of the sms_subscription.

    getEnSubscriptionSms Result

    The following output properties are available:

    Attributes List<GetEnSubscriptionSmsAttribute>
    (List) The additional attributes.
    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    Id string
    The unique identifier of the sms_subscription.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SubscriptionId string
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last updated time.
    Attributes []GetEnSubscriptionSmsAttribute
    (List) The additional attributes.
    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    Id string
    The unique identifier of the sms_subscription.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SubscriptionId string
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last updated time.
    attributes list(object)
    (List) The additional attributes.
    description string
    (String) Subscription description.
    destination_id string
    (String) The destination ID.
    id string
    The unique identifier of the sms_subscription.
    instance_guid string
    name string
    (String) Subscription name.
    subscription_id string
    topic_id string
    (String) Topic ID.
    updated_at string
    (String) Last updated time.
    attributes List<GetEnSubscriptionSmsAttribute>
    (List) The additional attributes.
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    id String
    The unique identifier of the sms_subscription.
    instanceGuid String
    name String
    (String) Subscription name.
    subscriptionId String
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last updated time.
    attributes GetEnSubscriptionSmsAttribute[]
    (List) The additional attributes.
    description string
    (String) Subscription description.
    destinationId string
    (String) The destination ID.
    id string
    The unique identifier of the sms_subscription.
    instanceGuid string
    name string
    (String) Subscription name.
    subscriptionId string
    topicId string
    (String) Topic ID.
    updatedAt string
    (String) Last updated time.
    attributes Sequence[GetEnSubscriptionSmsAttribute]
    (List) The additional attributes.
    description str
    (String) Subscription description.
    destination_id str
    (String) The destination ID.
    id str
    The unique identifier of the sms_subscription.
    instance_guid str
    name str
    (String) Subscription name.
    subscription_id str
    topic_id str
    (String) Topic ID.
    updated_at str
    (String) Last updated time.
    attributes List<Property Map>
    (List) The additional attributes.
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    id String
    The unique identifier of the sms_subscription.
    instanceGuid String
    name String
    (String) Subscription name.
    subscriptionId String
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last updated time.

    Supporting Types

    GetEnSubscriptionSmsAttribute

    Inviteds List<GetEnSubscriptionSmsAttributeInvited>
    (List) The phone numbers for invitation.
    Subscribeds List<GetEnSubscriptionSmsAttributeSubscribed>
    (List) The phone numbers that are subscribed to the topic.
    Unsubscribeds List<GetEnSubscriptionSmsAttributeUnsubscribed>
    (List) The phone numbers that have opted out of subscription from the topic.
    Inviteds []GetEnSubscriptionSmsAttributeInvited
    (List) The phone numbers for invitation.
    Subscribeds []GetEnSubscriptionSmsAttributeSubscribed
    (List) The phone numbers that are subscribed to the topic.
    Unsubscribeds []GetEnSubscriptionSmsAttributeUnsubscribed
    (List) The phone numbers that have opted out of subscription from the topic.
    inviteds list(object)
    (List) The phone numbers for invitation.
    subscribeds list(object)
    (List) The phone numbers that are subscribed to the topic.
    unsubscribeds list(object)
    (List) The phone numbers that have opted out of subscription from the topic.
    inviteds List<GetEnSubscriptionSmsAttributeInvited>
    (List) The phone numbers for invitation.
    subscribeds List<GetEnSubscriptionSmsAttributeSubscribed>
    (List) The phone numbers that are subscribed to the topic.
    unsubscribeds List<GetEnSubscriptionSmsAttributeUnsubscribed>
    (List) The phone numbers that have opted out of subscription from the topic.
    inviteds GetEnSubscriptionSmsAttributeInvited[]
    (List) The phone numbers for invitation.
    subscribeds GetEnSubscriptionSmsAttributeSubscribed[]
    (List) The phone numbers that are subscribed to the topic.
    unsubscribeds GetEnSubscriptionSmsAttributeUnsubscribed[]
    (List) The phone numbers that have opted out of subscription from the topic.
    inviteds Sequence[GetEnSubscriptionSmsAttributeInvited]
    (List) The phone numbers for invitation.
    subscribeds Sequence[GetEnSubscriptionSmsAttributeSubscribed]
    (List) The phone numbers that are subscribed to the topic.
    unsubscribeds Sequence[GetEnSubscriptionSmsAttributeUnsubscribed]
    (List) The phone numbers that have opted out of subscription from the topic.
    inviteds List<Property Map>
    (List) The phone numbers for invitation.
    subscribeds List<Property Map>
    (List) The phone numbers that are subscribed to the topic.
    unsubscribeds List<Property Map>
    (List) The phone numbers that have opted out of subscription from the topic.

    GetEnSubscriptionSmsAttributeInvited

    ExpiresAt string
    (String) The expiry date of the invitation.
    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    ExpiresAt string
    (String) The expiry date of the invitation.
    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    expires_at string
    (String) The expiry date of the invitation.
    phone_number string
    (String) The invited phone number.
    updated_at string
    (String) Last updated time.
    expiresAt String
    (String) The expiry date of the invitation.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.
    expiresAt string
    (String) The expiry date of the invitation.
    phoneNumber string
    (String) The invited phone number.
    updatedAt string
    (String) Last updated time.
    expires_at str
    (String) The expiry date of the invitation.
    phone_number str
    (String) The invited phone number.
    updated_at str
    (String) Last updated time.
    expiresAt String
    (String) The expiry date of the invitation.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.

    GetEnSubscriptionSmsAttributeSubscribed

    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    phone_number string
    (String) The invited phone number.
    updated_at string
    (String) Last updated time.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.
    phoneNumber string
    (String) The invited phone number.
    updatedAt string
    (String) Last updated time.
    phone_number str
    (String) The invited phone number.
    updated_at str
    (String) Last updated time.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.

    GetEnSubscriptionSmsAttributeUnsubscribed

    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    PhoneNumber string
    (String) The invited phone number.
    UpdatedAt string
    (String) Last updated time.
    phone_number string
    (String) The invited phone number.
    updated_at string
    (String) Last updated time.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.
    phoneNumber string
    (String) The invited phone number.
    updatedAt string
    (String) Last updated time.
    phone_number str
    (String) The invited phone number.
    updated_at str
    (String) Last updated time.
    phoneNumber String
    (String) The invited phone number.
    updatedAt String
    (String) Last updated time.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm
    Viewing docs for ibm 2.7.0
    published on Wednesday, Oct 7, 2026 by ibm-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial