com.pulumi.aws.quicksight.kotlin.VpcConnectionArgs.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.quicksight.kotlin
import com.pulumi.aws.quicksight.VpcConnectionArgs.builder
import com.pulumi.aws.quicksight.kotlin.inputs.VpcConnectionTimeoutsArgs
import com.pulumi.aws.quicksight.kotlin.inputs.VpcConnectionTimeoutsArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Resource for managing an AWS QuickSight VPC Connection.
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const vpcConnectionRole = new aws.iam.Role("vpc_connection_role", {
* assumeRolePolicy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Effect: "Allow",
* Action: "sts:AssumeRole",
* Principal: {
* Service: "quicksight.amazonaws.com",
* },
* }],
* }),
* inlinePolicies: [{
* name: "QuickSightVPCConnectionRolePolicy",
* policy: JSON.stringify({
* Version: "2012-10-17",
* Statement: [{
* Effect: "Allow",
* Action: [
* "ec2:CreateNetworkInterface",
* "ec2:ModifyNetworkInterfaceAttribute",
* "ec2:DeleteNetworkInterface",
* "ec2:DescribeSubnets",
* "ec2:DescribeSecurityGroups",
* ],
* Resource: ["*"],
* }],
* }),
* }],
* });
* const example = new aws.quicksight.VpcConnection("example", {
* vpcConnectionId: "example-connection-id",
* name: "Example Connection",
* roleArn: vpcConnectionRole.arn,
* securityGroupIds: ["sg-00000000000000000"],
* subnetIds: [
* "subnet-00000000000000000",
* "subnet-00000000000000001",
* ],
* });
* ```
* ```python
* import pulumi
* import json
* import pulumi_aws as aws
* vpc_connection_role = aws.iam.Role("vpc_connection_role",
* assume_role_policy=json.dumps({
* "Version": "2012-10-17",
* "Statement": [{
* "Effect": "Allow",
* "Action": "sts:AssumeRole",
* "Principal": {
* "Service": "quicksight.amazonaws.com",
* },
* }],
* }),
* inline_policies=[{
* "name": "QuickSightVPCConnectionRolePolicy",
* "policy": json.dumps({
* "Version": "2012-10-17",
* "Statement": [{
* "Effect": "Allow",
* "Action": [
* "ec2:CreateNetworkInterface",
* "ec2:ModifyNetworkInterfaceAttribute",
* "ec2:DeleteNetworkInterface",
* "ec2:DescribeSubnets",
* "ec2:DescribeSecurityGroups",
* ],
* "Resource": ["*"],
* }],
* }),
* }])
* example = aws.quicksight.VpcConnection("example",
* vpc_connection_id="example-connection-id",
* name="Example Connection",
* role_arn=vpc_connection_role.arn,
* security_group_ids=["sg-00000000000000000"],
* subnet_ids=[
* "subnet-00000000000000000",
* "subnet-00000000000000001",
* ])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using System.Text.Json;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var vpcConnectionRole = new Aws.Iam.Role("vpc_connection_role", new()
* {
* AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary
* {
* ["Version"] = "2012-10-17",
* ["Statement"] = new[]
* {
* new Dictionary
* {
* ["Effect"] = "Allow",
* ["Action"] = "sts:AssumeRole",
* ["Principal"] = new Dictionary
* {
* ["Service"] = "quicksight.amazonaws.com",
* },
* },
* },
* }),
* InlinePolicies = new[]
* {
* new Aws.Iam.Inputs.RoleInlinePolicyArgs
* {
* Name = "QuickSightVPCConnectionRolePolicy",
* Policy = JsonSerializer.Serialize(new Dictionary
* {
* ["Version"] = "2012-10-17",
* ["Statement"] = new[]
* {
* new Dictionary
* {
* ["Effect"] = "Allow",
* ["Action"] = new[]
* {
* "ec2:CreateNetworkInterface",
* "ec2:ModifyNetworkInterfaceAttribute",
* "ec2:DeleteNetworkInterface",
* "ec2:DescribeSubnets",
* "ec2:DescribeSecurityGroups",
* },
* ["Resource"] = new[]
* {
* "*",
* },
* },
* },
* }),
* },
* },
* });
* var example = new Aws.Quicksight.VpcConnection("example", new()
* {
* VpcConnectionId = "example-connection-id",
* Name = "Example Connection",
* RoleArn = vpcConnectionRole.Arn,
* SecurityGroupIds = new[]
* {
* "sg-00000000000000000",
* },
* SubnetIds = new[]
* {
* "subnet-00000000000000000",
* "subnet-00000000000000001",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "encoding/json"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/quicksight"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* tmpJSON0, err := json.Marshal(map[string]interface{}{
* "Version": "2012-10-17",
* "Statement": []map[string]interface{}{
* map[string]interface{}{
* "Effect": "Allow",
* "Action": "sts:AssumeRole",
* "Principal": map[string]interface{}{
* "Service": "quicksight.amazonaws.com",
* },
* },
* },
* })
* if err != nil {
* return err
* }
* json0 := string(tmpJSON0)
* tmpJSON1, err := json.Marshal(map[string]interface{}{
* "Version": "2012-10-17",
* "Statement": []map[string]interface{}{
* map[string]interface{}{
* "Effect": "Allow",
* "Action": []string{
* "ec2:CreateNetworkInterface",
* "ec2:ModifyNetworkInterfaceAttribute",
* "ec2:DeleteNetworkInterface",
* "ec2:DescribeSubnets",
* "ec2:DescribeSecurityGroups",
* },
* "Resource": []string{
* "*",
* },
* },
* },
* })
* if err != nil {
* return err
* }
* json1 := string(tmpJSON1)
* vpcConnectionRole, err := iam.NewRole(ctx, "vpc_connection_role", &iam.RoleArgs{
* AssumeRolePolicy: pulumi.String(json0),
* InlinePolicies: iam.RoleInlinePolicyArray{
* &iam.RoleInlinePolicyArgs{
* Name: pulumi.String("QuickSightVPCConnectionRolePolicy"),
* Policy: pulumi.String(json1),
* },
* },
* })
* if err != nil {
* return err
* }
* _, err = quicksight.NewVpcConnection(ctx, "example", &quicksight.VpcConnectionArgs{
* VpcConnectionId: pulumi.String("example-connection-id"),
* Name: pulumi.String("Example Connection"),
* RoleArn: vpcConnectionRole.Arn,
* SecurityGroupIds: pulumi.StringArray{
* pulumi.String("sg-00000000000000000"),
* },
* SubnetIds: pulumi.StringArray{
* pulumi.String("subnet-00000000000000000"),
* pulumi.String("subnet-00000000000000001"),
* },
* })
* 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.iam.Role;
* import com.pulumi.aws.iam.RoleArgs;
* import com.pulumi.aws.iam.inputs.RoleInlinePolicyArgs;
* import com.pulumi.aws.quicksight.VpcConnection;
* import com.pulumi.aws.quicksight.VpcConnectionArgs;
* import static com.pulumi.codegen.internal.Serialization.*;
* 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 vpcConnectionRole = new Role("vpcConnectionRole", RoleArgs.builder()
* .assumeRolePolicy(serializeJson(
* jsonObject(
* jsonProperty("Version", "2012-10-17"),
* jsonProperty("Statement", jsonArray(jsonObject(
* jsonProperty("Effect", "Allow"),
* jsonProperty("Action", "sts:AssumeRole"),
* jsonProperty("Principal", jsonObject(
* jsonProperty("Service", "quicksight.amazonaws.com")
* ))
* )))
* )))
* .inlinePolicies(RoleInlinePolicyArgs.builder()
* .name("QuickSightVPCConnectionRolePolicy")
* .policy(serializeJson(
* jsonObject(
* jsonProperty("Version", "2012-10-17"),
* jsonProperty("Statement", jsonArray(jsonObject(
* jsonProperty("Effect", "Allow"),
* jsonProperty("Action", jsonArray(
* "ec2:CreateNetworkInterface",
* "ec2:ModifyNetworkInterfaceAttribute",
* "ec2:DeleteNetworkInterface",
* "ec2:DescribeSubnets",
* "ec2:DescribeSecurityGroups"
* )),
* jsonProperty("Resource", jsonArray("*"))
* )))
* )))
* .build())
* .build());
* var example = new VpcConnection("example", VpcConnectionArgs.builder()
* .vpcConnectionId("example-connection-id")
* .name("Example Connection")
* .roleArn(vpcConnectionRole.arn())
* .securityGroupIds("sg-00000000000000000")
* .subnetIds(
* "subnet-00000000000000000",
* "subnet-00000000000000001")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* vpcConnectionRole:
* type: aws:iam:Role
* name: vpc_connection_role
* properties:
* assumeRolePolicy:
* fn::toJSON:
* Version: 2012-10-17
* Statement:
* - Effect: Allow
* Action: sts:AssumeRole
* Principal:
* Service: quicksight.amazonaws.com
* inlinePolicies:
* - name: QuickSightVPCConnectionRolePolicy
* policy:
* fn::toJSON:
* Version: 2012-10-17
* Statement:
* - Effect: Allow
* Action:
* - ec2:CreateNetworkInterface
* - ec2:ModifyNetworkInterfaceAttribute
* - ec2:DeleteNetworkInterface
* - ec2:DescribeSubnets
* - ec2:DescribeSecurityGroups
* Resource:
* - '*'
* example:
* type: aws:quicksight:VpcConnection
* properties:
* vpcConnectionId: example-connection-id
* name: Example Connection
* roleArn: ${vpcConnectionRole.arn}
* securityGroupIds:
* - sg-00000000000000000
* subnetIds:
* - subnet-00000000000000000
* - subnet-00000000000000001
* ```
*
* ## Import
* Using `pulumi import`, import QuickSight VPC connection using the AWS account ID and VPC connection ID separated by commas (`,`). For example:
* ```sh
* $ pulumi import aws:quicksight/vpcConnection:VpcConnection example 123456789012,example
* ```
* @property awsAccountId AWS account ID.
* @property dnsResolvers A list of IP addresses of DNS resolver endpoints for the VPC connection.
* @property name The display name for the VPC connection.
* @property roleArn The IAM role to associate with the VPC connection.
* @property securityGroupIds A list of security group IDs for the VPC connection.
* @property subnetIds A list of subnet IDs for the VPC connection.
* The following arguments are optional:
* @property tags 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.
* @property timeouts
* @property vpcConnectionId The ID of the VPC connection.
*/
public data class VpcConnectionArgs(
public val awsAccountId: Output? = null,
public val dnsResolvers: Output>? = null,
public val name: Output? = null,
public val roleArn: Output? = null,
public val securityGroupIds: Output>? = null,
public val subnetIds: Output>? = null,
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy