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.

CreateFlowLogsInput

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

type CreateFlowLogsInput struct { ClientToken *string `type:"string"` DeliverLogsPermissionArn *string `type:"string"` DryRun *bool `type:"boolean"` LogDestination *string `type:"string"` LogDestinationType *string `type:"string" enum:"LogDestinationType"` LogGroupName *string `type:"string"` ResourceIds []*string `locationName:"ResourceId" locationNameList:"item" type:"list" required:"true"` ResourceType *string `type:"string" required:"true" enum:"FlowLogsResourceType"` TrafficType *string `type:"string" required:"true" enum:"TrafficType"` }

ClientToken

Type: *string

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).

DeliverLogsPermissionArn

Type: *string

The ARN for the IAM role that's used to post flow logs to a log group.

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.

LogDestination

Type: *string

Specifies the destination to which the flow log data is to be published. Flow log data can be published to an CloudWatch Logs log group or an Amazon S3 bucket. The value specified for this parameter depends on the value specified for LogDestinationType.

If LogDestinationType is not specified or cloud-watch-logs, specify the Amazon Resource Name (ARN) of the CloudWatch Logs log group.

If LogDestinationType is s3, specify the ARN of the Amazon S3 bucket. You can also specify a subfolder in the bucket. To specify a subfolder in the bucket, use the following ARN format: bucket_ARN/subfolder_name/. For example, to specify a subfolder named my-logs in a bucket named my-bucket, use the following ARN: arn:aws:s3:::my-bucket/my-logs/. You cannot use AWSLogs as a subfolder name. This is a reserved term.

LogDestinationType

Type: *string

Specifies the type of destination to which the flow log data is to be published. Flow log data can be published to CloudWatch Logs or Amazon S3. To publish flow log data to CloudWatch Logs, specify cloud-watch-logs. To publish flow log data to Amazon S3, specify s3.

Default: cloud-watch-logs

LogGroupName

Type: *string

The name of the log group.

ResourceIds

Type: []*string

One or more subnet, network interface, or VPC IDs.

Constraints: Maximum of 1000 resources

ResourceIds is a required field

ResourceType

Type: *string

The type of resource on which to create the flow log.

ResourceType is a required field

TrafficType

Type: *string

The type of traffic to log.

TrafficType is a required field

Method

GoString

func (s CreateFlowLogsInput) GoString() string

GoString returns the string representation

SetClientToken

func (s *CreateFlowLogsInput) SetClientToken(v string) *CreateFlowLogsInput

SetClientToken sets the ClientToken field's value.

SetDeliverLogsPermissionArn

func (s *CreateFlowLogsInput) SetDeliverLogsPermissionArn(v string) *CreateFlowLogsInput

SetDeliverLogsPermissionArn sets the DeliverLogsPermissionArn field's value.

SetDryRun

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

SetDryRun sets the DryRun field's value.

SetLogDestination

func (s *CreateFlowLogsInput) SetLogDestination(v string) *CreateFlowLogsInput

SetLogDestination sets the LogDestination field's value.

SetLogDestinationType

func (s *CreateFlowLogsInput) SetLogDestinationType(v string) *CreateFlowLogsInput

SetLogDestinationType sets the LogDestinationType field's value.

SetLogGroupName

func (s *CreateFlowLogsInput) SetLogGroupName(v string) *CreateFlowLogsInput

SetLogGroupName sets the LogGroupName field's value.

SetResourceIds

func (s *CreateFlowLogsInput) SetResourceIds(v []*string) *CreateFlowLogsInput

SetResourceIds sets the ResourceIds field's value.

SetResourceType

func (s *CreateFlowLogsInput) SetResourceType(v string) *CreateFlowLogsInput

SetResourceType sets the ResourceType field's value.

SetTrafficType

func (s *CreateFlowLogsInput) SetTrafficType(v string) *CreateFlowLogsInput

SetTrafficType sets the TrafficType field's value.

String

func (s CreateFlowLogsInput) String() string

String returns the string representation

Validate

func (s *CreateFlowLogsInput) Validate() error

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

On this page: