AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateSecurityGroupInput

import "github.com/aws/aws-sdk-go/service/ec2"

type CreateSecurityGroupInput struct { Description *string `locationName:"GroupDescription" type:"string" required:"true"` DryRun *bool `locationName:"dryRun" type:"boolean"` GroupName *string `type:"string" required:"true"` VpcId *string `type:"string"` }

Description

Type: *string

A description for the security group. This is informational only.

Constraints: Up to 255 characters in length

Constraints for EC2-Classic: ASCII characters

Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

Description is a required field

DryRun

Type: *bool

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

GroupName

Type: *string

The name of the security group.

Constraints: Up to 255 characters in length. Cannot start with sg-.

Constraints for EC2-Classic: ASCII characters

Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$*

GroupName is a required field

VpcId

Type: *string

[EC2-VPC] The ID of the VPC. Required for EC2-VPC.

Method

GoString

func (s CreateSecurityGroupInput) GoString() string

GoString returns the string representation

SetDescription

func (s *CreateSecurityGroupInput) SetDescription(v string) *CreateSecurityGroupInput

SetDescription sets the Description field's value.

SetDryRun

func (s *CreateSecurityGroupInput) SetDryRun(v bool) *CreateSecurityGroupInput

SetDryRun sets the DryRun field's value.

SetGroupName

func (s *CreateSecurityGroupInput) SetGroupName(v string) *CreateSecurityGroupInput

SetGroupName sets the GroupName field's value.

SetVpcId

func (s *CreateSecurityGroupInput) SetVpcId(v string) *CreateSecurityGroupInput

SetVpcId sets the VpcId field's value.

String

func (s CreateSecurityGroupInput) String() string

String returns the string representation

Validate

func (s *CreateSecurityGroupInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: