All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.rds.Integration Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

There is a newer version: 6.72.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.rds;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.rds.IntegrationArgs;
import com.pulumi.aws.rds.inputs.IntegrationState;
import com.pulumi.aws.rds.outputs.IntegrationTimeouts;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * 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
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 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 Namespace("example", NamespaceArgs.builder()
 *             .namespaceName("redshift-example")
 *             .build());
 * 
 *         var exampleWorkgroup = new Workgroup("exampleWorkgroup", WorkgroupArgs.builder()
 *             .namespaceName(example.namespaceName())
 *             .workgroupName("example-workspace")
 *             .baseCapacity(8)
 *             .publiclyAccessible(false)
 *             .subnetIds(            
 *                 example1.id(),
 *                 example2.id(),
 *                 example3.id())
 *             .configParameters(WorkgroupConfigParameterArgs.builder()
 *                 .parameterKey("enable_case_sensitive_identifier")
 *                 .parameterValue("true")
 *                 .build())
 *             .build());
 * 
 *         var exampleIntegration = new Integration("exampleIntegration", IntegrationArgs.builder()
 *             .integrationName("example")
 *             .sourceArn(exampleAwsRdsCluster.arn())
 *             .targetArn(example.arn())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Use own KMS key * * <!--Start PulumiCodeChooser --> *
 * {@code
 * 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.kms.Key;
 * import com.pulumi.aws.kms.KeyArgs;
 * import com.pulumi.aws.rds.Integration;
 * import com.pulumi.aws.rds.IntegrationArgs;
 * 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) {
 *         final var current = AwsFunctions.getCallerIdentity();
 * 
 *         final var keyPolicy = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
 *             .statements(            
 *                 GetPolicyDocumentStatementArgs.builder()
 *                     .actions("kms:*")
 *                     .resources("*")
 *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
 *                         .type("AWS")
 *                         .identifiers(String.format("arn:aws:iam::%s:root", current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId())))
 *                         .build())
 *                     .build(),
 *                 GetPolicyDocumentStatementArgs.builder()
 *                     .actions("kms:CreateGrant")
 *                     .resources("*")
 *                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
 *                         .type("Service")
 *                         .identifiers("redshift.amazonaws.com")
 *                         .build())
 *                     .build())
 *             .build());
 * 
 *         var example = new Key("example", KeyArgs.builder()
 *             .deletionWindowInDays(10)
 *             .policy(keyPolicy.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.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());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * 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 * ``` * */ @ResourceType(type="aws:rds/integration:Integration") public class Integration extends com.pulumi.resources.CustomResource { /** * 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 `kms_key_id` parameter. * */ @Export(name="additionalEncryptionContext", refs={Map.class,String.class}, tree="[0,1,1]") private Output> additionalEncryptionContext; /** * @return 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 `kms_key_id` parameter. * */ public Output>> additionalEncryptionContext() { return Codegen.optional(this.additionalEncryptionContext); } /** * ARN of the Integration. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return ARN of the Integration. * */ public Output arn() { return this.arn; } /** * Name of the integration. * */ @Export(name="integrationName", refs={String.class}, tree="[0]") private Output integrationName; /** * @return Name of the integration. * */ public Output integrationName() { return this.integrationName; } /** * 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 `kms_key_id` parameter by using `lifecycle` parameter to avoid unintended change after the first creation. * */ @Export(name="kmsKeyId", refs={String.class}, tree="[0]") private Output kmsKeyId; /** * @return 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 `kms_key_id` parameter by using `lifecycle` parameter to avoid unintended change after the first creation. * */ public Output kmsKeyId() { return this.kmsKeyId; } /** * ARN of the database to use as the source for replication. * */ @Export(name="sourceArn", refs={String.class}, tree="[0]") private Output sourceArn; /** * @return ARN of the database to use as the source for replication. * */ public Output sourceArn() { return this.sourceArn; } /** * Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * * @deprecated * Please use `tags` instead. * */ @Deprecated /* Please use `tags` instead. */ @Export(name="tagsAll", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tagsAll; /** * @return A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block. * */ public Output> tagsAll() { return this.tagsAll; } /** * ARN of the Redshift data warehouse to use as the target for replication. * * The following arguments are optional: * */ @Export(name="targetArn", refs={String.class}, tree="[0]") private Output targetArn; /** * @return ARN of the Redshift data warehouse to use as the target for replication. * * The following arguments are optional: * */ public Output targetArn() { return this.targetArn; } @Export(name="timeouts", refs={IntegrationTimeouts.class}, tree="[0]") private Output timeouts; public Output> timeouts() { return Codegen.optional(this.timeouts); } /** * * @param name The _unique_ name of the resulting resource. */ public Integration(java.lang.String name) { this(name, IntegrationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Integration(java.lang.String name, IntegrationArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public Integration(java.lang.String name, IntegrationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:rds/integration:Integration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Integration(java.lang.String name, Output id, @Nullable IntegrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:rds/integration:Integration", name, state, makeResourceOptions(options, id), false); } private static IntegrationArgs makeArgs(IntegrationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? IntegrationArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static Integration get(java.lang.String name, Output id, @Nullable IntegrationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Integration(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy