/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ec2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.CreateSecurityGroupRequestMarshaller;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateSecurityGroupRequest extends AmazonWebServiceRequest implements Serializable, Cloneable, DryRunSupportedRequest
* A description for the security group.
*
* Constraints: Up to 255 characters in length
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
*
* The name of the security group.
*
* Constraints: Up to 255 characters in length. Cannot start with
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*
*
* The ID of the VPC. Required for a nondefault VPC.
*
* The tags to assign to the security group.
* sg-
.
*
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* * @param description * A description for the security group. *
** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$ **/ public CreateSecurityGroupRequest(String groupName, String description) { setGroupName(groupName); setDescription(description); } /** *
* A description for the security group. *
** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @param description * A description for the security group. ** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$ **/ public void setDescription(String description) { this.description = description; } /** *
* A description for the security group. *
** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @return A description for the security group. ** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$ **/ public String getDescription() { return this.description; } /** *
* A description for the security group. *
** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @param description * A description for the security group. ** Constraints: Up to 255 characters in length *
** Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityGroupRequest withDescription(String description) { setDescription(description); return this; } /** *
* The name of the security group. *
*
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @param groupName * The name of the security group. *
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$ **/ public void setGroupName(String groupName) { this.groupName = groupName; } /** *
* The name of the security group. *
*
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @return The name of the security group. *
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$ **/ public String getGroupName() { return this.groupName; } /** *
* The name of the security group. *
*
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* *
* * @param groupName * The name of the security group. *
* Constraints: Up to 255 characters in length. Cannot start with sg-
.
*
* Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityGroupRequest withGroupName(String groupName) { setGroupName(groupName); return this; } /** *
* The ID of the VPC. Required for a nondefault VPC. *
* * @param vpcId * The ID of the VPC. Required for a nondefault VPC. */ public void setVpcId(String vpcId) { this.vpcId = vpcId; } /** ** The ID of the VPC. Required for a nondefault VPC. *
* * @return The ID of the VPC. Required for a nondefault VPC. */ public String getVpcId() { return this.vpcId; } /** ** The ID of the VPC. Required for a nondefault VPC. *
* * @param vpcId * The ID of the VPC. Required for a nondefault VPC. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityGroupRequest withVpcId(String vpcId) { setVpcId(vpcId); return this; } /** ** The tags to assign to the security group. *
* * @return The tags to assign to the security group. */ public java.util.List* The tags to assign to the security group. *
* * @param tagSpecifications * The tags to assign to the security group. */ public void setTagSpecifications(java.util.Collection* The tags to assign to the security group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTagSpecifications(java.util.Collection)} or {@link #withTagSpecifications(java.util.Collection)} if * you want to override the existing values. *
* * @param tagSpecifications * The tags to assign to the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityGroupRequest withTagSpecifications(TagSpecification... tagSpecifications) { if (this.tagSpecifications == null) { setTagSpecifications(new com.amazonaws.internal.SdkInternalList* The tags to assign to the security group. *
* * @param tagSpecifications * The tags to assign to the security group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateSecurityGroupRequest withTagSpecifications(java.util.Collection