hsdp.IamSmsGateway
Explore with Pulumi AI
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
This property is required. string - The unique name of the resource.
- args
This property is required. IamSmsGatewayArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. IamSmsGatewayArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. IamSmsGatewayArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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
This property is required. IamSms Gateway Credentials - Credentials of the SMS gateway
- Organization
Id This property is required. string - the IAM organization ID (GUID) for which this SMS gateway should be
- Properties
This property is required. IamSms Gateway Properties - The properties of the SMS gateway
- Activation
Expiry double - Gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - Iam
Sms stringGateway Id - The GUID of the SMS gateway config
- Credentials
This property is required. IamSms Gateway Credentials Args - Credentials of the SMS gateway
- Organization
Id This property is required. string - the IAM organization ID (GUID) for which this SMS gateway should be
- Properties
This property is required. IamSms Gateway Properties Args - The properties of the SMS gateway
- Activation
Expiry float64 - Gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - Iam
Sms stringGateway Id - The GUID of the SMS gateway config
- credentials
This property is required. IamSms Gateway Credentials - Credentials of the SMS gateway
- organization
Id This property is required. String - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
This property is required. IamSms Gateway Properties - The properties of the SMS gateway
- activation
Expiry Double - gateway
Provider String - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms StringGateway Id - The GUID of the SMS gateway config
- credentials
This property is required. IamSms Gateway Credentials - Credentials of the SMS gateway
- organization
Id This property is required. string - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
This property is required. IamSms Gateway Properties - The properties of the SMS gateway
- activation
Expiry number - gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms stringGateway Id - The GUID of the SMS gateway config
- credentials
This property is required. IamSms Gateway Credentials Args - Credentials of the SMS gateway
- organization_
id This property is required. str - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
This property is required. IamSms Gateway Properties Args - The properties of the SMS gateway
- activation_
expiry float - gateway_
provider str - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam_
sms_ strgateway_ id - The GUID of the SMS gateway config
- credentials
This property is required. Property Map - Credentials of the SMS gateway
- organization
Id This property is required. String - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
This property is required. Property Map - The properties of the SMS gateway
- activation
Expiry Number - gateway
Provider String - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms StringGateway Id - 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.
- Query
Retrieve stringService Id
- Id string
- The provider-assigned unique ID for this managed resource.
- Query
Retrieve stringService Id
- id String
- The provider-assigned unique ID for this managed resource.
- query
Retrieve StringService Id
- id string
- The provider-assigned unique ID for this managed resource.
- query
Retrieve stringService Id
- id str
- The provider-assigned unique ID for this managed resource.
- query_
retrieve_ strservice_ id
- id String
- The provider-assigned unique ID for this managed resource.
- query
Retrieve StringService Id
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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Activation
Expiry double - Credentials
Iam
Sms Gateway Credentials - Credentials of the SMS gateway
- Gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - Iam
Sms stringGateway Id - The GUID of the SMS gateway config
- Organization
Id string - the IAM organization ID (GUID) for which this SMS gateway should be
- Properties
Iam
Sms Gateway Properties - The properties of the SMS gateway
- Query
Retrieve stringService Id
- Activation
Expiry float64 - Credentials
Iam
Sms Gateway Credentials Args - Credentials of the SMS gateway
- Gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - Iam
Sms stringGateway Id - The GUID of the SMS gateway config
- Organization
Id string - the IAM organization ID (GUID) for which this SMS gateway should be
- Properties
Iam
Sms Gateway Properties Args - The properties of the SMS gateway
- Query
Retrieve stringService Id
- activation
Expiry Double - credentials
Iam
Sms Gateway Credentials - Credentials of the SMS gateway
- gateway
Provider String - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms StringGateway Id - The GUID of the SMS gateway config
- organization
Id String - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
Iam
Sms Gateway Properties - The properties of the SMS gateway
- query
Retrieve StringService Id
- activation
Expiry number - credentials
Iam
Sms Gateway Credentials - Credentials of the SMS gateway
- gateway
Provider string - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms stringGateway Id - The GUID of the SMS gateway config
- organization
Id string - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
Iam
Sms Gateway Properties - The properties of the SMS gateway
- query
Retrieve stringService Id
- activation_
expiry float - credentials
Iam
Sms Gateway Credentials Args - Credentials of the SMS gateway
- gateway_
provider str - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam_
sms_ strgateway_ id - The GUID of the SMS gateway config
- organization_
id str - the IAM organization ID (GUID) for which this SMS gateway should be
- properties
Iam
Sms Gateway Properties Args - The properties of the SMS gateway
- query_
retrieve_ strservice_ id
- activation
Expiry Number - credentials Property Map
- Credentials of the SMS gateway
- gateway
Provider String - The SMS gateway provider. Default:
twilio
. Supported: [twilio
] - iam
Sms StringGateway Id - The GUID of the SMS gateway config
- organization
Id String - the IAM organization ID (GUID) for which this SMS gateway should be
- properties Property Map
- The properties of the SMS gateway
- query
Retrieve StringService Id
Supporting Types
IamSmsGatewayCredentials, IamSmsGatewayCredentialsArgs
- Token
This property is required. string - The Twilio sub-account token (sensitive)
- Token
This property is required. string - The Twilio sub-account token (sensitive)
- token
This property is required. String - The Twilio sub-account token (sensitive)
- token
This property is required. string - The Twilio sub-account token (sensitive)
- token
This property is required. str - The Twilio sub-account token (sensitive)
- token
This property is required. String - The Twilio sub-account token (sensitive)
IamSmsGatewayProperties, IamSmsGatewayPropertiesArgs
- Endpoint
This property is required. string - The Twilio endpoint to use
- From
Number This property is required. string - The Twilio phone number from which SMS messages will appear from
- Sid
This property is required. string - The Twilio sub-account SID (sensitive)
- Endpoint
This property is required. string - The Twilio endpoint to use
- From
Number This property is required. string - The Twilio phone number from which SMS messages will appear from
- Sid
This property is required. string - The Twilio sub-account SID (sensitive)
- endpoint
This property is required. String - The Twilio endpoint to use
- from
Number This property is required. String - The Twilio phone number from which SMS messages will appear from
- sid
This property is required. String - The Twilio sub-account SID (sensitive)
- endpoint
This property is required. string - The Twilio endpoint to use
- from
Number This property is required. string - The Twilio phone number from which SMS messages will appear from
- sid
This property is required. string - The Twilio sub-account SID (sensitive)
- endpoint
This property is required. str - The Twilio endpoint to use
- from_
number This property is required. str - The Twilio phone number from which SMS messages will appear from
- sid
This property is required. str - The Twilio sub-account SID (sensitive)
- endpoint
This property is required. String - The Twilio endpoint to use
- from
Number This property is required. String - The Twilio phone number from which SMS messages will appear from
- sid
This property is required. 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.