1. Packages
  2. Ibm Provider
  3. API Docs
  4. getEnSubscriptionCustomEmail
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getEnSubscriptionCustomEmail

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source for Custom Email 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 customDomainEmailSubscription = ibm.getEnSubscriptionCustomEmail({
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        subscriptionId: ibm_en_subscription_custom_email.subscriptioncustomemail.subscription_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    custom_domain_email_subscription = ibm.get_en_subscription_custom_email(instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        subscription_id=ibm_en_subscription_custom_email["subscriptioncustomemail"]["subscription_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupEnSubscriptionCustomEmail(ctx, &ibm.LookupEnSubscriptionCustomEmailArgs{
    			InstanceGuid:   ibm_resource_instance.En_terraform_test_resource.Guid,
    			SubscriptionId: ibm_en_subscription_custom_email.Subscriptioncustomemail.Subscription_id,
    		}, 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 customDomainEmailSubscription = Ibm.GetEnSubscriptionCustomEmail.Invoke(new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            SubscriptionId = ibm_en_subscription_custom_email.Subscriptioncustomemail.Subscription_id,
        });
    
    });
    
    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.GetEnSubscriptionCustomEmailArgs;
    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 customDomainEmailSubscription = IbmFunctions.getEnSubscriptionCustomEmail(GetEnSubscriptionCustomEmailArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .subscriptionId(ibm_en_subscription_custom_email.subscriptioncustomemail().subscription_id())
                .build());
    
        }
    }
    
    variables:
      customDomainEmailSubscription:
        fn::invoke:
          function: ibm:getEnSubscriptionCustomEmail
          arguments:
            instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
            subscriptionId: ${ibm_en_subscription_custom_email.subscriptioncustomemail.subscription_id}
    

    Using getEnSubscriptionCustomEmail

    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 getEnSubscriptionCustomEmail(args: GetEnSubscriptionCustomEmailArgs, opts?: InvokeOptions): Promise<GetEnSubscriptionCustomEmailResult>
    function getEnSubscriptionCustomEmailOutput(args: GetEnSubscriptionCustomEmailOutputArgs, opts?: InvokeOptions): Output<GetEnSubscriptionCustomEmailResult>
    def get_en_subscription_custom_email(id: Optional[str] = None,
                                         instance_guid: Optional[str] = None,
                                         subscription_id: Optional[str] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetEnSubscriptionCustomEmailResult
    def get_en_subscription_custom_email_output(id: Optional[pulumi.Input[str]] = None,
                                         instance_guid: Optional[pulumi.Input[str]] = None,
                                         subscription_id: Optional[pulumi.Input[str]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetEnSubscriptionCustomEmailResult]
    func LookupEnSubscriptionCustomEmail(ctx *Context, args *LookupEnSubscriptionCustomEmailArgs, opts ...InvokeOption) (*LookupEnSubscriptionCustomEmailResult, error)
    func LookupEnSubscriptionCustomEmailOutput(ctx *Context, args *LookupEnSubscriptionCustomEmailOutputArgs, opts ...InvokeOption) LookupEnSubscriptionCustomEmailResultOutput

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

    public static class GetEnSubscriptionCustomEmail 
    {
        public static Task<GetEnSubscriptionCustomEmailResult> InvokeAsync(GetEnSubscriptionCustomEmailArgs args, InvokeOptions? opts = null)
        public static Output<GetEnSubscriptionCustomEmailResult> Invoke(GetEnSubscriptionCustomEmailInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnSubscriptionCustomEmailResult> getEnSubscriptionCustomEmail(GetEnSubscriptionCustomEmailArgs args, InvokeOptions options)
    public static Output<GetEnSubscriptionCustomEmailResult> getEnSubscriptionCustomEmail(GetEnSubscriptionCustomEmailArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getEnSubscriptionCustomEmail:getEnSubscriptionCustomEmail
      arguments:
        # arguments dictionary

    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 email_subscription.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    SubscriptionId string
    Unique identifier for Subscription.
    Id string
    The unique identifier of the email_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId String
    Unique identifier for Subscription.
    id String
    The unique identifier of the email_subscription.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId string
    Unique identifier for Subscription.
    id string
    The unique identifier of the email_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 email_subscription.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    subscriptionId String
    Unique identifier for Subscription.
    id String
    The unique identifier of the email_subscription.

    getEnSubscriptionCustomEmail Result

    The following output properties are available:

    Attributes List<GetEnSubscriptionCustomEmailAttribute>
    (Required, List)
    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    Id string
    The unique identifier of the email_subscription.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SubscriptionId string
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last updated time.
    Attributes []GetEnSubscriptionCustomEmailAttribute
    (Required, List)
    Description string
    (String) Subscription description.
    DestinationId string
    (String) The destination ID.
    Id string
    The unique identifier of the email_subscription.
    InstanceGuid string
    Name string
    (String) Subscription name.
    SubscriptionId string
    TopicId string
    (String) Topic ID.
    UpdatedAt string
    (String) Last updated time.
    attributes List<GetEnSubscriptionCustomEmailAttribute>
    (Required, List)
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    id String
    The unique identifier of the email_subscription.
    instanceGuid String
    name String
    (String) Subscription name.
    subscriptionId String
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last updated time.
    attributes GetEnSubscriptionCustomEmailAttribute[]
    (Required, List)
    description string
    (String) Subscription description.
    destinationId string
    (String) The destination ID.
    id string
    The unique identifier of the email_subscription.
    instanceGuid string
    name string
    (String) Subscription name.
    subscriptionId string
    topicId string
    (String) Topic ID.
    updatedAt string
    (String) Last updated time.
    attributes Sequence[GetEnSubscriptionCustomEmailAttribute]
    (Required, List)
    description str
    (String) Subscription description.
    destination_id str
    (String) The destination ID.
    id str
    The unique identifier of the email_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>
    (Required, List)
    description String
    (String) Subscription description.
    destinationId String
    (String) The destination ID.
    id String
    The unique identifier of the email_subscription.
    instanceGuid String
    name String
    (String) Subscription name.
    subscriptionId String
    topicId String
    (String) Topic ID.
    updatedAt String
    (String) Last updated time.

    Supporting Types

    GetEnSubscriptionCustomEmailAttribute

    AddNotificationPayload bool
    (Boolean) Whether to add the notification payload to the email.
    FromEmail string
    (String) The email from where it is sourced.
    FromName string
    (String) The name of email address from which email is sourced.
    Inviteds List<GetEnSubscriptionCustomEmailAttributeInvited>
    (List) The Email address for invitation.
    ReplyToMail string
    (String) The email address to reply to.
    ReplyToName string
    (String) The Email User Name to reply to.
    Subscribeds List<GetEnSubscriptionCustomEmailAttributeSubscribed>
    TemplateIdInvitation string
    (String) The templete id for invitation.
    TemplateIdNotification string
    (String) The templete id for notification.
    Unsubscribeds List<GetEnSubscriptionCustomEmailAttributeUnsubscribed>
    (List) The Email address which has opted for unsusbscribtion from that topic.
    AddNotificationPayload bool
    (Boolean) Whether to add the notification payload to the email.
    FromEmail string
    (String) The email from where it is sourced.
    FromName string
    (String) The name of email address from which email is sourced.
    Inviteds []GetEnSubscriptionCustomEmailAttributeInvited
    (List) The Email address for invitation.
    ReplyToMail string
    (String) The email address to reply to.
    ReplyToName string
    (String) The Email User Name to reply to.
    Subscribeds []GetEnSubscriptionCustomEmailAttributeSubscribed
    TemplateIdInvitation string
    (String) The templete id for invitation.
    TemplateIdNotification string
    (String) The templete id for notification.
    Unsubscribeds []GetEnSubscriptionCustomEmailAttributeUnsubscribed
    (List) The Email address which has opted for unsusbscribtion from that topic.
    addNotificationPayload Boolean
    (Boolean) Whether to add the notification payload to the email.
    fromEmail String
    (String) The email from where it is sourced.
    fromName String
    (String) The name of email address from which email is sourced.
    inviteds List<GetEnSubscriptionCustomEmailAttributeInvited>
    (List) The Email address for invitation.
    replyToMail String
    (String) The email address to reply to.
    replyToName String
    (String) The Email User Name to reply to.
    subscribeds List<GetEnSubscriptionCustomEmailAttributeSubscribed>
    templateIdInvitation String
    (String) The templete id for invitation.
    templateIdNotification String
    (String) The templete id for notification.
    unsubscribeds List<GetEnSubscriptionCustomEmailAttributeUnsubscribed>
    (List) The Email address which has opted for unsusbscribtion from that topic.
    addNotificationPayload boolean
    (Boolean) Whether to add the notification payload to the email.
    fromEmail string
    (String) The email from where it is sourced.
    fromName string
    (String) The name of email address from which email is sourced.
    inviteds GetEnSubscriptionCustomEmailAttributeInvited[]
    (List) The Email address for invitation.
    replyToMail string
    (String) The email address to reply to.
    replyToName string
    (String) The Email User Name to reply to.
    subscribeds GetEnSubscriptionCustomEmailAttributeSubscribed[]
    templateIdInvitation string
    (String) The templete id for invitation.
    templateIdNotification string
    (String) The templete id for notification.
    unsubscribeds GetEnSubscriptionCustomEmailAttributeUnsubscribed[]
    (List) The Email address which has opted for unsusbscribtion from that topic.
    add_notification_payload bool
    (Boolean) Whether to add the notification payload to the email.
    from_email str
    (String) The email from where it is sourced.
    from_name str
    (String) The name of email address from which email is sourced.
    inviteds Sequence[GetEnSubscriptionCustomEmailAttributeInvited]
    (List) The Email address for invitation.
    reply_to_mail str
    (String) The email address to reply to.
    reply_to_name str
    (String) The Email User Name to reply to.
    subscribeds Sequence[GetEnSubscriptionCustomEmailAttributeSubscribed]
    template_id_invitation str
    (String) The templete id for invitation.
    template_id_notification str
    (String) The templete id for notification.
    unsubscribeds Sequence[GetEnSubscriptionCustomEmailAttributeUnsubscribed]
    (List) The Email address which has opted for unsusbscribtion from that topic.
    addNotificationPayload Boolean
    (Boolean) Whether to add the notification payload to the email.
    fromEmail String
    (String) The email from where it is sourced.
    fromName String
    (String) The name of email address from which email is sourced.
    inviteds List<Property Map>
    (List) The Email address for invitation.
    replyToMail String
    (String) The email address to reply to.
    replyToName String
    (String) The Email User Name to reply to.
    subscribeds List<Property Map>
    templateIdInvitation String
    (String) The templete id for invitation.
    templateIdNotification String
    (String) The templete id for notification.
    unsubscribeds List<Property Map>
    (List) The Email address which has opted for unsusbscribtion from that topic.

    GetEnSubscriptionCustomEmailAttributeInvited

    Email string
    ExpiresAt string
    UpdatedAt string
    (String) Last updated time.
    Email string
    ExpiresAt string
    UpdatedAt string
    (String) Last updated time.
    email String
    expiresAt String
    updatedAt String
    (String) Last updated time.
    email string
    expiresAt string
    updatedAt string
    (String) Last updated time.
    email str
    expires_at str
    updated_at str
    (String) Last updated time.
    email String
    expiresAt String
    updatedAt String
    (String) Last updated time.

    GetEnSubscriptionCustomEmailAttributeSubscribed

    Email string
    UpdatedAt string
    (String) Last updated time.
    Email string
    UpdatedAt string
    (String) Last updated time.
    email String
    updatedAt String
    (String) Last updated time.
    email string
    updatedAt string
    (String) Last updated time.
    email str
    updated_at str
    (String) Last updated time.
    email String
    updatedAt String
    (String) Last updated time.

    GetEnSubscriptionCustomEmailAttributeUnsubscribed

    Email string
    UpdatedAt string
    (String) Last updated time.
    Email string
    UpdatedAt string
    (String) Last updated time.
    email String
    updatedAt String
    (String) Last updated time.
    email string
    updatedAt string
    (String) Last updated time.
    email str
    updated_at str
    (String) Last updated time.
    email String
    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 logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud