Class ContactFlowModule


  • public class ContactFlowModule
    extends com.pulumi.resources.CustomResource
    Provides an Amazon Connect Contact Flow Module 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 Modules 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 Flow Modules exported from the Console [See Contact Flow import/export which is the same for Contact Flow Modules](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-module`](https://docs.aws.amazon.com/cli/latest/reference/connect/describe-contact-flow-module.html). See example below which uses `jq` to extract the `Content` attribute and saves it to a local file. ## Example Usage ### Basic
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.connect.ContactFlowModule;
     import com.pulumi.aws.connect.ContactFlowModuleArgs;
     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 example = new ContactFlowModule("example", ContactFlowModuleArgs.builder()
                 .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
                 .name("Example")
                 .description("Example Contact Flow Module Description")
                 .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("Parameters", jsonObject(
                                     jsonProperty("Text", "Hello contact flow module")
                                 )),
                                 jsonProperty("Transitions", jsonObject(
                                     jsonProperty("NextAction", "abcdef-abcd-abcd-abcd-abcdefghijkl"),
                                     jsonProperty("Errors", jsonArray(
                                     )),
                                     jsonProperty("Conditions", jsonArray(
                                     ))
                                 )),
                                 jsonProperty("Type", "MessageParticipant")
                             ), 
                             jsonObject(
                                 jsonProperty("Identifier", "abcdef-abcd-abcd-abcd-abcdefghijkl"),
                                 jsonProperty("Type", "DisconnectParticipant"),
                                 jsonProperty("Parameters", jsonObject(
     
                                 )),
                                 jsonProperty("Transitions", jsonObject(
     
                                 ))
                             )
                         )),
                         jsonProperty("Settings", jsonObject(
                             jsonProperty("InputParameters", jsonArray(
                             )),
                             jsonProperty("OutputParameters", jsonArray(
                             )),
                             jsonProperty("Transitions", jsonArray(
                                 jsonObject(
                                     jsonProperty("DisplayName", "Success"),
                                     jsonProperty("ReferenceName", "Success"),
                                     jsonProperty("Description", "")
                                 ), 
                                 jsonObject(
                                     jsonProperty("DisplayName", "Error"),
                                     jsonProperty("ReferenceName", "Error"),
                                     jsonProperty("Description", "")
                                 )
                             ))
                         ))
                     )))
                 .tags(Map.ofEntries(
                     Map.entry("Name", "Example Contact Flow Module"),
                     Map.entry("Application", "Example"),
                     Map.entry("Method", "Create")
                 ))
                 .build());
     
         }
     }
     
     
    ### 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.ContactFlowModule;
     import com.pulumi.aws.connect.ContactFlowModuleArgs;
     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 example = new ContactFlowModule("example", ContactFlowModuleArgs.builder()
                 .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
                 .name("Example")
                 .description("Example Contact Flow Module Description")
                 .filename("contact_flow_module.json")
                 .contentHash(StdFunctions.filebase64sha256(Filebase64sha256Args.builder()
                     .input("contact_flow_module.json")
                     .build()).result())
                 .tags(Map.ofEntries(
                     Map.entry("Name", "Example Contact Flow Module"),
                     Map.entry("Application", "Example"),
                     Map.entry("Method", "Create")
                 ))
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import Amazon Connect Contact Flow Modules using the `instanceId` and `contactFlowModuleId` separated by a colon (`:`). For example: ```sh $ pulumi import aws:connect/contactFlowModule:ContactFlowModule example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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> contactFlowModuleId()  
      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 ContactFlowModule get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ContactFlowModuleState 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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContactFlowModule

        public ContactFlowModule​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • ContactFlowModule

        public ContactFlowModule​(java.lang.String name,
                                 ContactFlowModuleArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • ContactFlowModule

        public ContactFlowModule​(java.lang.String name,
                                 ContactFlowModuleArgs 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 Module.
      • contactFlowModuleId

        public com.pulumi.core.Output<java.lang.String> contactFlowModuleId()
        Returns:
        The identifier of the Contact Flow Module.
      • content

        public com.pulumi.core.Output<java.lang.String> content()
        Returns:
        Specifies the content of the Contact Flow Module, 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 Module 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 Module.
      • filename

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> filename()
        Returns:
        The path to the Contact Flow Module 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 Module.
      • 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 Module. 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.
      • get

        public static ContactFlowModule get​(java.lang.String name,
                                            com.pulumi.core.Output<java.lang.String> id,
                                            @Nullable
                                            ContactFlowModuleState 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.