com.pulumi.aws.ec2.kotlin.VpcBlockPublicAccessOptionsArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2.kotlin
import com.pulumi.aws.ec2.VpcBlockPublicAccessOptionsArgs.builder
import com.pulumi.aws.ec2.kotlin.inputs.VpcBlockPublicAccessOptionsTimeoutsArgs
import com.pulumi.aws.ec2.kotlin.inputs.VpcBlockPublicAccessOptionsTimeoutsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Resource for managing an AWS VPC Block Public Access Options.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2.VpcBlockPublicAccessOptions("example", {internetGatewayBlockMode: "block-bidirectional"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2.VpcBlockPublicAccessOptions("example", internet_gateway_block_mode="block-bidirectional")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2.VpcBlockPublicAccessOptions("example", new()
* {
* InternetGatewayBlockMode = "block-bidirectional",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2.NewVpcBlockPublicAccessOptions(ctx, "example", &ec2.VpcBlockPublicAccessOptionsArgs{
* InternetGatewayBlockMode: pulumi.String("block-bidirectional"),
* })
* 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.ec2.VpcBlockPublicAccessOptions;
* import com.pulumi.aws.ec2.VpcBlockPublicAccessOptionsArgs;
* 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 VpcBlockPublicAccessOptions("example", VpcBlockPublicAccessOptionsArgs.builder()
* .internetGatewayBlockMode("block-bidirectional")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2:VpcBlockPublicAccessOptions
* properties:
* internetGatewayBlockMode: block-bidirectional
* ```
*
* ## Import
* Using `pulumi import`, import VPC Block Public Access Options using the `aws_region`. For example:
* ```sh
* $ pulumi import aws:ec2/vpcBlockPublicAccessOptions:VpcBlockPublicAccessOptions example us-east-1
* ```
* @property internetGatewayBlockMode Block mode. Needs to be one of `block-bidirectional`, `block-ingress`, `off`. If this resource is deleted, then this value will be set to `off` in the AWS account and region.
* @property timeouts
*/
public data class VpcBlockPublicAccessOptionsArgs(
public val internetGatewayBlockMode: Output? = null,
public val timeouts: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.ec2.VpcBlockPublicAccessOptionsArgs =
com.pulumi.aws.ec2.VpcBlockPublicAccessOptionsArgs.builder()
.internetGatewayBlockMode(internetGatewayBlockMode?.applyValue({ args0 -> args0 }))
.timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [VpcBlockPublicAccessOptionsArgs].
*/
@PulumiTagMarker
public class VpcBlockPublicAccessOptionsArgsBuilder internal constructor() {
private var internetGatewayBlockMode: Output? = null
private var timeouts: Output? = null
/**
* @param value Block mode. Needs to be one of `block-bidirectional`, `block-ingress`, `off`. If this resource is deleted, then this value will be set to `off` in the AWS account and region.
*/
@JvmName("tifnkeqcgickespn")
public suspend fun internetGatewayBlockMode(`value`: Output) {
this.internetGatewayBlockMode = value
}
/**
* @param value
*/
@JvmName("plwkpqpdgpxrskwy")
public suspend fun timeouts(`value`: Output) {
this.timeouts = value
}
/**
* @param value Block mode. Needs to be one of `block-bidirectional`, `block-ingress`, `off`. If this resource is deleted, then this value will be set to `off` in the AWS account and region.
*/
@JvmName("kieyeriejjocacax")
public suspend fun internetGatewayBlockMode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.internetGatewayBlockMode = mapped
}
/**
* @param value
*/
@JvmName("fcthnipmwilaydpj")
public suspend fun timeouts(`value`: VpcBlockPublicAccessOptionsTimeoutsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeouts = mapped
}
/**
* @param argument
*/
@JvmName("ackluvoufvltysna")
public suspend fun timeouts(argument: suspend VpcBlockPublicAccessOptionsTimeoutsArgsBuilder.() -> Unit) {
val toBeMapped = VpcBlockPublicAccessOptionsTimeoutsArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.timeouts = mapped
}
internal fun build(): VpcBlockPublicAccessOptionsArgs = VpcBlockPublicAccessOptionsArgs(
internetGatewayBlockMode = internetGatewayBlockMode,
timeouts = timeouts,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy