All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.networkmanager.kotlin.AttachmentAccepter.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.networkmanager.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [AttachmentAccepter].
*/
@PulumiTagMarker
public class AttachmentAccepterResourceBuilder internal constructor() {
public var name: String? = null
public var args: AttachmentAccepterArgs = AttachmentAccepterArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend AttachmentAccepterArgsBuilder.() -> Unit) {
val builder = AttachmentAccepterArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): AttachmentAccepter {
val builtJavaResource =
com.pulumi.aws.networkmanager.AttachmentAccepter(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return AttachmentAccepter(builtJavaResource)
}
}
/**
* Resource for managing an AWS Network Manager Attachment Accepter.
* ## Example Usage
* ### Example with VPC attachment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.networkmanager.AttachmentAccepter("test", {
* attachmentId: vpc.id,
* attachmentType: vpc.attachmentType,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.networkmanager.AttachmentAccepter("test",
* attachment_id=vpc["id"],
* attachment_type=vpc["attachmentType"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.NetworkManager.AttachmentAccepter("test", new()
* {
* AttachmentId = vpc.Id,
* AttachmentType = vpc.AttachmentType,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networkmanager.NewAttachmentAccepter(ctx, "test", &networkmanager.AttachmentAccepterArgs{
* AttachmentId: pulumi.Any(vpc.Id),
* AttachmentType: pulumi.Any(vpc.AttachmentType),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkmanager.AttachmentAccepter;
* import com.pulumi.aws.networkmanager.AttachmentAccepterArgs;
* 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 test = new AttachmentAccepter("test", AttachmentAccepterArgs.builder()
* .attachmentId(vpc.id())
* .attachmentType(vpc.attachmentType())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:networkmanager:AttachmentAccepter
* properties:
* attachmentId: ${vpc.id}
* attachmentType: ${vpc.attachmentType}
* ```
*
* ### Example with site-to-site VPN attachment
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.networkmanager.AttachmentAccepter("test", {
* attachmentId: vpn.id,
* attachmentType: vpn.attachmentType,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.networkmanager.AttachmentAccepter("test",
* attachment_id=vpn["id"],
* attachment_type=vpn["attachmentType"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.NetworkManager.AttachmentAccepter("test", new()
* {
* AttachmentId = vpn.Id,
* AttachmentType = vpn.AttachmentType,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := networkmanager.NewAttachmentAccepter(ctx, "test", &networkmanager.AttachmentAccepterArgs{
* AttachmentId: pulumi.Any(vpn.Id),
* AttachmentType: pulumi.Any(vpn.AttachmentType),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.aws.networkmanager.AttachmentAccepter;
* import com.pulumi.aws.networkmanager.AttachmentAccepterArgs;
* 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 test = new AttachmentAccepter("test", AttachmentAccepterArgs.builder()
* .attachmentId(vpn.id())
* .attachmentType(vpn.attachmentType())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:networkmanager:AttachmentAccepter
* properties:
* attachmentId: ${vpn.id}
* attachmentType: ${vpn.attachmentType}
* ```
*
*/
public class AttachmentAccepter internal constructor(
override val javaResource: com.pulumi.aws.networkmanager.AttachmentAccepter,
) : KotlinCustomResource(javaResource, AttachmentAccepterMapper) {
/**
* The ID of the attachment.
*/
public val attachmentId: Output
get() = javaResource.attachmentId().applyValue({ args0 -> args0 })
/**
* The policy rule number associated with the attachment.
*/
public val attachmentPolicyRuleNumber: Output
get() = javaResource.attachmentPolicyRuleNumber().applyValue({ args0 -> args0 })
/**
* The type of attachment. Valid values can be found in the [AWS Documentation](https://docs.aws.amazon.com/networkmanager/latest/APIReference/API_ListAttachments.html#API_ListAttachments_RequestSyntax)
*/
public val attachmentType: Output
get() = javaResource.attachmentType().applyValue({ args0 -> args0 })
/**
* The ARN of a core network.
*/
public val coreNetworkArn: Output
get() = javaResource.coreNetworkArn().applyValue({ args0 -> args0 })
/**
* The id of a core network.
*/
public val coreNetworkId: Output
get() = javaResource.coreNetworkId().applyValue({ args0 -> args0 })
/**
* The Region where the edge is located.
*/
public val edgeLocation: Output
get() = javaResource.edgeLocation().applyValue({ args0 -> args0 })
/**
* The ID of the attachment account owner.
*/
public val ownerAccountId: Output
get() = javaResource.ownerAccountId().applyValue({ args0 -> args0 })
/**
* The attachment resource ARN.
*/
public val resourceArn: Output
get() = javaResource.resourceArn().applyValue({ args0 -> args0 })
/**
* The name of the segment attachment.
*/
public val segmentName: Output
get() = javaResource.segmentName().applyValue({ args0 -> args0 })
/**
* The state of the attachment.
*/
public val state: Output
get() = javaResource.state().applyValue({ args0 -> args0 })
}
public object AttachmentAccepterMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.networkmanager.AttachmentAccepter::class == javaResource::class
override fun map(javaResource: Resource): AttachmentAccepter = AttachmentAccepter(
javaResource as
com.pulumi.aws.networkmanager.AttachmentAccepter,
)
}
/**
* @see [AttachmentAccepter].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [AttachmentAccepter].
*/
public suspend fun attachmentAccepter(
name: String,
block: suspend AttachmentAccepterResourceBuilder.() -> Unit,
): AttachmentAccepter {
val builder = AttachmentAccepterResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [AttachmentAccepter].
* @param name The _unique_ name of the resulting resource.
*/
public fun attachmentAccepter(name: String): AttachmentAccepter {
val builder = AttachmentAccepterResourceBuilder()
builder.name(name)
return builder.build()
}