com.pulumi.aws.networkmanager.ConnectAttachment 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.networkmanager;
import com.pulumi.aws.Utilities;
import com.pulumi.aws.networkmanager.ConnectAttachmentArgs;
import com.pulumi.aws.networkmanager.inputs.ConnectAttachmentState;
import com.pulumi.aws.networkmanager.outputs.ConnectAttachmentOptions;
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.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Resource for managing an AWS Network Manager ConnectAttachment.
*
* ## 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.networkmanager.VpcAttachment;
* import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
* import com.pulumi.aws.networkmanager.ConnectAttachment;
* import com.pulumi.aws.networkmanager.ConnectAttachmentArgs;
* import com.pulumi.aws.networkmanager.inputs.ConnectAttachmentOptionsArgs;
* 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 VpcAttachment("example", VpcAttachmentArgs.builder()
* .subnetArns(exampleAwsSubnet.stream().map(element -> element.arn()).collect(toList()))
* .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
* .vpcArn(exampleAwsVpc.arn())
* .build());
*
* var exampleConnectAttachment = new ConnectAttachment("exampleConnectAttachment", ConnectAttachmentArgs.builder()
* .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
* .transportAttachmentId(example.id())
* .edgeLocation(example.edgeLocation())
* .options(ConnectAttachmentOptionsArgs.builder()
* .protocol("GRE")
* .build())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### Usage with attachment accepter
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkmanager.VpcAttachment;
* import com.pulumi.aws.networkmanager.VpcAttachmentArgs;
* import com.pulumi.aws.networkmanager.AttachmentAccepter;
* import com.pulumi.aws.networkmanager.AttachmentAccepterArgs;
* import com.pulumi.aws.networkmanager.ConnectAttachment;
* import com.pulumi.aws.networkmanager.ConnectAttachmentArgs;
* import com.pulumi.aws.networkmanager.inputs.ConnectAttachmentOptionsArgs;
* import com.pulumi.resources.CustomResourceOptions;
* 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 VpcAttachment("example", VpcAttachmentArgs.builder()
* .subnetArns(exampleAwsSubnet.stream().map(element -> element.arn()).collect(toList()))
* .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
* .vpcArn(exampleAwsVpc.arn())
* .build());
*
* var exampleAttachmentAccepter = new AttachmentAccepter("exampleAttachmentAccepter", AttachmentAccepterArgs.builder()
* .attachmentId(example.id())
* .attachmentType(example.attachmentType())
* .build());
*
* var exampleConnectAttachment = new ConnectAttachment("exampleConnectAttachment", ConnectAttachmentArgs.builder()
* .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
* .transportAttachmentId(example.id())
* .edgeLocation(example.edgeLocation())
* .options(ConnectAttachmentOptionsArgs.builder()
* .protocol("GRE")
* .build())
* .build(), CustomResourceOptions.builder()
* .dependsOn(test)
* .build());
*
* var example2 = new AttachmentAccepter("example2", AttachmentAccepterArgs.builder()
* .attachmentId(exampleConnectAttachment.id())
* .attachmentType(exampleConnectAttachment.attachmentType())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Using `pulumi import`, import `aws_networkmanager_connect_attachment` using the attachment ID. For example:
*
* ```sh
* $ pulumi import aws:networkmanager/connectAttachment:ConnectAttachment example attachment-0f8fa60d2238d1bd8
* ```
*
*/
@ResourceType(type="aws:networkmanager/connectAttachment:ConnectAttachment")
public class ConnectAttachment extends com.pulumi.resources.CustomResource {
/**
* The ARN of the attachment.
*
*/
@Export(name="arn", refs={String.class}, tree="[0]")
private Output arn;
/**
* @return The ARN of the attachment.
*
*/
public Output arn() {
return this.arn;
}
@Export(name="attachmentId", refs={String.class}, tree="[0]")
private Output attachmentId;
public Output attachmentId() {
return this.attachmentId;
}
/**
* The policy rule number associated with the attachment.
*
*/
@Export(name="attachmentPolicyRuleNumber", refs={Integer.class}, tree="[0]")
private Output attachmentPolicyRuleNumber;
/**
* @return The policy rule number associated with the attachment.
*
*/
public Output attachmentPolicyRuleNumber() {
return this.attachmentPolicyRuleNumber;
}
/**
* The type of attachment.
*
*/
@Export(name="attachmentType", refs={String.class}, tree="[0]")
private Output attachmentType;
/**
* @return The type of attachment.
*
*/
public Output attachmentType() {
return this.attachmentType;
}
/**
* The ARN of a core network.
*
*/
@Export(name="coreNetworkArn", refs={String.class}, tree="[0]")
private Output coreNetworkArn;
/**
* @return The ARN of a core network.
*
*/
public Output coreNetworkArn() {
return this.coreNetworkArn;
}
/**
* The ID of a core network where you want to create the attachment.
*
*/
@Export(name="coreNetworkId", refs={String.class}, tree="[0]")
private Output coreNetworkId;
/**
* @return The ID of a core network where you want to create the attachment.
*
*/
public Output coreNetworkId() {
return this.coreNetworkId;
}
/**
* The Region where the edge is located.
*
*/
@Export(name="edgeLocation", refs={String.class}, tree="[0]")
private Output edgeLocation;
/**
* @return The Region where the edge is located.
*
*/
public Output edgeLocation() {
return this.edgeLocation;
}
/**
* Options block. See options for more information.
*
* The following arguments are optional:
*
*/
@Export(name="options", refs={ConnectAttachmentOptions.class}, tree="[0]")
private Output options;
/**
* @return Options block. See options for more information.
*
* The following arguments are optional:
*
*/
public Output options() {
return this.options;
}
/**
* The ID of the attachment account owner.
*
*/
@Export(name="ownerAccountId", refs={String.class}, tree="[0]")
private Output ownerAccountId;
/**
* @return The ID of the attachment account owner.
*
*/
public Output ownerAccountId() {
return this.ownerAccountId;
}
/**
* The attachment resource ARN.
*
*/
@Export(name="resourceArn", refs={String.class}, tree="[0]")
private Output resourceArn;
/**
* @return The attachment resource ARN.
*
*/
public Output resourceArn() {
return this.resourceArn;
}
/**
* The name of the segment attachment.
*
*/
@Export(name="segmentName", refs={String.class}, tree="[0]")
private Output segmentName;
/**
* @return The name of the segment attachment.
*
*/
public Output segmentName() {
return this.segmentName;
}
/**
* The state of the attachment.
*
*/
@Export(name="state", refs={String.class}, tree="[0]")
private Output state;
/**
* @return The state of the attachment.
*
*/
public Output state() {
return this.state;
}
/**
* Key-value tags for the attachment. 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* @Nullable */ Map> tags;
/**
* @return Key-value tags for the attachment. 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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy