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

ibm.EnSmtpSetting

Explore with Pulumi AI

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

    update integration using IBM Cloud™ Event Notifications.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const enSmtpSetting = new ibm.EnSmtpSetting("enSmtpSetting", {
        instanceGuid: ibm_resource_instance.en_terraform_test_resource.guid,
        smtpConfigId: ibm_resource_instance.en_smtp_configuration_instance.en_smtp_configuration_id,
        settings: {
            subnets: [
                "44.255.224.210/20",
                "100.113.203.15/26",
            ],
        },
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    en_smtp_setting = ibm.EnSmtpSetting("enSmtpSetting",
        instance_guid=ibm_resource_instance["en_terraform_test_resource"]["guid"],
        smtp_config_id=ibm_resource_instance["en_smtp_configuration_instance"]["en_smtp_configuration_id"],
        settings={
            "subnets": [
                "44.255.224.210/20",
                "100.113.203.15/26",
            ],
        })
    
    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.NewEnSmtpSetting(ctx, "enSmtpSetting", &ibm.EnSmtpSettingArgs{
    			InstanceGuid: pulumi.Any(ibm_resource_instance.En_terraform_test_resource.Guid),
    			SmtpConfigId: pulumi.Any(ibm_resource_instance.En_smtp_configuration_instance.En_smtp_configuration_id),
    			Settings: &ibm.EnSmtpSettingSettingsArgs{
    				Subnets: pulumi.StringArray{
    					pulumi.String("44.255.224.210/20"),
    					pulumi.String("100.113.203.15/26"),
    				},
    			},
    		})
    		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 enSmtpSetting = new Ibm.EnSmtpSetting("enSmtpSetting", new()
        {
            InstanceGuid = ibm_resource_instance.En_terraform_test_resource.Guid,
            SmtpConfigId = ibm_resource_instance.En_smtp_configuration_instance.En_smtp_configuration_id,
            Settings = new Ibm.Inputs.EnSmtpSettingSettingsArgs
            {
                Subnets = new[]
                {
                    "44.255.224.210/20",
                    "100.113.203.15/26",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.EnSmtpSetting;
    import com.pulumi.ibm.EnSmtpSettingArgs;
    import com.pulumi.ibm.inputs.EnSmtpSettingSettingsArgs;
    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 enSmtpSetting = new EnSmtpSetting("enSmtpSetting", EnSmtpSettingArgs.builder()
                .instanceGuid(ibm_resource_instance.en_terraform_test_resource().guid())
                .smtpConfigId(ibm_resource_instance.en_smtp_configuration_instance().en_smtp_configuration_id())
                .settings(EnSmtpSettingSettingsArgs.builder()
                    .subnets(                
                        "44.255.224.210/20",
                        "100.113.203.15/26")
                    .build())
                .build());
    
        }
    }
    
    resources:
      enSmtpSetting:
        type: ibm:EnSmtpSetting
        properties:
          instanceGuid: ${ibm_resource_instance.en_terraform_test_resource.guid}
          smtpConfigId: ${ibm_resource_instance.en_smtp_configuration_instance.en_smtp_configuration_id}
          settings:
            subnets:
              - 44.255.224.210/20
              - 100.113.203.15/26
    

    Note: The support for legacy allowlisting has been deprecated. The support has been enabled via Context-based-restrictions. For detailed information, please refer here: https://cloud.ibm.com/docs/event-notifications?topic=event-notifications-en-smtp-configurations#en-smtp-configurations-cbr. You can get the existing IP’s details using data source ibm.getEnSmtpAllowedIps

    Create EnSmtpSetting Resource

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

    Constructor syntax

    new EnSmtpSetting(name: string, args: EnSmtpSettingArgs, opts?: CustomResourceOptions);
    @overload
    def EnSmtpSetting(resource_name: str,
                      args: EnSmtpSettingArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnSmtpSetting(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      instance_guid: Optional[str] = None,
                      settings: Optional[EnSmtpSettingSettingsArgs] = None,
                      smtp_config_id: Optional[str] = None,
                      en_smtp_setting_id: Optional[str] = None)
    func NewEnSmtpSetting(ctx *Context, name string, args EnSmtpSettingArgs, opts ...ResourceOption) (*EnSmtpSetting, error)
    public EnSmtpSetting(string name, EnSmtpSettingArgs args, CustomResourceOptions? opts = null)
    public EnSmtpSetting(String name, EnSmtpSettingArgs args)
    public EnSmtpSetting(String name, EnSmtpSettingArgs args, CustomResourceOptions options)
    
    type: ibm:EnSmtpSetting
    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 EnSmtpSettingArgs
    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 EnSmtpSettingArgs
    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 EnSmtpSettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnSmtpSettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnSmtpSettingArgs
    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 enSmtpSettingResource = new Ibm.EnSmtpSetting("enSmtpSettingResource", new()
    {
        InstanceGuid = "string",
        Settings = new Ibm.Inputs.EnSmtpSettingSettingsArgs
        {
            Subnets = new[]
            {
                "string",
            },
        },
        SmtpConfigId = "string",
        EnSmtpSettingId = "string",
    });
    
    example, err := ibm.NewEnSmtpSetting(ctx, "enSmtpSettingResource", &ibm.EnSmtpSettingArgs{
    	InstanceGuid: pulumi.String("string"),
    	Settings: &ibm.EnSmtpSettingSettingsArgs{
    		Subnets: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	SmtpConfigId:    pulumi.String("string"),
    	EnSmtpSettingId: pulumi.String("string"),
    })
    
    var enSmtpSettingResource = new EnSmtpSetting("enSmtpSettingResource", EnSmtpSettingArgs.builder()
        .instanceGuid("string")
        .settings(EnSmtpSettingSettingsArgs.builder()
            .subnets("string")
            .build())
        .smtpConfigId("string")
        .enSmtpSettingId("string")
        .build());
    
    en_smtp_setting_resource = ibm.EnSmtpSetting("enSmtpSettingResource",
        instance_guid="string",
        settings={
            "subnets": ["string"],
        },
        smtp_config_id="string",
        en_smtp_setting_id="string")
    
    const enSmtpSettingResource = new ibm.EnSmtpSetting("enSmtpSettingResource", {
        instanceGuid: "string",
        settings: {
            subnets: ["string"],
        },
        smtpConfigId: "string",
        enSmtpSettingId: "string",
    });
    
    type: ibm:EnSmtpSetting
    properties:
        enSmtpSettingId: string
        instanceGuid: string
        settings:
            subnets:
                - string
        smtpConfigId: string
    

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

    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Settings EnSmtpSettingSettings
    Nested scheme for settings:
    SmtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    EnSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Settings EnSmtpSettingSettingsArgs
    Nested scheme for settings:
    SmtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    EnSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettings
    Nested scheme for settings:
    smtpConfigId String
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId String
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettings
    Nested scheme for settings:
    smtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettingsArgs
    Nested scheme for settings:
    smtp_config_id str
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    en_smtp_setting_id str
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    settings Property Map
    Nested scheme for settings:
    smtpConfigId String
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId String
    (String) The unique identifier of the en_smtp_setting.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EnSmtpSetting Resource

    Get an existing EnSmtpSetting 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?: EnSmtpSettingState, opts?: CustomResourceOptions): EnSmtpSetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            en_smtp_setting_id: Optional[str] = None,
            instance_guid: Optional[str] = None,
            settings: Optional[EnSmtpSettingSettingsArgs] = None,
            smtp_config_id: Optional[str] = None) -> EnSmtpSetting
    func GetEnSmtpSetting(ctx *Context, name string, id IDInput, state *EnSmtpSettingState, opts ...ResourceOption) (*EnSmtpSetting, error)
    public static EnSmtpSetting Get(string name, Input<string> id, EnSmtpSettingState? state, CustomResourceOptions? opts = null)
    public static EnSmtpSetting get(String name, Output<String> id, EnSmtpSettingState state, CustomResourceOptions options)
    resources:  _:    type: ibm:EnSmtpSetting    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:
    EnSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Settings EnSmtpSettingSettings
    Nested scheme for settings:
    SmtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    EnSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    InstanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    Settings EnSmtpSettingSettingsArgs
    Nested scheme for settings:
    SmtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId String
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettings
    Nested scheme for settings:
    smtpConfigId String
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId string
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid string
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettings
    Nested scheme for settings:
    smtpConfigId string
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    en_smtp_setting_id str
    (String) The unique identifier of the en_smtp_setting.
    instance_guid str
    Unique identifier for IBM Cloud Event Notifications instance.
    settings EnSmtpSettingSettingsArgs
    Nested scheme for settings:
    smtp_config_id str
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .
    enSmtpSettingId String
    (String) The unique identifier of the en_smtp_setting.
    instanceGuid String
    Unique identifier for IBM Cloud Event Notifications instance.
    settings Property Map
    Nested scheme for settings:
    smtpConfigId String
    SMTP ID.

    • Constraints: The maximum length is 100 characters. The minimum length is 32 characters. The value must match regular expression /[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/. .

    Supporting Types

    EnSmtpSettingSettings, EnSmtpSettingSettingsArgs

    Subnets List<string>
    The SMTP allowed Ips.
    Subnets []string
    The SMTP allowed Ips.
    subnets List<String>
    The SMTP allowed Ips.
    subnets string[]
    The SMTP allowed Ips.
    subnets Sequence[str]
    The SMTP allowed Ips.
    subnets List<String>
    The SMTP allowed Ips.

    Import

    You can import the ibm_smtp_setting resource by using id.

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

    <instance_guid>/<smtp_config_id>

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

    • smtp_config_id: A string. Unique identifier for SMTP Config

    Example

    $ pulumi import ibm:index/enSmtpSetting:EnSmtpSetting en_integration <instance_guid>/<smtp_config_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.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud