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

com.pulumi.aws.directconnect.GatewayAssociationProposal Maven / Gradle / Ivy

// *** 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.directconnect;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.directconnect.GatewayAssociationProposalArgs;
import com.pulumi.aws.directconnect.inputs.GatewayAssociationProposalState;
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.List;
import javax.annotation.Nullable;

/**
 * Manages a Direct Connect Gateway Association Proposal, typically for enabling cross-account associations. For single account associations, see the `aws.directconnect.GatewayAssociation` resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.directconnect.GatewayAssociationProposal;
 * import com.pulumi.aws.directconnect.GatewayAssociationProposalArgs;
 * 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 GatewayAssociationProposal("example", GatewayAssociationProposalArgs.builder()
 *             .dxGatewayId(exampleAwsDxGateway.id())
 *             .dxGatewayOwnerAccountId(exampleAwsDxGateway.ownerAccountId())
 *             .associatedGatewayId(exampleAwsVpnGateway.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`: * * __With `pulumi import`__, import Direct Connect Gateway Association Proposals using either a proposal ID or proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`. For example: * * Using a proposal ID: * * ```sh * $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe * ``` * Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by `/`: * * ```sh * $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe/abcd1234-dcba-5678-be23-cdef9876ab45/vgw-12345678 * ``` * The latter case is useful when a previous proposal has been accepted and deleted by AWS. * The `aws_dx_gateway_association_proposal` resource will then represent a pseudo-proposal for the same Direct Connect Gateway and associated gateway. If no previous proposal is available, use a tool like [`uuidgen`](http://manpages.ubuntu.com/manpages/bionic/man1/uuidgen.1.html) to generate a new random pseudo-proposal ID. * */ @ResourceType(type="aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal") public class GatewayAssociationProposal extends com.pulumi.resources.CustomResource { /** * VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured. * */ @Export(name="allowedPrefixes", refs={List.class,String.class}, tree="[0,1]") private Output> allowedPrefixes; /** * @return VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured. * */ public Output> allowedPrefixes() { return this.allowedPrefixes; } /** * The ID of the VGW or transit gateway with which to associate the Direct Connect gateway. * */ @Export(name="associatedGatewayId", refs={String.class}, tree="[0]") private Output associatedGatewayId; /** * @return The ID of the VGW or transit gateway with which to associate the Direct Connect gateway. * */ public Output associatedGatewayId() { return this.associatedGatewayId; } /** * The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway. * */ @Export(name="associatedGatewayOwnerAccountId", refs={String.class}, tree="[0]") private Output associatedGatewayOwnerAccountId; /** * @return The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway. * */ public Output associatedGatewayOwnerAccountId() { return this.associatedGatewayOwnerAccountId; } /** * The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`. * */ @Export(name="associatedGatewayType", refs={String.class}, tree="[0]") private Output associatedGatewayType; /** * @return The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`. * */ public Output associatedGatewayType() { return this.associatedGatewayType; } /** * Direct Connect Gateway identifier. * */ @Export(name="dxGatewayId", refs={String.class}, tree="[0]") private Output dxGatewayId; /** * @return Direct Connect Gateway identifier. * */ public Output dxGatewayId() { return this.dxGatewayId; } /** * AWS Account identifier of the Direct Connect Gateway's owner. * */ @Export(name="dxGatewayOwnerAccountId", refs={String.class}, tree="[0]") private Output dxGatewayOwnerAccountId; /** * @return AWS Account identifier of the Direct Connect Gateway's owner. * */ public Output dxGatewayOwnerAccountId() { return this.dxGatewayOwnerAccountId; } /** * * @param name The _unique_ name of the resulting resource. */ public GatewayAssociationProposal(java.lang.String name) { this(name, GatewayAssociationProposalArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public GatewayAssociationProposal(java.lang.String name, GatewayAssociationProposalArgs 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 GatewayAssociationProposal(java.lang.String name, GatewayAssociationProposalArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private GatewayAssociationProposal(java.lang.String name, Output id, @Nullable GatewayAssociationProposalState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal", name, state, makeResourceOptions(options, id), false); } private static GatewayAssociationProposalArgs makeArgs(GatewayAssociationProposalArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? GatewayAssociationProposalArgs.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 GatewayAssociationProposal get(java.lang.String name, Output id, @Nullable GatewayAssociationProposalState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new GatewayAssociationProposal(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy