Package com.pulumi.aws.connect
Class ContactFlow
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.connect.ContactFlow
-
public class ContactFlow extends com.pulumi.resources.CustomResourceProvides an Amazon Connect Contact Flow resource. For more information see [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) This resource embeds or references Contact Flows specified in Amazon Connect Contact Flow Language. For more information see [Amazon Connect Flow language](https://docs.aws.amazon.com/connect/latest/adminguide/flow-language.html) > **WARN:** Contact Flows exported from the Console [Contact Flow import/export](https://docs.aws.amazon.com/connect/latest/adminguide/contact-flow-import-export.html) are not in the Amazon Connect Contact Flow Language and can not be used with this resource. Instead, the recommendation is to use the AWS CLI [`describe-contact-flow`](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/connect/describe-contact-flow.html). See example below which uses `jq` to extract the `Content` attribute and saves it to a local file. ## Example Usage ### Basic
### With External Content Use the AWS CLI to extract Contact Flow Content: Use the generated file as input:package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.connect.ContactFlow; import com.pulumi.aws.connect.ContactFlowArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; 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 test = new ContactFlow("test", ContactFlowArgs.builder() .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111") .name("Test") .description("Test Contact Flow Description") .type("CONTACT_FLOW") .content(serializeJson( jsonObject( jsonProperty("Version", "2019-10-30"), jsonProperty("StartAction", "12345678-1234-1234-1234-123456789012"), jsonProperty("Actions", jsonArray( jsonObject( jsonProperty("Identifier", "12345678-1234-1234-1234-123456789012"), jsonProperty("Type", "MessageParticipant"), jsonProperty("Transitions", jsonObject( jsonProperty("NextAction", "abcdef-abcd-abcd-abcd-abcdefghijkl"), jsonProperty("Errors", jsonArray( )), jsonProperty("Conditions", jsonArray( )) )), jsonProperty("Parameters", jsonObject( jsonProperty("Text", "Thanks for calling the sample flow!") )) ), jsonObject( jsonProperty("Identifier", "abcdef-abcd-abcd-abcd-abcdefghijkl"), jsonProperty("Type", "DisconnectParticipant"), jsonProperty("Transitions", jsonObject( )), jsonProperty("Parameters", jsonObject( )) ) )) ))) .tags(Map.ofEntries( Map.entry("Name", "Test Contact Flow"), Map.entry("Application", "Example"), Map.entry("Method", "Create") )) .build()); } }
## Import Using `pulumi import`, import Amazon Connect Contact Flows using the `instanceId` and `contactFlowId` separated by a colon (`:`). For example: ```sh $ pulumi import aws:connect/contactFlow:ContactFlow example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.connect.ContactFlow; import com.pulumi.aws.connect.ContactFlowArgs; import com.pulumi.std.StdFunctions; import com.pulumi.std.inputs.Filebase64sha256Args; import java.util.ArrayList; import java.util.Arrays; 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 test = new ContactFlow("test", ContactFlowArgs.builder() .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111") .name("Test") .description("Test Contact Flow Description") .type("CONTACT_FLOW") .filename("contact_flow.json") .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder() .input("contact_flow.json") .build()).result()) .tags(Map.ofEntries( Map.entry("Name", "Test Contact Flow"), Map.entry("Application", "Example"), Map.entry("Method", "Create") )) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ContactFlow(java.lang.String name)ContactFlow(java.lang.String name, ContactFlowArgs args)ContactFlow(java.lang.String name, ContactFlowArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.String>contactFlowId()com.pulumi.core.Output<java.lang.String>content()com.pulumi.core.Output<java.util.Optional<java.lang.String>>contentHash()com.pulumi.core.Output<java.util.Optional<java.lang.String>>description()com.pulumi.core.Output<java.util.Optional<java.lang.String>>filename()static ContactFlowget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContactFlowState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>instanceId()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<java.lang.String>>type()
-
-
-
Constructor Detail
-
ContactFlow
public ContactFlow(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
ContactFlow
public ContactFlow(java.lang.String name, ContactFlowArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
ContactFlow
public ContactFlow(java.lang.String name, ContactFlowArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the Contact Flow.
-
contactFlowId
public com.pulumi.core.Output<java.lang.String> contactFlowId()
- Returns:
- The identifier of the Contact Flow.
-
content
public com.pulumi.core.Output<java.lang.String> content()
- Returns:
- Specifies the content of the Contact Flow, provided as a JSON string, written in Amazon Connect Contact Flow Language. If defined, the `filename` argument cannot be used.
-
contentHash
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> contentHash()
- Returns:
- Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the Contact Flow source specified with `filename`.
-
description
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
- Returns:
- Specifies the description of the Contact Flow.
-
filename
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> filename()
- Returns:
- The path to the Contact Flow source within the local filesystem. Conflicts with `content`.
-
instanceId
public com.pulumi.core.Output<java.lang.String> instanceId()
- Returns:
- Specifies the identifier of the hosting Amazon Connect Instance.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Specifies the name of the Contact Flow.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Tags to apply to the Contact Flow. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
type
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> type()
- Returns:
- Specifies the type of the Contact Flow. Defaults to `CONTACT_FLOW`. Allowed Values are: `CONTACT_FLOW`, `CUSTOMER_QUEUE`, `CUSTOMER_HOLD`, `CUSTOMER_WHISPER`, `AGENT_HOLD`, `AGENT_WHISPER`, `OUTBOUND_WHISPER`, `AGENT_TRANSFER`, `QUEUE_TRANSFER`.
-
get
public static ContactFlow get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ContactFlowState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-