PhoneNumber

Provides an Amazon Connect Phone Number resource. For more information see Amazon Connect: Getting Started

Example Usage

Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.PhoneNumber;
import com.pulumi.aws.connect.PhoneNumberArgs;
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 example = new PhoneNumber("example", PhoneNumberArgs.builder()
.targetArn(aws_connect_instance.example().arn())
.countryCode("US")
.type("DID")
.tags(Map.of("hello", "world"))
.build());
}
}

Description

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.PhoneNumber;
import com.pulumi.aws.connect.PhoneNumberArgs;
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 example = new PhoneNumber("example", PhoneNumberArgs.builder()
.targetArn(aws_connect_instance.example().arn())
.countryCode("US")
.type("DID")
.description("example description")
.build());
}
}

Prefix to filter phone numbers

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.connect.PhoneNumber;
import com.pulumi.aws.connect.PhoneNumberArgs;
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 example = new PhoneNumber("example", PhoneNumberArgs.builder()
.targetArn(aws_connect_instance.example().arn())
.countryCode("US")
.type("DID")
.prefix("+18005")
.build());
}
}

Import

Amazon Connect Phone Numbers can be imported using its id e.g.,

$ pulumi import aws:connect/phoneNumber:PhoneNumber example 12345678-abcd-1234-efgh-9876543210ab

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the phone number.

Link copied to clipboard
val countryCode: Output<String>

The ISO country code. For a list of Valid values, refer to PhoneNumberCountryCode.

Link copied to clipboard
val description: Output<String>?

The description of the phone number.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val phoneNumber: Output<String>

The phone number. Phone numbers are formatted [+] [country code] [subscriber number including area code].

Link copied to clipboard
val prefix: Output<String>?

The prefix of the phone number that is used to filter available phone numbers. If provided, it must contain + as part of the country code. Do not specify this argument when importing the resource.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The status of the phone number. Valid Values: CLAIMED | IN_PROGRESS | FAILED.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Tags to apply to the Phone Number. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val targetArn: Output<String>

The Amazon Resource Name (ARN) for Amazon Connect instances that phone numbers are claimed to.

Link copied to clipboard
val type: Output<String>

The type of phone number. Valid Values: TOLL_FREE | DID.

Link copied to clipboard
val urn: Output<String>