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

com.pulumi.aws.ec2.inputs.SecurityGroupState 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.ec2.inputs;

import com.pulumi.aws.ec2.inputs.SecurityGroupEgressArgs;
import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SecurityGroupState Empty = new SecurityGroupState();

    /**
     * ARN of the security group.
     * 
     */
    @Import(name="arn")
    private @Nullable Output arn;

    /**
     * @return ARN of the security group.
     * 
     */
    public Optional> arn() {
        return Optional.ofNullable(this.arn);
    }

    /**
     * Security group description. Defaults to `Managed by Pulumi`. Cannot be `""`. **NOTE**: This field maps to the AWS `GroupDescription` attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use `tags`.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Security group description. Defaults to `Managed by Pulumi`. Cannot be `""`. **NOTE**: This field maps to the AWS `GroupDescription` attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use `tags`.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
     * 
     */
    @Import(name="egress")
    private @Nullable Output> egress;

    /**
     * @return Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
     * 
     */
    public Optional>> egress() {
        return Optional.ofNullable(this.egress);
    }

    /**
     * Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
     * 
     */
    @Import(name="ingress")
    private @Nullable Output> ingress;

    /**
     * @return Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
     * 
     */
    public Optional>> ingress() {
        return Optional.ofNullable(this.ingress);
    }

    /**
     * Name of the security group. If omitted, the provider will assign a random, unique name.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return Name of the security group. If omitted, the provider will assign a random, unique name.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Creates a unique name beginning with the specified prefix. Conflicts with `name`.
     * 
     */
    @Import(name="namePrefix")
    private @Nullable Output namePrefix;

    /**
     * @return Creates a unique name beginning with the specified prefix. Conflicts with `name`.
     * 
     */
    public Optional> namePrefix() {
        return Optional.ofNullable(this.namePrefix);
    }

    /**
     * Owner ID.
     * 
     */
    @Import(name="ownerId")
    private @Nullable Output ownerId;

    /**
     * @return Owner ID.
     * 
     */
    public Optional> ownerId() {
        return Optional.ofNullable(this.ownerId);
    }

    /**
     * Instruct the provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default `false`.
     * 
     */
    @Import(name="revokeRulesOnDelete")
    private @Nullable Output revokeRulesOnDelete;

    /**
     * @return Instruct the provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default `false`.
     * 
     */
    public Optional> revokeRulesOnDelete() {
        return Optional.ofNullable(this.revokeRulesOnDelete);
    }

    /**
     * Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    @Import(name="tags")
    private @Nullable Output> tags;

    /**
     * @return Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     * 
     */
    public Optional>> tags() {
        return Optional.ofNullable(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. */
    @Import(name="tagsAll")
    private @Nullable Output> tagsAll;

    /**
     * @return 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. */
    public Optional>> tagsAll() {
        return Optional.ofNullable(this.tagsAll);
    }

    /**
     * VPC ID. Defaults to the region's default VPC.
     * 
     */
    @Import(name="vpcId")
    private @Nullable Output vpcId;

    /**
     * @return VPC ID. Defaults to the region's default VPC.
     * 
     */
    public Optional> vpcId() {
        return Optional.ofNullable(this.vpcId);
    }

    private SecurityGroupState() {}

    private SecurityGroupState(SecurityGroupState $) {
        this.arn = $.arn;
        this.description = $.description;
        this.egress = $.egress;
        this.ingress = $.ingress;
        this.name = $.name;
        this.namePrefix = $.namePrefix;
        this.ownerId = $.ownerId;
        this.revokeRulesOnDelete = $.revokeRulesOnDelete;
        this.tags = $.tags;
        this.tagsAll = $.tagsAll;
        this.vpcId = $.vpcId;
    }

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

    public static final class Builder {
        private SecurityGroupState $;

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

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

        /**
         * @param arn ARN of the security group.
         * 
         * @return builder
         * 
         */
        public Builder arn(@Nullable Output arn) {
            $.arn = arn;
            return this;
        }

        /**
         * @param arn ARN of the security group.
         * 
         * @return builder
         * 
         */
        public Builder arn(String arn) {
            return arn(Output.of(arn));
        }

        /**
         * @param description Security group description. Defaults to `Managed by Pulumi`. Cannot be `""`. **NOTE**: This field maps to the AWS `GroupDescription` attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use `tags`.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Security group description. Defaults to `Managed by Pulumi`. Cannot be `""`. **NOTE**: This field maps to the AWS `GroupDescription` attribute, for which there is no Update API. If you'd like to classify your security groups in a way that can be updated, use `tags`.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param egress Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder egress(@Nullable Output> egress) {
            $.egress = egress;
            return this;
        }

        /**
         * @param egress Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder egress(List egress) {
            return egress(Output.of(egress));
        }

        /**
         * @param egress Configuration block for egress rules. Can be specified multiple times for each egress rule. Each egress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder egress(SecurityGroupEgressArgs... egress) {
            return egress(List.of(egress));
        }

        /**
         * @param ingress Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder ingress(@Nullable Output> ingress) {
            $.ingress = ingress;
            return this;
        }

        /**
         * @param ingress Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder ingress(List ingress) {
            return ingress(Output.of(ingress));
        }

        /**
         * @param ingress Configuration block for ingress rules. Can be specified multiple times for each ingress rule. Each ingress block supports fields documented below. This argument is processed in attribute-as-blocks mode.
         * 
         * @return builder
         * 
         */
        public Builder ingress(SecurityGroupIngressArgs... ingress) {
            return ingress(List.of(ingress));
        }

        /**
         * @param name Name of the security group. If omitted, the provider will assign a random, unique name.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Name of the security group. If omitted, the provider will assign a random, unique name.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(@Nullable Output namePrefix) {
            $.namePrefix = namePrefix;
            return this;
        }

        /**
         * @param namePrefix Creates a unique name beginning with the specified prefix. Conflicts with `name`.
         * 
         * @return builder
         * 
         */
        public Builder namePrefix(String namePrefix) {
            return namePrefix(Output.of(namePrefix));
        }

        /**
         * @param ownerId Owner ID.
         * 
         * @return builder
         * 
         */
        public Builder ownerId(@Nullable Output ownerId) {
            $.ownerId = ownerId;
            return this;
        }

        /**
         * @param ownerId Owner ID.
         * 
         * @return builder
         * 
         */
        public Builder ownerId(String ownerId) {
            return ownerId(Output.of(ownerId));
        }

        /**
         * @param revokeRulesOnDelete Instruct the provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default `false`.
         * 
         * @return builder
         * 
         */
        public Builder revokeRulesOnDelete(@Nullable Output revokeRulesOnDelete) {
            $.revokeRulesOnDelete = revokeRulesOnDelete;
            return this;
        }

        /**
         * @param revokeRulesOnDelete Instruct the provider to revoke all of the Security Groups attached ingress and egress rules before deleting the rule itself. This is normally not needed, however certain AWS services such as Elastic Map Reduce may automatically add required rules to security groups used with the service, and those rules may contain a cyclic dependency that prevent the security groups from being destroyed without removing the dependency first. Default `false`.
         * 
         * @return builder
         * 
         */
        public Builder revokeRulesOnDelete(Boolean revokeRulesOnDelete) {
            return revokeRulesOnDelete(Output.of(revokeRulesOnDelete));
        }

        /**
         * @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags Map of tags to assign to the resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
         * 
         * @return builder
         * 
         * @deprecated
         * Please use `tags` instead.
         * 
         */
        @Deprecated /* Please use `tags` instead. */
        public Builder tagsAll(@Nullable Output> tagsAll) {
            $.tagsAll = tagsAll;
            return this;
        }

        /**
         * @param tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
         * 
         * @return builder
         * 
         * @deprecated
         * Please use `tags` instead.
         * 
         */
        @Deprecated /* Please use `tags` instead. */
        public Builder tagsAll(Map tagsAll) {
            return tagsAll(Output.of(tagsAll));
        }

        /**
         * @param vpcId VPC ID. Defaults to the region's default VPC.
         * 
         * @return builder
         * 
         */
        public Builder vpcId(@Nullable Output vpcId) {
            $.vpcId = vpcId;
            return this;
        }

        /**
         * @param vpcId VPC ID. Defaults to the region's default VPC.
         * 
         * @return builder
         * 
         */
        public Builder vpcId(String vpcId) {
            return vpcId(Output.of(vpcId));
        }

        public SecurityGroupState build() {
            $.description = Codegen.stringProp("description").output().arg($.description).def("Managed by Pulumi").getNullable();
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy