1. Packages
  2. Hsdp Provider
  3. API Docs
  4. IamSmsGateway
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.IamSmsGateway

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Provides a resource for managing HSDP IAM SMS gateway configurations.

    Example Usage

    The following example creates an IAM SMS Gateway configuration for an IAM organization

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const config = new hsdp.IamSmsGateway("config", {
        organizationId: _var.iam_org_id,
        gatewayProvider: "twilio",
        properties: {
            sid: _var.twilio_sub_account_sid,
            endpoint: _var.twilio_endpoint,
            fromNumber: _var.twilio_phone_number,
        },
        credentials: {
            token: _var.twilio_sub_account_token,
        },
        activationExpiry: 15,
    });
    // OTP is valid for 15 minutes
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    config = hsdp.IamSmsGateway("config",
        organization_id=var["iam_org_id"],
        gateway_provider="twilio",
        properties={
            "sid": var["twilio_sub_account_sid"],
            "endpoint": var["twilio_endpoint"],
            "from_number": var["twilio_phone_number"],
        },
        credentials={
            "token": var["twilio_sub_account_token"],
        },
        activation_expiry=15)
    # OTP is valid for 15 minutes
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hsdp.NewIamSmsGateway(ctx, "config", &hsdp.IamSmsGatewayArgs{
    			OrganizationId:  pulumi.Any(_var.Iam_org_id),
    			GatewayProvider: pulumi.String("twilio"),
    			Properties: &hsdp.IamSmsGatewayPropertiesArgs{
    				Sid:        pulumi.Any(_var.Twilio_sub_account_sid),
    				Endpoint:   pulumi.Any(_var.Twilio_endpoint),
    				FromNumber: pulumi.Any(_var.Twilio_phone_number),
    			},
    			Credentials: &hsdp.IamSmsGatewayCredentialsArgs{
    				Token: pulumi.Any(_var.Twilio_sub_account_token),
    			},
    			ActivationExpiry: pulumi.Float64(15),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Hsdp.IamSmsGateway("config", new()
        {
            OrganizationId = @var.Iam_org_id,
            GatewayProvider = "twilio",
            Properties = new Hsdp.Inputs.IamSmsGatewayPropertiesArgs
            {
                Sid = @var.Twilio_sub_account_sid,
                Endpoint = @var.Twilio_endpoint,
                FromNumber = @var.Twilio_phone_number,
            },
            Credentials = new Hsdp.Inputs.IamSmsGatewayCredentialsArgs
            {
                Token = @var.Twilio_sub_account_token,
            },
            ActivationExpiry = 15,
        });
    
        // OTP is valid for 15 minutes
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.IamSmsGateway;
    import com.pulumi.hsdp.IamSmsGatewayArgs;
    import com.pulumi.hsdp.inputs.IamSmsGatewayPropertiesArgs;
    import com.pulumi.hsdp.inputs.IamSmsGatewayCredentialsArgs;
    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 config = new IamSmsGateway("config", IamSmsGatewayArgs.builder()
                .organizationId(var_.iam_org_id())
                .gatewayProvider("twilio")
                .properties(IamSmsGatewayPropertiesArgs.builder()
                    .sid(var_.twilio_sub_account_sid())
                    .endpoint(var_.twilio_endpoint())
                    .fromNumber(var_.twilio_phone_number())
                    .build())
                .credentials(IamSmsGatewayCredentialsArgs.builder()
                    .token(var_.twilio_sub_account_token())
                    .build())
                .activationExpiry(15)
                .build());
    
            // OTP is valid for 15 minutes
        }
    }
    
    resources:
      config:
        type: hsdp:IamSmsGateway
        properties:
          organizationId: ${var.iam_org_id}
          gatewayProvider: twilio
          properties:
            sid: ${var.twilio_sub_account_sid}
            endpoint: ${var.twilio_endpoint}
            fromNumber: ${var.twilio_phone_number}
          credentials:
            token: ${var.twilio_sub_account_token}
          activationExpiry: 15
    

    Create IamSmsGateway Resource

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

    Constructor syntax

    new IamSmsGateway(name: string, args: IamSmsGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def IamSmsGateway(resource_name: str,
                      args: IamSmsGatewayArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def IamSmsGateway(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      credentials: Optional[IamSmsGatewayCredentialsArgs] = None,
                      organization_id: Optional[str] = None,
                      properties: Optional[IamSmsGatewayPropertiesArgs] = None,
                      activation_expiry: Optional[float] = None,
                      gateway_provider: Optional[str] = None,
                      iam_sms_gateway_id: Optional[str] = None)
    func NewIamSmsGateway(ctx *Context, name string, args IamSmsGatewayArgs, opts ...ResourceOption) (*IamSmsGateway, error)
    public IamSmsGateway(string name, IamSmsGatewayArgs args, CustomResourceOptions? opts = null)
    public IamSmsGateway(String name, IamSmsGatewayArgs args)
    public IamSmsGateway(String name, IamSmsGatewayArgs args, CustomResourceOptions options)
    
    type: hsdp:IamSmsGateway
    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 IamSmsGatewayArgs
    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 IamSmsGatewayArgs
    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 IamSmsGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IamSmsGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IamSmsGatewayArgs
    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 iamSmsGatewayResource = new Hsdp.IamSmsGateway("iamSmsGatewayResource", new()
    {
        Credentials = new Hsdp.Inputs.IamSmsGatewayCredentialsArgs
        {
            Token = "string",
        },
        OrganizationId = "string",
        Properties = new Hsdp.Inputs.IamSmsGatewayPropertiesArgs
        {
            Endpoint = "string",
            FromNumber = "string",
            Sid = "string",
        },
        ActivationExpiry = 0,
        GatewayProvider = "string",
        IamSmsGatewayId = "string",
    });
    
    example, err := hsdp.NewIamSmsGateway(ctx, "iamSmsGatewayResource", &hsdp.IamSmsGatewayArgs{
    	Credentials: &hsdp.IamSmsGatewayCredentialsArgs{
    		Token: pulumi.String("string"),
    	},
    	OrganizationId: pulumi.String("string"),
    	Properties: &hsdp.IamSmsGatewayPropertiesArgs{
    		Endpoint:   pulumi.String("string"),
    		FromNumber: pulumi.String("string"),
    		Sid:        pulumi.String("string"),
    	},
    	ActivationExpiry: pulumi.Float64(0),
    	GatewayProvider:  pulumi.String("string"),
    	IamSmsGatewayId:  pulumi.String("string"),
    })
    
    var iamSmsGatewayResource = new IamSmsGateway("iamSmsGatewayResource", IamSmsGatewayArgs.builder()
        .credentials(IamSmsGatewayCredentialsArgs.builder()
            .token("string")
            .build())
        .organizationId("string")
        .properties(IamSmsGatewayPropertiesArgs.builder()
            .endpoint("string")
            .fromNumber("string")
            .sid("string")
            .build())
        .activationExpiry(0)
        .gatewayProvider("string")
        .iamSmsGatewayId("string")
        .build());
    
    iam_sms_gateway_resource = hsdp.IamSmsGateway("iamSmsGatewayResource",
        credentials={
            "token": "string",
        },
        organization_id="string",
        properties={
            "endpoint": "string",
            "from_number": "string",
            "sid": "string",
        },
        activation_expiry=0,
        gateway_provider="string",
        iam_sms_gateway_id="string")
    
    const iamSmsGatewayResource = new hsdp.IamSmsGateway("iamSmsGatewayResource", {
        credentials: {
            token: "string",
        },
        organizationId: "string",
        properties: {
            endpoint: "string",
            fromNumber: "string",
            sid: "string",
        },
        activationExpiry: 0,
        gatewayProvider: "string",
        iamSmsGatewayId: "string",
    });
    
    type: hsdp:IamSmsGateway
    properties:
        activationExpiry: 0
        credentials:
            token: string
        gatewayProvider: string
        iamSmsGatewayId: string
        organizationId: string
        properties:
            endpoint: string
            fromNumber: string
            sid: string
    

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

    Credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    OrganizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    Properties IamSmsGatewayProperties
    The properties of the SMS gateway
    ActivationExpiry double
    GatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    IamSmsGatewayId string
    The GUID of the SMS gateway config
    Credentials IamSmsGatewayCredentialsArgs
    Credentials of the SMS gateway
    OrganizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    Properties IamSmsGatewayPropertiesArgs
    The properties of the SMS gateway
    ActivationExpiry float64
    GatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    IamSmsGatewayId string
    The GUID of the SMS gateway config
    credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    organizationId String
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayProperties
    The properties of the SMS gateway
    activationExpiry Double
    gatewayProvider String
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId String
    The GUID of the SMS gateway config
    credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    organizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayProperties
    The properties of the SMS gateway
    activationExpiry number
    gatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId string
    The GUID of the SMS gateway config
    credentials IamSmsGatewayCredentialsArgs
    Credentials of the SMS gateway
    organization_id str
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayPropertiesArgs
    The properties of the SMS gateway
    activation_expiry float
    gateway_provider str
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iam_sms_gateway_id str
    The GUID of the SMS gateway config
    credentials Property Map
    Credentials of the SMS gateway
    organizationId String
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties Property Map
    The properties of the SMS gateway
    activationExpiry Number
    gatewayProvider String
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId String
    The GUID of the SMS gateway config

    Outputs

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

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

    Look up Existing IamSmsGateway Resource

    Get an existing IamSmsGateway 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?: IamSmsGatewayState, opts?: CustomResourceOptions): IamSmsGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            activation_expiry: Optional[float] = None,
            credentials: Optional[IamSmsGatewayCredentialsArgs] = None,
            gateway_provider: Optional[str] = None,
            iam_sms_gateway_id: Optional[str] = None,
            organization_id: Optional[str] = None,
            properties: Optional[IamSmsGatewayPropertiesArgs] = None,
            query_retrieve_service_id: Optional[str] = None) -> IamSmsGateway
    func GetIamSmsGateway(ctx *Context, name string, id IDInput, state *IamSmsGatewayState, opts ...ResourceOption) (*IamSmsGateway, error)
    public static IamSmsGateway Get(string name, Input<string> id, IamSmsGatewayState? state, CustomResourceOptions? opts = null)
    public static IamSmsGateway get(String name, Output<String> id, IamSmsGatewayState state, CustomResourceOptions options)
    resources:  _:    type: hsdp:IamSmsGateway    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:
    ActivationExpiry double
    Credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    GatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    IamSmsGatewayId string
    The GUID of the SMS gateway config
    OrganizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    Properties IamSmsGatewayProperties
    The properties of the SMS gateway
    QueryRetrieveServiceId string
    ActivationExpiry float64
    Credentials IamSmsGatewayCredentialsArgs
    Credentials of the SMS gateway
    GatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    IamSmsGatewayId string
    The GUID of the SMS gateway config
    OrganizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    Properties IamSmsGatewayPropertiesArgs
    The properties of the SMS gateway
    QueryRetrieveServiceId string
    activationExpiry Double
    credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    gatewayProvider String
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId String
    The GUID of the SMS gateway config
    organizationId String
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayProperties
    The properties of the SMS gateway
    queryRetrieveServiceId String
    activationExpiry number
    credentials IamSmsGatewayCredentials
    Credentials of the SMS gateway
    gatewayProvider string
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId string
    The GUID of the SMS gateway config
    organizationId string
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayProperties
    The properties of the SMS gateway
    queryRetrieveServiceId string
    activation_expiry float
    credentials IamSmsGatewayCredentialsArgs
    Credentials of the SMS gateway
    gateway_provider str
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iam_sms_gateway_id str
    The GUID of the SMS gateway config
    organization_id str
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties IamSmsGatewayPropertiesArgs
    The properties of the SMS gateway
    query_retrieve_service_id str
    activationExpiry Number
    credentials Property Map
    Credentials of the SMS gateway
    gatewayProvider String
    The SMS gateway provider. Default: twilio. Supported: [ twilio ]
    iamSmsGatewayId String
    The GUID of the SMS gateway config
    organizationId String
    the IAM organization ID (GUID) for which this SMS gateway should be
    properties Property Map
    The properties of the SMS gateway
    queryRetrieveServiceId String

    Supporting Types

    IamSmsGatewayCredentials, IamSmsGatewayCredentialsArgs

    Token string
    The Twilio sub-account token (sensitive)
    Token string
    The Twilio sub-account token (sensitive)
    token String
    The Twilio sub-account token (sensitive)
    token string
    The Twilio sub-account token (sensitive)
    token str
    The Twilio sub-account token (sensitive)
    token String
    The Twilio sub-account token (sensitive)

    IamSmsGatewayProperties, IamSmsGatewayPropertiesArgs

    Endpoint string
    The Twilio endpoint to use
    FromNumber string
    The Twilio phone number from which SMS messages will appear from
    Sid string
    The Twilio sub-account SID (sensitive)
    Endpoint string
    The Twilio endpoint to use
    FromNumber string
    The Twilio phone number from which SMS messages will appear from
    Sid string
    The Twilio sub-account SID (sensitive)
    endpoint String
    The Twilio endpoint to use
    fromNumber String
    The Twilio phone number from which SMS messages will appear from
    sid String
    The Twilio sub-account SID (sensitive)
    endpoint string
    The Twilio endpoint to use
    fromNumber string
    The Twilio phone number from which SMS messages will appear from
    sid string
    The Twilio sub-account SID (sensitive)
    endpoint str
    The Twilio endpoint to use
    from_number str
    The Twilio phone number from which SMS messages will appear from
    sid str
    The Twilio sub-account SID (sensitive)
    endpoint String
    The Twilio endpoint to use
    fromNumber String
    The Twilio phone number from which SMS messages will appear from
    sid String
    The Twilio sub-account SID (sensitive)

    Import

    Existing SMS gateway configurations can be imported.

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

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software