Class Integration


  • public class Integration
    extends com.pulumi.resources.CustomResource
    Resource for managing an AWS RDS (Relational Database) zero-ETL integration. You can refer to the [User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.setting-up.html). ## Example Usage ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.redshiftserverless.Namespace;
     import com.pulumi.aws.redshiftserverless.NamespaceArgs;
     import com.pulumi.aws.redshiftserverless.Workgroup;
     import com.pulumi.aws.redshiftserverless.WorkgroupArgs;
     import com.pulumi.aws.redshiftserverless.inputs.WorkgroupConfigParameterArgs;
     import com.pulumi.aws.rds.Integration;
     import com.pulumi.aws.rds.IntegrationArgs;
     import com.pulumi.resources.CustomResourceOptions;
     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 Namespace("example", NamespaceArgs.builder()
                 .namespaceName("redshift-example")
                 .build());
     
             var exampleWorkgroup = new Workgroup("exampleWorkgroup", WorkgroupArgs.builder()
                 .configParameters(WorkgroupConfigParameterArgs.builder()
                     .parameterKey("enable_case_sensitive_identifier")
                     .parameterValue("true")
                     .build())
                 .namespaceName(example.namespaceName())
                 .workgroupName("example-workspace")
                 .baseCapacity(8)
                 .publiclyAccessible(false)
                 .subnetIds(            
                     example1.id(),
                     example2.id(),
                     example3.id())
                 .build());
     
             var exampleIntegration = new Integration("exampleIntegration", IntegrationArgs.builder()
                 .integrationName("example")
                 .sourceArn(exampleAwsRdsCluster.arn())
                 .targetArn(example.arn())
                 .build(), CustomResourceOptions.builder()
                     .ignoreChanges("kmsKeyId")
                     .build());
     
         }
     }
     
     
    ### Use own KMS key
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.AwsFunctions;
     import com.pulumi.aws.inputs.GetCallerIdentityArgs;
     import com.pulumi.aws.iam.IamFunctions;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs;
     import com.pulumi.aws.kms.Key;
     import com.pulumi.aws.kms.KeyArgs;
     import com.pulumi.aws.rds.Integration;
     import com.pulumi.aws.rds.IntegrationArgs;
     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) {
             final var current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder()
                 .build());
     
             final var keyPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                 .statements(            
                     GetPolicyDocumentStatementArgs.builder()
                         .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                             .type("AWS")
                             .identifiers(String.format("arn:aws:iam::%s:root", current.accountId()))
                             .build())
                         .actions("kms:*")
                         .resources("*")
                         .build(),
                     GetPolicyDocumentStatementArgs.builder()
                         .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                             .type("Service")
                             .identifiers("redshift.amazonaws.com")
                             .build())
                         .actions("kms:CreateGrant")
                         .resources("*")
                         .build())
                 .build());
     
             var example = new Key("example", KeyArgs.builder()
                 .deletionWindowInDays(10)
                 .policy(keyPolicy.json())
                 .build());
     
             var exampleIntegration = new Integration("exampleIntegration", IntegrationArgs.builder()
                 .integrationName("example")
                 .sourceArn(exampleAwsRdsCluster.arn())
                 .targetArn(exampleAwsRedshiftserverlessNamespace.arn())
                 .kmsKeyId(example.arn())
                 .additionalEncryptionContext(Map.of("example", "test"))
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required - `arn` (String) ARN of the RDS integration. Using `pulumi import`, import RDS (Relational Database) Integration using the `arn`. For example: ```sh $ pulumi import aws:rds/integration:Integration example arn:aws:rds:us-west-2:123456789012:integration:abcdefgh-0000-1111-2222-123456789012 ```
    • 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.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> additionalEncryptionContext()  
      com.pulumi.core.Output<java.lang.String> arn()  
      com.pulumi.core.Output<java.lang.String> dataFilter()  
      static Integration get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, IntegrationState 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> integrationIdentifier()  
      com.pulumi.core.Output<java.lang.String> integrationName()  
      com.pulumi.core.Output<java.lang.String> kmsKeyId()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> sourceArn()  
      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.lang.String> targetArn()  
      com.pulumi.core.Output<java.util.Optional<IntegrationTimeouts>> timeouts()  
      • 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

      • Integration

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

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

        public Integration​(java.lang.String name,
                           IntegrationArgs 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

      • additionalEncryptionContext

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> additionalEncryptionContext()
        Returns:
        Set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see the [User Guide](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context). You can only include this parameter if you specify the `kmsKeyId` parameter.
      • arn

        public com.pulumi.core.Output<java.lang.String> arn()
        Returns:
        ARN of the Integration.
      • dataFilter

        public com.pulumi.core.Output<java.lang.String> dataFilter()
        Returns:
        Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse. The value should match the syntax from the AWS CLI which includes an `include:` or `exclude:` prefix before a filter expression. Multiple expressions are separated by a comma. See the [Amazon RDS data filtering guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html) for additional details.
      • integrationIdentifier

        public com.pulumi.core.Output<java.lang.String> integrationIdentifier()
        Returns:
        Identifier of the Integration. This value can be used when creating the target database to [receive results of zero-ETL integrations](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_DATABASE.html#r_CREATE_DATABASE-integration).
      • integrationName

        public com.pulumi.core.Output<java.lang.String> integrationName()
        Returns:
        Name of the integration.
      • kmsKeyId

        public com.pulumi.core.Output<java.lang.String> kmsKeyId()
        Returns:
        KMS key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default AWS owned key. If you use the default AWS owned key, you should ignore `kmsKeyId` parameter by using `lifecycle` parameter to avoid unintended change after the first creation.
      • 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.
      • sourceArn

        public com.pulumi.core.Output<java.lang.String> sourceArn()
        Returns:
        ARN of the database to use as the source for replication.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        Key-value map of resource tags. 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:
        Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
      • targetArn

        public com.pulumi.core.Output<java.lang.String> targetArn()
        Returns:
        ARN of the Redshift data warehouse to use as the target for replication. The following arguments are optional:
      • get

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