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

com.pulumi.aws.ec2.SecurityGroupAssociationArgs Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** 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.ec2;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class SecurityGroupAssociationArgs extends com.pulumi.resources.ResourceArgs {

    public static final SecurityGroupAssociationArgs Empty = new SecurityGroupAssociationArgs();

    /**
     * Whether this association should replace the association with the VPC's default security group that is created when no security groups are specified during VPC endpoint creation. At most 1 association per-VPC endpoint should be configured with `replace_default_association = true`.
     * 
     */
    @Import(name="replaceDefaultAssociation")
    private @Nullable Output replaceDefaultAssociation;

    /**
     * @return Whether this association should replace the association with the VPC's default security group that is created when no security groups are specified during VPC endpoint creation. At most 1 association per-VPC endpoint should be configured with `replace_default_association = true`.
     * 
     */
    public Optional> replaceDefaultAssociation() {
        return Optional.ofNullable(this.replaceDefaultAssociation);
    }

    /**
     * The ID of the security group to be associated with the VPC endpoint.
     * 
     */
    @Import(name="securityGroupId", required=true)
    private Output securityGroupId;

    /**
     * @return The ID of the security group to be associated with the VPC endpoint.
     * 
     */
    public Output securityGroupId() {
        return this.securityGroupId;
    }

    /**
     * The ID of the VPC endpoint with which the security group will be associated.
     * 
     */
    @Import(name="vpcEndpointId", required=true)
    private Output vpcEndpointId;

    /**
     * @return The ID of the VPC endpoint with which the security group will be associated.
     * 
     */
    public Output vpcEndpointId() {
        return this.vpcEndpointId;
    }

    private SecurityGroupAssociationArgs() {}

    private SecurityGroupAssociationArgs(SecurityGroupAssociationArgs $) {
        this.replaceDefaultAssociation = $.replaceDefaultAssociation;
        this.securityGroupId = $.securityGroupId;
        this.vpcEndpointId = $.vpcEndpointId;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SecurityGroupAssociationArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SecurityGroupAssociationArgs $;

        public Builder() {
            $ = new SecurityGroupAssociationArgs();
        }

        public Builder(SecurityGroupAssociationArgs defaults) {
            $ = new SecurityGroupAssociationArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param replaceDefaultAssociation Whether this association should replace the association with the VPC's default security group that is created when no security groups are specified during VPC endpoint creation. At most 1 association per-VPC endpoint should be configured with `replace_default_association = true`.
         * 
         * @return builder
         * 
         */
        public Builder replaceDefaultAssociation(@Nullable Output replaceDefaultAssociation) {
            $.replaceDefaultAssociation = replaceDefaultAssociation;
            return this;
        }

        /**
         * @param replaceDefaultAssociation Whether this association should replace the association with the VPC's default security group that is created when no security groups are specified during VPC endpoint creation. At most 1 association per-VPC endpoint should be configured with `replace_default_association = true`.
         * 
         * @return builder
         * 
         */
        public Builder replaceDefaultAssociation(Boolean replaceDefaultAssociation) {
            return replaceDefaultAssociation(Output.of(replaceDefaultAssociation));
        }

        /**
         * @param securityGroupId The ID of the security group to be associated with the VPC endpoint.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupId(Output securityGroupId) {
            $.securityGroupId = securityGroupId;
            return this;
        }

        /**
         * @param securityGroupId The ID of the security group to be associated with the VPC endpoint.
         * 
         * @return builder
         * 
         */
        public Builder securityGroupId(String securityGroupId) {
            return securityGroupId(Output.of(securityGroupId));
        }

        /**
         * @param vpcEndpointId The ID of the VPC endpoint with which the security group will be associated.
         * 
         * @return builder
         * 
         */
        public Builder vpcEndpointId(Output vpcEndpointId) {
            $.vpcEndpointId = vpcEndpointId;
            return this;
        }

        /**
         * @param vpcEndpointId The ID of the VPC endpoint with which the security group will be associated.
         * 
         * @return builder
         * 
         */
        public Builder vpcEndpointId(String vpcEndpointId) {
            return vpcEndpointId(Output.of(vpcEndpointId));
        }

        public SecurityGroupAssociationArgs build() {
            if ($.securityGroupId == null) {
                throw new MissingRequiredPropertyException("SecurityGroupAssociationArgs", "securityGroupId");
            }
            if ($.vpcEndpointId == null) {
                throw new MissingRequiredPropertyException("SecurityGroupAssociationArgs", "vpcEndpointId");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy