cloudwatchlogs

package
v1.55.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 17 Imported by: 1,231

Documentation

Overview

Package cloudwatchlogs provides the client and types for making API requests to Amazon CloudWatch Logs.

You can use Amazon CloudWatch Logs to monitor, store, and access your log files from EC2 instances, CloudTrail, and other sources. You can then retrieve the associated log data from CloudWatch Logs using the CloudWatch console. Alternatively, you can use CloudWatch Logs commands in the Amazon Web Services CLI, CloudWatch Logs API, or CloudWatch Logs SDK.

You can use CloudWatch Logs to:

  • Monitor logs from EC2 instances in real time: You can use CloudWatch Logs to monitor applications and systems using log data. For example, CloudWatch Logs can track the number of errors that occur in your application logs. Then, it can send you a notification whenever the rate of errors exceeds a threshold that you specify. CloudWatch Logs uses your log data for monitoring so no code changes are required. For example, you can monitor application logs for specific literal terms (such as "NullReferenceException"). You can also count the number of occurrences of a literal term at a particular position in log data (such as "404" status codes in an Apache access log). When the term you are searching for is found, CloudWatch Logs reports the data to a CloudWatch metric that you specify.

  • Monitor CloudTrail logged events: You can create alarms in CloudWatch and receive notifications of particular API activity as captured by CloudTrail. You can use the notification to perform troubleshooting.

  • Archive log data: You can use CloudWatch Logs to store your log data in highly durable storage. You can change the log retention setting so that any log events earlier than this setting are automatically deleted. The CloudWatch Logs agent helps to quickly send both rotated and non-rotated log data off of a host and into the log service. You can then access the raw log data when you need it.

See https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28 for more information on this service.

See cloudwatchlogs package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchlogs/

Using the Client

To contact Amazon CloudWatch Logs with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon CloudWatch Logs client CloudWatchLogs for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchlogs/#New

Index

Constants

View Source
const (
	// AnomalyDetectorStatusInitializing is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusInitializing = "INITIALIZING"

	// AnomalyDetectorStatusTraining is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusTraining = "TRAINING"

	// AnomalyDetectorStatusAnalyzing is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusAnalyzing = "ANALYZING"

	// AnomalyDetectorStatusFailed is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusFailed = "FAILED"

	// AnomalyDetectorStatusDeleted is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusDeleted = "DELETED"

	// AnomalyDetectorStatusPaused is a AnomalyDetectorStatus enum value
	AnomalyDetectorStatusPaused = "PAUSED"
)
View Source
const (
	// DataProtectionStatusActivated is a DataProtectionStatus enum value
	DataProtectionStatusActivated = "ACTIVATED"

	// DataProtectionStatusDeleted is a DataProtectionStatus enum value
	DataProtectionStatusDeleted = "DELETED"

	// DataProtectionStatusArchived is a DataProtectionStatus enum value
	DataProtectionStatusArchived = "ARCHIVED"

	// DataProtectionStatusDisabled is a DataProtectionStatus enum value
	DataProtectionStatusDisabled = "DISABLED"
)
View Source
const (
	// DeliveryDestinationTypeS3 is a DeliveryDestinationType enum value
	DeliveryDestinationTypeS3 = "S3"

	// DeliveryDestinationTypeCwl is a DeliveryDestinationType enum value
	DeliveryDestinationTypeCwl = "CWL"

	// DeliveryDestinationTypeFh is a DeliveryDestinationType enum value
	DeliveryDestinationTypeFh = "FH"
)
View Source
const (
	// DistributionRandom is a Distribution enum value
	DistributionRandom = "Random"

	// DistributionByLogStream is a Distribution enum value
	DistributionByLogStream = "ByLogStream"
)

The method used to distribute log data to the destination, which can be either random or grouped by log stream.

View Source
const (
	// EvaluationFrequencyOneMin is a EvaluationFrequency enum value
	EvaluationFrequencyOneMin = "ONE_MIN"

	// EvaluationFrequencyFiveMin is a EvaluationFrequency enum value
	EvaluationFrequencyFiveMin = "FIVE_MIN"

	// EvaluationFrequencyTenMin is a EvaluationFrequency enum value
	EvaluationFrequencyTenMin = "TEN_MIN"

	// EvaluationFrequencyFifteenMin is a EvaluationFrequency enum value
	EvaluationFrequencyFifteenMin = "FIFTEEN_MIN"

	// EvaluationFrequencyThirtyMin is a EvaluationFrequency enum value
	EvaluationFrequencyThirtyMin = "THIRTY_MIN"

	// EvaluationFrequencyOneHour is a EvaluationFrequency enum value
	EvaluationFrequencyOneHour = "ONE_HOUR"
)
View Source
const (
	// ExportTaskStatusCodeCancelled is a ExportTaskStatusCode enum value
	ExportTaskStatusCodeCancelled = "CANCELLED"

	// ExportTaskStatusCodeCompleted is a ExportTaskStatusCode enum value
	ExportTaskStatusCodeCompleted = "COMPLETED"

	// ExportTaskStatusCodeFailed is a ExportTaskStatusCode enum value
	ExportTaskStatusCodeFailed = "FAILED"

	// ExportTaskStatusCodePending is a ExportTaskStatusCode enum value
	ExportTaskStatusCodePending = "PENDING"

	// ExportTaskStatusCodePendingCancel is a ExportTaskStatusCode enum value
	ExportTaskStatusCodePendingCancel = "PENDING_CANCEL"

	// ExportTaskStatusCodeRunning is a ExportTaskStatusCode enum value
	ExportTaskStatusCodeRunning = "RUNNING"
)
View Source
const (
	// LogGroupClassStandard is a LogGroupClass enum value
	LogGroupClassStandard = "STANDARD"

	// LogGroupClassInfrequentAccess is a LogGroupClass enum value
	LogGroupClassInfrequentAccess = "INFREQUENT_ACCESS"
)
View Source
const (
	// OrderByLogStreamName is a OrderBy enum value
	OrderByLogStreamName = "LogStreamName"

	// OrderByLastEventTime is a OrderBy enum value
	OrderByLastEventTime = "LastEventTime"
)
View Source
const (
	// OutputFormatJson is a OutputFormat enum value
	OutputFormatJson = "json"

	// OutputFormatPlain is a OutputFormat enum value
	OutputFormatPlain = "plain"

	// OutputFormatW3c is a OutputFormat enum value
	OutputFormatW3c = "w3c"

	// OutputFormatRaw is a OutputFormat enum value
	OutputFormatRaw = "raw"

	// OutputFormatParquet is a OutputFormat enum value
	OutputFormatParquet = "parquet"
)
View Source
const (
	// PolicyTypeDataProtectionPolicy is a PolicyType enum value
	PolicyTypeDataProtectionPolicy = "DATA_PROTECTION_POLICY"

	// PolicyTypeSubscriptionFilterPolicy is a PolicyType enum value
	PolicyTypeSubscriptionFilterPolicy = "SUBSCRIPTION_FILTER_POLICY"
)
View Source
const (
	// QueryStatusScheduled is a QueryStatus enum value
	QueryStatusScheduled = "Scheduled"

	// QueryStatusRunning is a QueryStatus enum value
	QueryStatusRunning = "Running"

	// QueryStatusComplete is a QueryStatus enum value
	QueryStatusComplete = "Complete"

	// QueryStatusFailed is a QueryStatus enum value
	QueryStatusFailed = "Failed"

	// QueryStatusCancelled is a QueryStatus enum value
	QueryStatusCancelled = "Cancelled"

	// QueryStatusTimeout is a QueryStatus enum value
	QueryStatusTimeout = "Timeout"

	// QueryStatusUnknown is a QueryStatus enum value
	QueryStatusUnknown = "Unknown"
)
View Source
const (
	// StandardUnitSeconds is a StandardUnit enum value
	StandardUnitSeconds = "Seconds"

	// StandardUnitMicroseconds is a StandardUnit enum value
	StandardUnitMicroseconds = "Microseconds"

	// StandardUnitMilliseconds is a StandardUnit enum value
	StandardUnitMilliseconds = "Milliseconds"

	// StandardUnitBytes is a StandardUnit enum value
	StandardUnitBytes = "Bytes"

	// StandardUnitKilobytes is a StandardUnit enum value
	StandardUnitKilobytes = "Kilobytes"

	// StandardUnitMegabytes is a StandardUnit enum value
	StandardUnitMegabytes = "Megabytes"

	// StandardUnitGigabytes is a StandardUnit enum value
	StandardUnitGigabytes = "Gigabytes"

	// StandardUnitTerabytes is a StandardUnit enum value
	StandardUnitTerabytes = "Terabytes"

	// StandardUnitBits is a StandardUnit enum value
	StandardUnitBits = "Bits"

	// StandardUnitKilobits is a StandardUnit enum value
	StandardUnitKilobits = "Kilobits"

	// StandardUnitMegabits is a StandardUnit enum value
	StandardUnitMegabits = "Megabits"

	// StandardUnitGigabits is a StandardUnit enum value
	StandardUnitGigabits = "Gigabits"

	// StandardUnitTerabits is a StandardUnit enum value
	StandardUnitTerabits = "Terabits"

	// StandardUnitPercent is a StandardUnit enum value
	StandardUnitPercent = "Percent"

	// StandardUnitCount is a StandardUnit enum value
	StandardUnitCount = "Count"

	// StandardUnitBytesSecond is a StandardUnit enum value
	StandardUnitBytesSecond = "Bytes/Second"

	// StandardUnitKilobytesSecond is a StandardUnit enum value
	StandardUnitKilobytesSecond = "Kilobytes/Second"

	// StandardUnitMegabytesSecond is a StandardUnit enum value
	StandardUnitMegabytesSecond = "Megabytes/Second"

	// StandardUnitGigabytesSecond is a StandardUnit enum value
	StandardUnitGigabytesSecond = "Gigabytes/Second"

	// StandardUnitTerabytesSecond is a StandardUnit enum value
	StandardUnitTerabytesSecond = "Terabytes/Second"

	// StandardUnitBitsSecond is a StandardUnit enum value
	StandardUnitBitsSecond = "Bits/Second"

	// StandardUnitKilobitsSecond is a StandardUnit enum value
	StandardUnitKilobitsSecond = "Kilobits/Second"

	// StandardUnitMegabitsSecond is a StandardUnit enum value
	StandardUnitMegabitsSecond = "Megabits/Second"

	// StandardUnitGigabitsSecond is a StandardUnit enum value
	StandardUnitGigabitsSecond = "Gigabits/Second"

	// StandardUnitTerabitsSecond is a StandardUnit enum value
	StandardUnitTerabitsSecond = "Terabits/Second"

	// StandardUnitCountSecond is a StandardUnit enum value
	StandardUnitCountSecond = "Count/Second"

	// StandardUnitNone is a StandardUnit enum value
	StandardUnitNone = "None"
)
View Source
const (
	// StateActive is a State enum value
	StateActive = "Active"

	// StateSuppressed is a State enum value
	StateSuppressed = "Suppressed"

	// StateBaseline is a State enum value
	StateBaseline = "Baseline"
)
View Source
const (
	// SuppressionStateSuppressed is a SuppressionState enum value
	SuppressionStateSuppressed = "SUPPRESSED"

	// SuppressionStateUnsuppressed is a SuppressionState enum value
	SuppressionStateUnsuppressed = "UNSUPPRESSED"
)
View Source
const (
	// SuppressionTypeLimited is a SuppressionType enum value
	SuppressionTypeLimited = "LIMITED"

	// SuppressionTypeInfinite is a SuppressionType enum value
	SuppressionTypeInfinite = "INFINITE"
)
View Source
const (
	// SuppressionUnitSeconds is a SuppressionUnit enum value
	SuppressionUnitSeconds = "SECONDS"

	// SuppressionUnitMinutes is a SuppressionUnit enum value
	SuppressionUnitMinutes = "MINUTES"

	// SuppressionUnitHours is a SuppressionUnit enum value
	SuppressionUnitHours = "HOURS"
)
View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	//
	// You don't have sufficient permissions to perform this action.
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeConflictException for service response error code
	// "ConflictException".
	//
	// This operation attempted to create a resource that already exists.
	ErrCodeConflictException = "ConflictException"

	// ErrCodeDataAlreadyAcceptedException for service response error code
	// "DataAlreadyAcceptedException".
	//
	// The event was already logged.
	//
	// PutLogEvents actions are now always accepted and never return DataAlreadyAcceptedException
	// regardless of whether a given batch of log events has already been accepted.
	ErrCodeDataAlreadyAcceptedException = "DataAlreadyAcceptedException"

	// ErrCodeInvalidOperationException for service response error code
	// "InvalidOperationException".
	//
	// The operation is not valid on the specified resource.
	ErrCodeInvalidOperationException = "InvalidOperationException"

	// ErrCodeInvalidParameterException for service response error code
	// "InvalidParameterException".
	//
	// A parameter is specified incorrectly.
	ErrCodeInvalidParameterException = "InvalidParameterException"

	// ErrCodeInvalidSequenceTokenException for service response error code
	// "InvalidSequenceTokenException".
	//
	// The sequence token is not valid. You can get the correct sequence token in
	// the expectedSequenceToken field in the InvalidSequenceTokenException message.
	//
	// PutLogEvents actions are now always accepted and never return InvalidSequenceTokenException
	// regardless of receiving an invalid sequence token.
	ErrCodeInvalidSequenceTokenException = "InvalidSequenceTokenException"

	// ErrCodeLimitExceededException for service response error code
	// "LimitExceededException".
	//
	// You have reached the maximum number of resources that can be created.
	ErrCodeLimitExceededException = "LimitExceededException"

	// ErrCodeMalformedQueryException for service response error code
	// "MalformedQueryException".
	//
	// The query string is not valid. Details about this error are displayed in
	// a QueryCompileError object. For more information, see QueryCompileError (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_QueryCompileError.html).
	//
	// For more information about valid query syntax, see CloudWatch Logs Insights
	// Query Syntax (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
	ErrCodeMalformedQueryException = "MalformedQueryException"

	// ErrCodeOperationAbortedException for service response error code
	// "OperationAbortedException".
	//
	// Multiple concurrent requests to update the same resource were in conflict.
	ErrCodeOperationAbortedException = "OperationAbortedException"

	// ErrCodeResourceAlreadyExistsException for service response error code
	// "ResourceAlreadyExistsException".
	//
	// The specified resource already exists.
	ErrCodeResourceAlreadyExistsException = "ResourceAlreadyExistsException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// The specified resource does not exist.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceQuotaExceededException for service response error code
	// "ServiceQuotaExceededException".
	//
	// This request exceeds a service quota.
	ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException"

	// ErrCodeServiceUnavailableException for service response error code
	// "ServiceUnavailableException".
	//
	// The service cannot complete the request.
	ErrCodeServiceUnavailableException = "ServiceUnavailableException"

	// ErrCodeSessionStreamingException for service response error code
	// "SessionStreamingException".
	//
	// his exception is returned if an unknown error occurs during a Live Tail session.
	ErrCodeSessionStreamingException = "SessionStreamingException"

	// ErrCodeSessionTimeoutException for service response error code
	// "SessionTimeoutException".
	//
	// This exception is returned in a Live Tail stream when the Live Tail session
	// times out. Live Tail sessions time out after three hours.
	ErrCodeSessionTimeoutException = "SessionTimeoutException"

	// ErrCodeThrottlingException for service response error code
	// "ThrottlingException".
	//
	// The request was throttled because of quota limits.
	ErrCodeThrottlingException = "ThrottlingException"

	// ErrCodeTooManyTagsException for service response error code
	// "TooManyTagsException".
	//
	// A resource can have no more than 50 tags.
	ErrCodeTooManyTagsException = "TooManyTagsException"

	// ErrCodeUnrecognizedClientException for service response error code
	// "UnrecognizedClientException".
	//
	// The most likely cause is an Amazon Web Services access key ID or secret key
	// that's not valid.
	ErrCodeUnrecognizedClientException = "UnrecognizedClientException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	//
	// One of the parameters for the request is not valid.
	ErrCodeValidationException = "ValidationException"
)
View Source
const (
	ServiceName = "logs"            // Name of service.
	EndpointsID = ServiceName       // ID to lookup a service endpoint with.
	ServiceID   = "CloudWatch Logs" // ServiceID is a unique identifier of a specific service.
)

Service information constants

View Source
const (
	// InheritedPropertyAccountDataProtection is a InheritedProperty enum value
	InheritedPropertyAccountDataProtection = "ACCOUNT_DATA_PROTECTION"
)
View Source
const (
	// ScopeAll is a Scope enum value
	ScopeAll = "ALL"
)

Variables

This section is empty.

Functions

func AnomalyDetectorStatus_Values added in v1.48.4

func AnomalyDetectorStatus_Values() []string

AnomalyDetectorStatus_Values returns all elements of the AnomalyDetectorStatus enum

func DataProtectionStatus_Values added in v1.44.146

func DataProtectionStatus_Values() []string

DataProtectionStatus_Values returns all elements of the DataProtectionStatus enum

func DeliveryDestinationType_Values added in v1.47.8

func DeliveryDestinationType_Values() []string

DeliveryDestinationType_Values returns all elements of the DeliveryDestinationType enum

func Distribution_Values added in v1.34.3

func Distribution_Values() []string

Distribution_Values returns all elements of the Distribution enum

func EvaluationFrequency_Values added in v1.48.4

func EvaluationFrequency_Values() []string

EvaluationFrequency_Values returns all elements of the EvaluationFrequency enum

func ExportTaskStatusCode_Values added in v1.34.3

func ExportTaskStatusCode_Values() []string

ExportTaskStatusCode_Values returns all elements of the ExportTaskStatusCode enum

func InheritedProperty_Values added in v1.44.278

func InheritedProperty_Values() []string

InheritedProperty_Values returns all elements of the InheritedProperty enum

func LogGroupClass_Values added in v1.48.4

func LogGroupClass_Values() []string

LogGroupClass_Values returns all elements of the LogGroupClass enum

func OrderBy_Values added in v1.34.3

func OrderBy_Values() []string

OrderBy_Values returns all elements of the OrderBy enum

func OutputFormat_Values added in v1.47.8

func OutputFormat_Values() []string

OutputFormat_Values returns all elements of the OutputFormat enum

func PolicyType_Values added in v1.44.278

func PolicyType_Values() []string

PolicyType_Values returns all elements of the PolicyType enum

func QueryStatus_Values added in v1.34.3

func QueryStatus_Values() []string

QueryStatus_Values returns all elements of the QueryStatus enum

func Scope_Values added in v1.44.278

func Scope_Values() []string

Scope_Values returns all elements of the Scope enum

func StandardUnit_Values added in v1.38.46

func StandardUnit_Values() []string

StandardUnit_Values returns all elements of the StandardUnit enum

func State_Values added in v1.48.4

func State_Values() []string

State_Values returns all elements of the State enum

func SuppressionState_Values added in v1.48.4

func SuppressionState_Values() []string

SuppressionState_Values returns all elements of the SuppressionState enum

func SuppressionType_Values added in v1.48.4

func SuppressionType_Values() []string

SuppressionType_Values returns all elements of the SuppressionType enum

func SuppressionUnit_Values added in v1.48.4

func SuppressionUnit_Values() []string

SuppressionUnit_Values returns all elements of the SuppressionUnit enum

Types

type AccessDeniedException added in v1.47.8

type AccessDeniedException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

You don't have sufficient permissions to perform this action.

func (*AccessDeniedException) Code added in v1.47.8

func (s *AccessDeniedException) Code() string

Code returns the exception type name.

func (*AccessDeniedException) Error added in v1.47.8

func (s *AccessDeniedException) Error() string

func (AccessDeniedException) GoString added in v1.47.8

func (s AccessDeniedException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AccessDeniedException) Message added in v1.47.8

func (s *AccessDeniedException) Message() string

Message returns the exception's message.

func (*AccessDeniedException) OrigErr added in v1.47.8

func (s *AccessDeniedException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*AccessDeniedException) RequestID added in v1.47.8

func (s *AccessDeniedException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*AccessDeniedException) StatusCode added in v1.47.8

func (s *AccessDeniedException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (AccessDeniedException) String added in v1.47.8

func (s AccessDeniedException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type AccountPolicy added in v1.44.278

type AccountPolicy struct {

	// The Amazon Web Services account ID that the policy applies to.
	AccountId *string `locationName:"accountId" min:"12" type:"string"`

	// The date and time that this policy was most recently updated.
	LastUpdatedTime *int64 `locationName:"lastUpdatedTime" type:"long"`

	// The policy document for this account policy.
	//
	// The JSON specified in policyDocument can be up to 30,720 characters.
	PolicyDocument *string `locationName:"policyDocument" type:"string"`

	// The name of the account policy.
	PolicyName *string `locationName:"policyName" type:"string"`

	// The type of policy for this account policy.
	PolicyType *string `locationName:"policyType" type:"string" enum:"PolicyType"`

	// The scope of the account policy.
	Scope *string `locationName:"scope" type:"string" enum:"Scope"`

	// The log group selection criteria for this subscription filter policy.
	SelectionCriteria *string `locationName:"selectionCriteria" type:"string"`
	// contains filtered or unexported fields
}

A structure that contains information about one CloudWatch Logs account policy.

func (AccountPolicy) GoString added in v1.44.278

func (s AccountPolicy) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AccountPolicy) SetAccountId added in v1.44.278

func (s *AccountPolicy) SetAccountId(v string) *AccountPolicy

SetAccountId sets the AccountId field's value.

func (*AccountPolicy) SetLastUpdatedTime added in v1.44.278

func (s *AccountPolicy) SetLastUpdatedTime(v int64) *AccountPolicy

SetLastUpdatedTime sets the LastUpdatedTime field's value.

func (*AccountPolicy) SetPolicyDocument added in v1.44.278

func (s *AccountPolicy) SetPolicyDocument(v string) *AccountPolicy

SetPolicyDocument sets the PolicyDocument field's value.

func (*AccountPolicy) SetPolicyName added in v1.44.278

func (s *AccountPolicy) SetPolicyName(v string) *AccountPolicy

SetPolicyName sets the PolicyName field's value.

func (*AccountPolicy) SetPolicyType added in v1.44.278

func (s *AccountPolicy) SetPolicyType(v string) *AccountPolicy

SetPolicyType sets the PolicyType field's value.

func (*AccountPolicy) SetScope added in v1.44.278

func (s *AccountPolicy) SetScope(v string) *AccountPolicy

SetScope sets the Scope field's value.

func (*AccountPolicy) SetSelectionCriteria added in v1.49.18

func (s *AccountPolicy) SetSelectionCriteria(v string) *AccountPolicy

SetSelectionCriteria sets the SelectionCriteria field's value.

func (AccountPolicy) String added in v1.44.278

func (s AccountPolicy) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type Anomaly added in v1.48.4

type Anomaly struct {

	// Specifies whether this anomaly is still ongoing.
	//
	// Active is a required field
	Active *bool `locationName:"active" type:"boolean" required:"true"`

	// The ARN of the anomaly detector that identified this anomaly.
	//
	// AnomalyDetectorArn is a required field
	AnomalyDetectorArn *string `locationName:"anomalyDetectorArn" min:"1" type:"string" required:"true"`

	// The unique ID that CloudWatch Logs assigned to this anomaly.
	//
	// AnomalyId is a required field
	AnomalyId *string `locationName:"anomalyId" min:"36" type:"string" required:"true"`

	// A human-readable description of the anomaly. This description is generated
	// by CloudWatch Logs.
	//
	// Description is a required field
	Description *string `locationName:"description" min:"1" type:"string" required:"true"`

	// The date and time when the anomaly detector first saw this anomaly. It is
	// specified as epoch time, which is the number of seconds since January 1,
	// 1970, 00:00:00 UTC.
	//
	// FirstSeen is a required field
	FirstSeen *int64 `locationName:"firstSeen" type:"long" required:"true"`

	// A map showing times when the anomaly detector ran, and the number of occurrences
	// of this anomaly that were detected at each of those runs. The times are specified
	// in epoch time, which is the number of seconds since January 1, 1970, 00:00:00
	// UTC.
	//
	// Histogram is a required field
	Histogram map[string]*int64 `locationName:"histogram" type:"map" required:"true"`

	// If this anomaly is suppressed, this field is true if the suppression is because
	// the pattern is suppressed. If false, then only this particular anomaly is
	// suppressed.
	IsPatternLevelSuppression *bool `locationName:"isPatternLevelSuppression" type:"boolean"`

	// The date and time when the anomaly detector most recently saw this anomaly.
	// It is specified as epoch time, which is the number of seconds since January
	// 1, 1970, 00:00:00 UTC.
	//
	// LastSeen is a required field
	LastSeen *int64 `locationName:"lastSeen" type:"long" required:"true"`

	// An array of ARNS of the log groups that contained log events considered to
	// be part of this anomaly.
	//
	// LogGroupArnList is a required field
	LogGroupArnList []*string `locationName:"logGroupArnList" type:"list" required:"true"`

	// An array of sample log event messages that are considered to be part of this
	// anomaly.
	//
	// LogSamples is a required field
	LogSamples []*LogEvent `locationName:"logSamples" type:"list" required:"true"`

	// The ID of the pattern used to help identify this anomaly.
	//
	// PatternId is a required field
	PatternId *string `locationName:"patternId" min:"32" type:"string" required:"true"`

	// The pattern used to help identify this anomaly, in regular expression format.
	PatternRegex *string `locationName:"patternRegex" min:"1" type:"string"`

	// The pattern used to help identify this anomaly, in string format.
	//
	// PatternString is a required field
	PatternString *string `locationName:"patternString" min:"1" type:"string" required:"true"`

	// An array of structures where each structure contains information about one
	// token that makes up the pattern.
	//
	// PatternTokens is a required field
	PatternTokens []*PatternToken `locationName:"patternTokens" type:"list" required:"true"`

	// The priority level of this anomaly, as determined by CloudWatch Logs. Priority
	// is computed based on log severity labels such as FATAL and ERROR and the
	// amount of deviation from the baseline. Possible values are HIGH, MEDIUM,
	// and LOW.
	Priority *string `locationName:"priority" min:"1" type:"string"`

	// Indicates the current state of this anomaly. If it is still being treated
	// as an anomaly, the value is Active. If you have suppressed this anomaly by
	// using the UpdateAnomaly (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateAnomaly.html)
	// operation, the value is Suppressed. If this behavior is now considered to
	// be normal, the value is Baseline.
	//
	// State is a required field
	State *string `locationName:"state" type:"string" required:"true" enum:"State"`

	// Indicates whether this anomaly is currently suppressed. To suppress an anomaly,
	// use UpdateAnomaly (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateAnomaly.html).
	Suppressed *bool `locationName:"suppressed" type:"boolean"`

	// If the anomaly is suppressed, this indicates when it was suppressed.
	SuppressedDate *int64 `locationName:"suppressedDate" type:"long"`

	// If the anomaly is suppressed, this indicates when the suppression will end.
	// If this value is 0, the anomaly was suppressed with no expiration, with the
	// INFINITE value.
	SuppressedUntil *int64 `locationName:"suppressedUntil" type:"long"`
	// contains filtered or unexported fields
}

This structure represents one anomaly that has been found by a logs anomaly detector.

For more information about patterns and anomalies, see CreateLogAnomalyDetector (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CreateLogAnomalyDetector.html).

func (Anomaly) GoString added in v1.48.4

func (s Anomaly) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*Anomaly) SetActive added in v1.48.4

func (s *Anomaly) SetActive(v bool) *Anomaly

SetActive sets the Active field's value.

func (*Anomaly) SetAnomalyDetectorArn added in v1.48.4

func (s *Anomaly) SetAnomalyDetectorArn(v string) *Anomaly

SetAnomalyDetectorArn sets the AnomalyDetectorArn field's value.

func (*Anomaly) SetAnomalyId added in v1.48.4

func (s *Anomaly) SetAnomalyId(v string) *Anomaly

SetAnomalyId sets the AnomalyId field's value.

func (*Anomaly) SetDescription added in v1.48.4

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

SetDescription sets the Description field's value.

func (*Anomaly) SetFirstSeen added in v1.48.4

func (s *Anomaly) SetFirstSeen(v int64) *Anomaly

SetFirstSeen sets the FirstSeen field's value.

func (*Anomaly) SetHistogram added in v1.48.4

func (s *Anomaly) SetHistogram(v map[string]*int64) *Anomaly

SetHistogram sets the Histogram field's value.

func (*Anomaly) SetIsPatternLevelSuppression added in v1.48.4

func (s *Anomaly) SetIsPatternLevelSuppression(v bool) *Anomaly

SetIsPatternLevelSuppression sets the IsPatternLevelSuppression field's value.

func (*Anomaly) SetLastSeen added in v1.48.4

func (s *Anomaly) SetLastSeen(v int64) *Anomaly

SetLastSeen sets the LastSeen field's value.

func (*Anomaly) SetLogGroupArnList added in v1.48.4

func (s *Anomaly) SetLogGroupArnList(v []*string) *Anomaly

SetLogGroupArnList sets the LogGroupArnList field's value.

func (*Anomaly) SetLogSamples added in v1.48.4

func (s *Anomaly) SetLogSamples(v []*LogEvent) *Anomaly

SetLogSamples sets the LogSamples field's value.

func (*Anomaly) SetPatternId added in v1.48.4

func (s *Anomaly) SetPatternId(v string) *Anomaly

SetPatternId sets the PatternId field's value.

func (*Anomaly) SetPatternRegex added in v1.48.4

func (s *Anomaly) SetPatternRegex(v string) *Anomaly

SetPatternRegex sets the PatternRegex field's value.

func (*Anomaly) SetPatternString added in v1.48.4

func (s *Anomaly) SetPatternString(v string) *Anomaly

SetPatternString sets the PatternString field's value.

func (*Anomaly) SetPatternTokens added in v1.48.4

func (s *Anomaly) SetPatternTokens(v []*PatternToken) *Anomaly

SetPatternTokens sets the PatternTokens field's value.

func (*Anomaly) SetPriority added in v1.48.4

func (s *Anomaly) SetPriority(v string) *Anomaly

SetPriority sets the Priority field's value.

func (*Anomaly) SetState added in v1.48.4

func (s *Anomaly) SetState(v string) *Anomaly

SetState sets the State field's value.

func (*Anomaly) SetSuppressed added in v1.48.4

func (s *Anomaly) SetSuppressed(v bool) *Anomaly

SetSuppressed sets the Suppressed field's value.

func (*Anomaly) SetSuppressedDate added in v1.48.4

func (s *Anomaly) SetSuppressedDate(v int64) *Anomaly

SetSuppressedDate sets the SuppressedDate field's value.

func (*Anomaly) SetSuppressedUntil added in v1.48.4

func (s *Anomaly) SetSuppressedUntil(v int64) *Anomaly

SetSuppressedUntil sets the SuppressedUntil field's value.

func (Anomaly) String added in v1.48.4

func (s Anomaly) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type AnomalyDetector added in v1.48.4

type AnomalyDetector struct {

	// The ARN of the anomaly detector.
	AnomalyDetectorArn *string `locationName:"anomalyDetectorArn" min:"1" type:"string"`

	// Specifies the current status of the anomaly detector. To pause an anomaly
	// detector, use the enabled parameter in the UpdateLogAnomalyDetector (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateLogAnomalyDetector.html)
	// operation.
	AnomalyDetectorStatus *string `locationName:"anomalyDetectorStatus" type:"string" enum:"AnomalyDetectorStatus"`

	// The number of days used as the life cycle of anomalies. After this time,
	// anomalies are automatically baselined and the anomaly detector model will
	// treat new occurrences of similar event as normal.
	AnomalyVisibilityTime *int64 `locationName:"anomalyVisibilityTime" min:"7" type:"long"`

	// The date and time when this anomaly detector was created.
	CreationTimeStamp *int64 `locationName:"creationTimeStamp" type:"long"`

	// The name of the anomaly detector.
	DetectorName *string `locationName:"detectorName" min:"1" type:"string"`

	// Specifies how often the anomaly detector runs and look for anomalies.
	EvaluationFrequency *string `locationName:"evaluationFrequency" type:"string" enum:"EvaluationFrequency"`

	// A symbolic description of how CloudWatch Logs should interpret the data in
	// each log event. For example, a log event can contain timestamps, IP addresses,
	// strings, and so on. You use the filter pattern to specify what to look for
	// in the log event message.
	FilterPattern *string `locationName:"filterPattern" type:"string"`

	// The ID of the KMS key assigned to this anomaly detector, if any.
	KmsKeyId *string `locationName:"kmsKeyId" type:"string"`

	// The date and time when this anomaly detector was most recently modified.
	LastModifiedTimeStamp *int64 `locationName:"lastModifiedTimeStamp" type:"long"`

	// A list of the ARNs of the log groups that this anomaly detector watches.
	LogGroupArnList []*string `locationName:"logGroupArnList" type:"list"`
	// contains filtered or unexported fields
}

Contains information about one anomaly detector in the account.

func (AnomalyDetector) GoString added in v1.48.4

func (s AnomalyDetector) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AnomalyDetector) SetAnomalyDetectorArn added in v1.48.4

func (s *AnomalyDetector) SetAnomalyDetectorArn(v string) *AnomalyDetector

SetAnomalyDetectorArn sets the AnomalyDetectorArn field's value.

func (*AnomalyDetector) SetAnomalyDetectorStatus added in v1.48.4

func (s *AnomalyDetector) SetAnomalyDetectorStatus(v string) *AnomalyDetector

SetAnomalyDetectorStatus sets the AnomalyDetectorStatus field's value.

func (*AnomalyDetector) SetAnomalyVisibilityTime added in v1.48.4

func (s *AnomalyDetector) SetAnomalyVisibilityTime(v int64) *AnomalyDetector

SetAnomalyVisibilityTime sets the AnomalyVisibilityTime field's value.

func (*AnomalyDetector) SetCreationTimeStamp added in v1.48.4

func (s *AnomalyDetector) SetCreationTimeStamp(v int64) *AnomalyDetector

SetCreationTimeStamp sets the CreationTimeStamp field's value.

func (*AnomalyDetector) SetDetectorName added in v1.48.4

func (s *AnomalyDetector) SetDetectorName(v string) *AnomalyDetector

SetDetectorName sets the DetectorName field's value.

func (*AnomalyDetector) SetEvaluationFrequency added in v1.48.4

func (s *AnomalyDetector) SetEvaluationFrequency(v string) *AnomalyDetector

SetEvaluationFrequency sets the EvaluationFrequency field's value.

func (*AnomalyDetector) SetFilterPattern added in v1.48.4

func (s *AnomalyDetector) SetFilterPattern(v string) *AnomalyDetector

SetFilterPattern sets the FilterPattern field's value.

func (*AnomalyDetector) SetKmsKeyId added in v1.48.4

func (s *AnomalyDetector) SetKmsKeyId(v string) *AnomalyDetector

SetKmsKeyId sets the KmsKeyId field's value.

func (*AnomalyDetector) SetLastModifiedTimeStamp added in v1.48.4

func (s *AnomalyDetector) SetLastModifiedTimeStamp(v int64) *AnomalyDetector

SetLastModifiedTimeStamp sets the LastModifiedTimeStamp field's value.

func (*AnomalyDetector) SetLogGroupArnList added in v1.48.4

func (s *AnomalyDetector) SetLogGroupArnList(v []*string) *AnomalyDetector

SetLogGroupArnList sets the LogGroupArnList field's value.

func (AnomalyDetector) String added in v1.48.4

func (s AnomalyDetector) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type AssociateKmsKeyInput added in v1.10.50

type AssociateKmsKeyInput struct {

	// The Amazon Resource Name (ARN) of the KMS key to use when encrypting log
	// data. This must be a symmetric KMS key. For more information, see Amazon
	// Resource Names (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms)
	// and Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html).
	//
	// KmsKeyId is a required field
	KmsKeyId *string `locationName:"kmsKeyId" type:"string" required:"true"`

	// The name of the log group.
	//
	// In your AssociateKmsKey operation, you must specify either the resourceIdentifier
	// parameter or the logGroup parameter, but you can't specify both.
	LogGroupName *string `locationName:"logGroupName" min:"1" type:"string"`

	// Specifies the target for this operation. You must specify one of the following:
	//
	//    * Specify the following ARN to have future GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html)
	//    operations in this account encrypt the results with the specified KMS
	//    key. Replace REGION and ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:query-result:*
	//
	//    * Specify the ARN of a log group to have CloudWatch Logs use the KMS key
	//    to encrypt log events that are ingested and stored by that log group.
	//    The log group ARN must be in the following format. Replace REGION and
	//    ACCOUNT_ID with your Region and account ID. arn:aws:logs:REGION:ACCOUNT_ID:log-group:LOG_GROUP_NAME
	//
	// In your AssociateKmsKey operation, you must specify either the resourceIdentifier
	// parameter or the logGroup parameter, but you can't specify both.
	ResourceIdentifier *string `locationName:"resourceIdentifier" min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (AssociateKmsKeyInput) GoString added in v1.10.50

func (s AssociateKmsKeyInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AssociateKmsKeyInput) SetKmsKeyId added in v1.10.50

SetKmsKeyId sets the KmsKeyId field's value.

func (*AssociateKmsKeyInput) SetLogGroupName added in v1.10.50

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

SetLogGroupName sets the LogGroupName field's value.

func (*AssociateKmsKeyInput) SetResourceIdentifier added in v1.44.298

func (s *AssociateKmsKeyInput) SetResourceIdentifier(v string) *AssociateKmsKeyInput

SetResourceIdentifier sets the ResourceIdentifier field's value.

func (AssociateKmsKeyInput) String added in v1.10.50

func (s AssociateKmsKeyInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AssociateKmsKeyInput) Validate added in v1.10.50

func (s *AssociateKmsKeyInput) Validate() error

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

type AssociateKmsKeyOutput added in v1.10.50

type AssociateKmsKeyOutput struct {
	// contains filtered or unexported fields
}

func (AssociateKmsKeyOutput) GoString added in v1.10.50

func (s AssociateKmsKeyOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (AssociateKmsKeyOutput) String added in v1.10.50

func (s AssociateKmsKeyOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type CancelExportTaskInput added in v0.9.9

type CancelExportTaskInput struct {

	// The ID of the export task.
	//
	// TaskId is a required field
	TaskId *string `locationName:"taskId" min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CancelExportTaskInput) GoString added in v0.9.9

func (s CancelExportTaskInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CancelExportTaskInput) SetTaskId added in v1.5.0

SetTaskId sets the TaskId field's value.

func (CancelExportTaskInput) String added in v0.9.9

func (s CancelExportTaskInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CancelExportTaskInput) Validate added in v1.1.21

func (s *CancelExportTaskInput) Validate() error

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

type CancelExportTaskOutput added in v0.9.9

type CancelExportTaskOutput struct {
	// contains filtered or unexported fields
}

func (CancelExportTaskOutput) GoString added in v0.9.9

func (s CancelExportTaskOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (CancelExportTaskOutput) String added in v0.9.9

func (s CancelExportTaskOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type CloudWatchLogs

type CloudWatchLogs struct {
	*client.Client
}

CloudWatchLogs provides the API operation methods for making requests to Amazon CloudWatch Logs. See this package's package overview docs for details on the service.

CloudWatchLogs methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudWatchLogs

New creates a new instance of the CloudWatchLogs client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

mySession := session.Must(session.NewSession())

// Create a CloudWatchLogs client from just a session.
svc := cloudwatchlogs.New(mySession)

// Create a CloudWatchLogs client with additional configuration
svc := cloudwatchlogs.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*CloudWatchLogs) AssociateKmsKey added in v1.10.50

func (c *CloudWatchLogs) AssociateKmsKey(input *AssociateKmsKeyInput) (*AssociateKmsKeyOutput, error)

AssociateKmsKey API operation for Amazon CloudWatch Logs.

Associates the specified KMS key with either one log group in the account, or with all stored CloudWatch Logs query insights results in the account.

When you use AssociateKmsKey, you specify either the logGroupName parameter or the resourceIdentifier parameter. You can't specify both of those parameters in the same operation.

  • Specify the logGroupName parameter to cause all log events stored in the log group to be encrypted with that key. Only the log events ingested after the key is associated are encrypted with that key. Associating a KMS key with a log group overrides any existing associations between the log group and a KMS key. After a KMS key is associated with a log group, all newly ingested data for the log group is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested. Associating a key with a log group does not cause the results of queries of that log group to be encrypted with that key. To have query results encrypted with a KMS key, you must use an AssociateKmsKey operation with the resourceIdentifier parameter that specifies a query-result resource.

  • Specify the resourceIdentifier parameter with a query-result resource, to use that key to encrypt the stored results of all future StartQuery (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_StartQuery.html) operations in the account. The response from a GetQueryResults (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html) operation will still return the query results in plain text. Even if you have not associated a key with your query results, the query results are encrypted when stored, using the default CloudWatch Logs method. If you run a query from a monitoring account that queries logs in a source account, the query results key from the monitoring account, if any, is used.

If you delete the key that is used to encrypt log events or log group query results, then all the associated stored log events or query results that were encrypted with that key will be unencryptable and unusable.

CloudWatch Logs supports only symmetric KMS keys. Do not use an associate an asymmetric KMS key with your log group or query results. For more information, see Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html).

It can take up to 5 minutes for this operation to take effect.

If you attempt to associate a KMS key with a log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation AssociateKmsKey for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey

func (*CloudWatchLogs) AssociateKmsKeyRequest added in v1.10.50

func (c *CloudWatchLogs) AssociateKmsKeyRequest(input *AssociateKmsKeyInput) (req *request.Request, output *AssociateKmsKeyOutput)

AssociateKmsKeyRequest generates a "aws/request.Request" representing the client's request for the AssociateKmsKey operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See AssociateKmsKey for more information on using the AssociateKmsKey API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the AssociateKmsKeyRequest method.
req, resp := client.AssociateKmsKeyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/AssociateKmsKey

func (*CloudWatchLogs) AssociateKmsKeyWithContext added in v1.10.50

func (c *CloudWatchLogs) AssociateKmsKeyWithContext(ctx aws.Context, input *AssociateKmsKeyInput, opts ...request.Option) (*AssociateKmsKeyOutput, error)

AssociateKmsKeyWithContext is the same as AssociateKmsKey with the addition of the ability to pass a context and additional request options.

See AssociateKmsKey for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CancelExportTask added in v0.9.9

func (c *CloudWatchLogs) CancelExportTask(input *CancelExportTaskInput) (*CancelExportTaskOutput, error)

CancelExportTask API operation for Amazon CloudWatch Logs.

Cancels the specified export task.

The task must be in the PENDING or RUNNING state.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CancelExportTask for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • InvalidOperationException The operation is not valid on the specified resource.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask

func (*CloudWatchLogs) CancelExportTaskRequest added in v0.9.9

func (c *CloudWatchLogs) CancelExportTaskRequest(input *CancelExportTaskInput) (req *request.Request, output *CancelExportTaskOutput)

CancelExportTaskRequest generates a "aws/request.Request" representing the client's request for the CancelExportTask operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CancelExportTask for more information on using the CancelExportTask API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CancelExportTaskRequest method.
req, resp := client.CancelExportTaskRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CancelExportTask

func (*CloudWatchLogs) CancelExportTaskWithContext added in v1.8.0

func (c *CloudWatchLogs) CancelExportTaskWithContext(ctx aws.Context, input *CancelExportTaskInput, opts ...request.Option) (*CancelExportTaskOutput, error)

CancelExportTaskWithContext is the same as CancelExportTask with the addition of the ability to pass a context and additional request options.

See CancelExportTask for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CreateDelivery added in v1.47.8

func (c *CloudWatchLogs) CreateDelivery(input *CreateDeliveryInput) (*CreateDeliveryOutput, error)

CreateDelivery API operation for Amazon CloudWatch Logs.

Creates a delivery. A delivery is a connection between a logical delivery source and a logical delivery destination that you have already created.

Only some Amazon Web Services services support being configured as a delivery source using this operation. These services are listed as Supported [V2 Permissions] in the table at Enabling logging from Amazon Web Services services. (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html)

A delivery destination can represent a log group in CloudWatch Logs, an Amazon S3 bucket, or a delivery stream in Firehose.

To configure logs delivery between a supported Amazon Web Services service and a destination, you must do the following:

You can configure a single delivery source to send logs to multiple destinations by creating multiple deliveries. You can also create multiple deliveries to configure multiple delivery sources to send logs to the same delivery destination.

You can't update an existing delivery. You can only create and delete deliveries.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CreateDelivery for usage and error information.

Returned Error Types:

  • ServiceUnavailableException The service cannot complete the request.

  • ConflictException This operation attempted to create a resource that already exists.

  • ResourceNotFoundException The specified resource does not exist.

  • ValidationException One of the parameters for the request is not valid.

  • AccessDeniedException You don't have sufficient permissions to perform this action.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery

func (*CloudWatchLogs) CreateDeliveryRequest added in v1.47.8

func (c *CloudWatchLogs) CreateDeliveryRequest(input *CreateDeliveryInput) (req *request.Request, output *CreateDeliveryOutput)

CreateDeliveryRequest generates a "aws/request.Request" representing the client's request for the CreateDelivery operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateDelivery for more information on using the CreateDelivery API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateDeliveryRequest method.
req, resp := client.CreateDeliveryRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateDelivery

func (*CloudWatchLogs) CreateDeliveryWithContext added in v1.47.8

func (c *CloudWatchLogs) CreateDeliveryWithContext(ctx aws.Context, input *CreateDeliveryInput, opts ...request.Option) (*CreateDeliveryOutput, error)

CreateDeliveryWithContext is the same as CreateDelivery with the addition of the ability to pass a context and additional request options.

See CreateDelivery for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CreateExportTask added in v0.9.9

func (c *CloudWatchLogs) CreateExportTask(input *CreateExportTaskInput) (*CreateExportTaskOutput, error)

CreateExportTask API operation for Amazon CloudWatch Logs.

Creates an export task so that you can efficiently export data from a log group to an Amazon S3 bucket. When you perform a CreateExportTask operation, you must use credentials that have permission to write to the S3 bucket that you specify as the destination.

Exporting log data to S3 buckets that are encrypted by KMS is supported. Exporting log data to Amazon S3 buckets that have S3 Object Lock enabled with a retention period is also supported.

Exporting to S3 buckets that are encrypted with AES-256 is supported.

This is an asynchronous call. If all the required information is provided, this operation initiates an export task and responds with the ID of the task. After the task has started, you can use DescribeExportTasks (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeExportTasks.html) to get the status of the export task. Each account can only have one active (RUNNING or PENDING) export task at a time. To cancel an export task, use CancelExportTask (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_CancelExportTask.html).

You can export logs from multiple log groups or multiple time ranges to the same S3 bucket. To separate log data for each export task, specify a prefix to be used as the Amazon S3 key prefix for all exported objects.

Time-based sorting on chunks of log data inside an exported file is not guaranteed. You can sort the exported log field data by using Linux utilities.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CreateExportTask for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • LimitExceededException You have reached the maximum number of resources that can be created.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

  • ResourceNotFoundException The specified resource does not exist.

  • ResourceAlreadyExistsException The specified resource already exists.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask

func (*CloudWatchLogs) CreateExportTaskRequest added in v0.9.9

func (c *CloudWatchLogs) CreateExportTaskRequest(input *CreateExportTaskInput) (req *request.Request, output *CreateExportTaskOutput)

CreateExportTaskRequest generates a "aws/request.Request" representing the client's request for the CreateExportTask operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateExportTask for more information on using the CreateExportTask API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateExportTaskRequest method.
req, resp := client.CreateExportTaskRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateExportTask

func (*CloudWatchLogs) CreateExportTaskWithContext added in v1.8.0

func (c *CloudWatchLogs) CreateExportTaskWithContext(ctx aws.Context, input *CreateExportTaskInput, opts ...request.Option) (*CreateExportTaskOutput, error)

CreateExportTaskWithContext is the same as CreateExportTask with the addition of the ability to pass a context and additional request options.

See CreateExportTask for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CreateLogAnomalyDetector added in v1.48.4

func (c *CloudWatchLogs) CreateLogAnomalyDetector(input *CreateLogAnomalyDetectorInput) (*CreateLogAnomalyDetectorOutput, error)

CreateLogAnomalyDetector API operation for Amazon CloudWatch Logs.

Creates an anomaly detector that regularly scans one or more log groups and look for patterns and anomalies in the logs.

An anomaly detector can help surface issues by automatically discovering anomalies in your log event traffic. An anomaly detector uses machine learning algorithms to scan log events and find patterns. A pattern is a shared text structure that recurs among your log fields. Patterns provide a useful tool for analyzing large sets of logs because a large number of log events can often be compressed into a few patterns.

The anomaly detector uses pattern recognition to find anomalies, which are unusual log events. It uses the evaluationFrequency to compare current log events and patterns with trained baselines.

Fields within a pattern are called tokens. Fields that vary within a pattern, such as a request ID or timestamp, are referred to as dynamic tokens and represented by <*>.

The following is an example of a pattern:

[INFO] Request time: <*> ms

This pattern represents log events like [INFO] Request time: 327 ms and other similar log events that differ only by the number, in this csse 327. When the pattern is displayed, the different numbers are replaced by <*>

Any parts of log events that are masked as sensitive data are not scanned for anomalies. For more information about masking sensitive data, see Help protect sensitive log data with masking (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CreateLogAnomalyDetector for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • LimitExceededException You have reached the maximum number of resources that can be created.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogAnomalyDetector

func (*CloudWatchLogs) CreateLogAnomalyDetectorRequest added in v1.48.4

func (c *CloudWatchLogs) CreateLogAnomalyDetectorRequest(input *CreateLogAnomalyDetectorInput) (req *request.Request, output *CreateLogAnomalyDetectorOutput)

CreateLogAnomalyDetectorRequest generates a "aws/request.Request" representing the client's request for the CreateLogAnomalyDetector operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateLogAnomalyDetector for more information on using the CreateLogAnomalyDetector API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateLogAnomalyDetectorRequest method.
req, resp := client.CreateLogAnomalyDetectorRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogAnomalyDetector

func (*CloudWatchLogs) CreateLogAnomalyDetectorWithContext added in v1.48.4

func (c *CloudWatchLogs) CreateLogAnomalyDetectorWithContext(ctx aws.Context, input *CreateLogAnomalyDetectorInput, opts ...request.Option) (*CreateLogAnomalyDetectorOutput, error)

CreateLogAnomalyDetectorWithContext is the same as CreateLogAnomalyDetector with the addition of the ability to pass a context and additional request options.

See CreateLogAnomalyDetector for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CreateLogGroup

func (c *CloudWatchLogs) CreateLogGroup(input *CreateLogGroupInput) (*CreateLogGroupOutput, error)

CreateLogGroup API operation for Amazon CloudWatch Logs.

Creates a log group with the specified name. You can create up to 1,000,000 log groups per Region per account.

You must use the following guidelines when naming a log group:

  • Log group names must be unique within a Region for an Amazon Web Services account.

  • Log group names can be between 1 and 512 characters long.

  • Log group names consist of the following characters: a-z, A-Z, 0-9, '_' (underscore), '-' (hyphen), '/' (forward slash), '.' (period), and '#' (number sign)

  • Log group names can't start with the string aws/

When you create a log group, by default the log events in the log group do not expire. To set a retention policy so that events expire and are deleted after a specified time, use PutRetentionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutRetentionPolicy.html).

If you associate an KMS key with the log group, ingested data is encrypted using the KMS key. This association is stored as long as the data encrypted with the KMS key is still within CloudWatch Logs. This enables CloudWatch Logs to decrypt this data whenever it is requested.

If you attempt to associate a KMS key with the log group but the KMS key does not exist or the KMS key is disabled, you receive an InvalidParameterException error.

CloudWatch Logs supports only symmetric KMS keys. Do not associate an asymmetric KMS key with your log group. For more information, see Using Symmetric and Asymmetric Keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CreateLogGroup for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceAlreadyExistsException The specified resource already exists.

  • LimitExceededException You have reached the maximum number of resources that can be created.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup

func (*CloudWatchLogs) CreateLogGroupRequest

func (c *CloudWatchLogs) CreateLogGroupRequest(input *CreateLogGroupInput) (req *request.Request, output *CreateLogGroupOutput)

CreateLogGroupRequest generates a "aws/request.Request" representing the client's request for the CreateLogGroup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateLogGroup for more information on using the CreateLogGroup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateLogGroupRequest method.
req, resp := client.CreateLogGroupRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogGroup

func (*CloudWatchLogs) CreateLogGroupWithContext added in v1.8.0

func (c *CloudWatchLogs) CreateLogGroupWithContext(ctx aws.Context, input *CreateLogGroupInput, opts ...request.Option) (*CreateLogGroupOutput, error)

CreateLogGroupWithContext is the same as CreateLogGroup with the addition of the ability to pass a context and additional request options.

See CreateLogGroup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) CreateLogStream

func (c *CloudWatchLogs) CreateLogStream(input *CreateLogStreamInput) (*CreateLogStreamOutput, error)

CreateLogStream API operation for Amazon CloudWatch Logs.

Creates a log stream for the specified log group. A log stream is a sequence of log events that originate from a single source, such as an application instance or a resource that is being monitored.

There is no limit on the number of log streams that you can create for a log group. There is a limit of 50 TPS on CreateLogStream operations, after which transactions are throttled.

You must use the following guidelines when naming a log stream:

  • Log stream names must be unique within the log group.

  • Log stream names can be between 1 and 512 characters long.

  • Don't use ':' (colon) or '*' (asterisk) characters.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation CreateLogStream for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceAlreadyExistsException The specified resource already exists.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream

func (*CloudWatchLogs) CreateLogStreamRequest

func (c *CloudWatchLogs) CreateLogStreamRequest(input *CreateLogStreamInput) (req *request.Request, output *CreateLogStreamOutput)

CreateLogStreamRequest generates a "aws/request.Request" representing the client's request for the CreateLogStream operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See CreateLogStream for more information on using the CreateLogStream API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the CreateLogStreamRequest method.
req, resp := client.CreateLogStreamRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/CreateLogStream

func (*CloudWatchLogs) CreateLogStreamWithContext added in v1.8.0

func (c *CloudWatchLogs) CreateLogStreamWithContext(ctx aws.Context, input *CreateLogStreamInput, opts ...request.Option) (*CreateLogStreamOutput, error)

CreateLogStreamWithContext is the same as CreateLogStream with the addition of the ability to pass a context and additional request options.

See CreateLogStream for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteAccountPolicy added in v1.44.278

func (c *CloudWatchLogs) DeleteAccountPolicy(input *DeleteAccountPolicyInput) (*DeleteAccountPolicyOutput, error)

DeleteAccountPolicy API operation for Amazon CloudWatch Logs.

Deletes a CloudWatch Logs account policy. This stops the policy from applying to all log groups or a subset of log groups in the account. Log-group level policies will still be in effect.

To use this operation, you must be signed on with the correct permissions depending on the type of policy that you are deleting.

  • To delete a data protection policy, you must have the logs:DeleteDataProtectionPolicy and logs:DeleteAccountPolicy permissions.

  • To delete a subscription filter policy, you must have the logs:DeleteSubscriptionFilter and logs:DeleteAccountPolicy permissions.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteAccountPolicy for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteAccountPolicy

func (*CloudWatchLogs) DeleteAccountPolicyRequest added in v1.44.278

func (c *CloudWatchLogs) DeleteAccountPolicyRequest(input *DeleteAccountPolicyInput) (req *request.Request, output *DeleteAccountPolicyOutput)

DeleteAccountPolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteAccountPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteAccountPolicy for more information on using the DeleteAccountPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteAccountPolicyRequest method.
req, resp := client.DeleteAccountPolicyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteAccountPolicy

func (*CloudWatchLogs) DeleteAccountPolicyWithContext added in v1.44.278

func (c *CloudWatchLogs) DeleteAccountPolicyWithContext(ctx aws.Context, input *DeleteAccountPolicyInput, opts ...request.Option) (*DeleteAccountPolicyOutput, error)

DeleteAccountPolicyWithContext is the same as DeleteAccountPolicy with the addition of the ability to pass a context and additional request options.

See DeleteAccountPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDataProtectionPolicy added in v1.44.146

DeleteDataProtectionPolicy API operation for Amazon CloudWatch Logs.

Deletes the data protection policy from the specified log group.

For more information about data protection policies, see PutDataProtectionPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDataProtectionPolicy for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDataProtectionPolicy

func (*CloudWatchLogs) DeleteDataProtectionPolicyRequest added in v1.44.146

func (c *CloudWatchLogs) DeleteDataProtectionPolicyRequest(input *DeleteDataProtectionPolicyInput) (req *request.Request, output *DeleteDataProtectionPolicyOutput)

DeleteDataProtectionPolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteDataProtectionPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDataProtectionPolicy for more information on using the DeleteDataProtectionPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDataProtectionPolicyRequest method.
req, resp := client.DeleteDataProtectionPolicyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDataProtectionPolicy

func (*CloudWatchLogs) DeleteDataProtectionPolicyWithContext added in v1.44.146

func (c *CloudWatchLogs) DeleteDataProtectionPolicyWithContext(ctx aws.Context, input *DeleteDataProtectionPolicyInput, opts ...request.Option) (*DeleteDataProtectionPolicyOutput, error)

DeleteDataProtectionPolicyWithContext is the same as DeleteDataProtectionPolicy with the addition of the ability to pass a context and additional request options.

See DeleteDataProtectionPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDelivery added in v1.47.8

func (c *CloudWatchLogs) DeleteDelivery(input *DeleteDeliveryInput) (*DeleteDeliveryOutput, error)

DeleteDelivery API operation for Amazon CloudWatch Logs.

Deletes s delivery. A delivery is a connection between a logical delivery source and a logical delivery destination. Deleting a delivery only deletes the connection between the delivery source and delivery destination. It does not delete the delivery destination or the delivery source.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDelivery for usage and error information.

Returned Error Types:

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • ConflictException This operation attempted to create a resource that already exists.

  • ValidationException One of the parameters for the request is not valid.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery

func (*CloudWatchLogs) DeleteDeliveryDestination added in v1.47.8

DeleteDeliveryDestination API operation for Amazon CloudWatch Logs.

Deletes a delivery destination. A delivery is a connection between a logical delivery source and a logical delivery destination.

You can't delete a delivery destination if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery destination, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) operation and check the deliveryDestinationArn field in the results.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDeliveryDestination for usage and error information.

Returned Error Types:

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • ConflictException This operation attempted to create a resource that already exists.

  • ValidationException One of the parameters for the request is not valid.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination

func (*CloudWatchLogs) DeleteDeliveryDestinationPolicy added in v1.47.8

DeleteDeliveryDestinationPolicy API operation for Amazon CloudWatch Logs.

Deletes a delivery destination policy. For more information about these policies, see PutDeliveryDestinationPolicy (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestinationPolicy.html).

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDeliveryDestinationPolicy for usage and error information.

Returned Error Types:

  • ServiceUnavailableException The service cannot complete the request.

  • ValidationException One of the parameters for the request is not valid.

  • ResourceNotFoundException The specified resource does not exist.

  • ConflictException This operation attempted to create a resource that already exists.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy

func (*CloudWatchLogs) DeleteDeliveryDestinationPolicyRequest added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyRequest(input *DeleteDeliveryDestinationPolicyInput) (req *request.Request, output *DeleteDeliveryDestinationPolicyOutput)

DeleteDeliveryDestinationPolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteDeliveryDestinationPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDeliveryDestinationPolicy for more information on using the DeleteDeliveryDestinationPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDeliveryDestinationPolicyRequest method.
req, resp := client.DeleteDeliveryDestinationPolicyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestinationPolicy

func (*CloudWatchLogs) DeleteDeliveryDestinationPolicyWithContext added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryDestinationPolicyWithContext(ctx aws.Context, input *DeleteDeliveryDestinationPolicyInput, opts ...request.Option) (*DeleteDeliveryDestinationPolicyOutput, error)

DeleteDeliveryDestinationPolicyWithContext is the same as DeleteDeliveryDestinationPolicy with the addition of the ability to pass a context and additional request options.

See DeleteDeliveryDestinationPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDeliveryDestinationRequest added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryDestinationRequest(input *DeleteDeliveryDestinationInput) (req *request.Request, output *DeleteDeliveryDestinationOutput)

DeleteDeliveryDestinationRequest generates a "aws/request.Request" representing the client's request for the DeleteDeliveryDestination operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDeliveryDestination for more information on using the DeleteDeliveryDestination API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDeliveryDestinationRequest method.
req, resp := client.DeleteDeliveryDestinationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliveryDestination

func (*CloudWatchLogs) DeleteDeliveryDestinationWithContext added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryDestinationWithContext(ctx aws.Context, input *DeleteDeliveryDestinationInput, opts ...request.Option) (*DeleteDeliveryDestinationOutput, error)

DeleteDeliveryDestinationWithContext is the same as DeleteDeliveryDestination with the addition of the ability to pass a context and additional request options.

See DeleteDeliveryDestination for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDeliveryRequest added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryRequest(input *DeleteDeliveryInput) (req *request.Request, output *DeleteDeliveryOutput)

DeleteDeliveryRequest generates a "aws/request.Request" representing the client's request for the DeleteDelivery operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDelivery for more information on using the DeleteDelivery API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDeliveryRequest method.
req, resp := client.DeleteDeliveryRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDelivery

func (*CloudWatchLogs) DeleteDeliverySource added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliverySource(input *DeleteDeliverySourceInput) (*DeleteDeliverySourceOutput, error)

DeleteDeliverySource API operation for Amazon CloudWatch Logs.

Deletes a delivery source. A delivery is a connection between a logical delivery source and a logical delivery destination.

You can't delete a delivery source if any current deliveries are associated with it. To find whether any deliveries are associated with this delivery source, use the DescribeDeliveries (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeDeliveries.html) operation and check the deliverySourceName field in the results.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDeliverySource for usage and error information.

Returned Error Types:

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • ConflictException This operation attempted to create a resource that already exists.

  • ValidationException One of the parameters for the request is not valid.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource

func (*CloudWatchLogs) DeleteDeliverySourceRequest added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliverySourceRequest(input *DeleteDeliverySourceInput) (req *request.Request, output *DeleteDeliverySourceOutput)

DeleteDeliverySourceRequest generates a "aws/request.Request" representing the client's request for the DeleteDeliverySource operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDeliverySource for more information on using the DeleteDeliverySource API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDeliverySourceRequest method.
req, resp := client.DeleteDeliverySourceRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDeliverySource

func (*CloudWatchLogs) DeleteDeliverySourceWithContext added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliverySourceWithContext(ctx aws.Context, input *DeleteDeliverySourceInput, opts ...request.Option) (*DeleteDeliverySourceOutput, error)

DeleteDeliverySourceWithContext is the same as DeleteDeliverySource with the addition of the ability to pass a context and additional request options.

See DeleteDeliverySource for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDeliveryWithContext added in v1.47.8

func (c *CloudWatchLogs) DeleteDeliveryWithContext(ctx aws.Context, input *DeleteDeliveryInput, opts ...request.Option) (*DeleteDeliveryOutput, error)

DeleteDeliveryWithContext is the same as DeleteDelivery with the addition of the ability to pass a context and additional request options.

See DeleteDelivery for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteDestination added in v0.7.1

func (c *CloudWatchLogs) DeleteDestination(input *DeleteDestinationInput) (*DeleteDestinationOutput, error)

DeleteDestination API operation for Amazon CloudWatch Logs.

Deletes the specified destination, and eventually disables all the subscription filters that publish to it. This operation does not delete the physical resource encapsulated by the destination.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteDestination for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination

func (*CloudWatchLogs) DeleteDestinationRequest added in v0.7.1

func (c *CloudWatchLogs) DeleteDestinationRequest(input *DeleteDestinationInput) (req *request.Request, output *DeleteDestinationOutput)

DeleteDestinationRequest generates a "aws/request.Request" representing the client's request for the DeleteDestination operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteDestination for more information on using the DeleteDestination API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteDestinationRequest method.
req, resp := client.DeleteDestinationRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteDestination

func (*CloudWatchLogs) DeleteDestinationWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteDestinationWithContext(ctx aws.Context, input *DeleteDestinationInput, opts ...request.Option) (*DeleteDestinationOutput, error)

DeleteDestinationWithContext is the same as DeleteDestination with the addition of the ability to pass a context and additional request options.

See DeleteDestination for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteLogAnomalyDetector added in v1.48.4

func (c *CloudWatchLogs) DeleteLogAnomalyDetector(input *DeleteLogAnomalyDetectorInput) (*DeleteLogAnomalyDetectorOutput, error)

DeleteLogAnomalyDetector API operation for Amazon CloudWatch Logs.

Deletes the specified CloudWatch Logs anomaly detector.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteLogAnomalyDetector for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogAnomalyDetector

func (*CloudWatchLogs) DeleteLogAnomalyDetectorRequest added in v1.48.4

func (c *CloudWatchLogs) DeleteLogAnomalyDetectorRequest(input *DeleteLogAnomalyDetectorInput) (req *request.Request, output *DeleteLogAnomalyDetectorOutput)

DeleteLogAnomalyDetectorRequest generates a "aws/request.Request" representing the client's request for the DeleteLogAnomalyDetector operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteLogAnomalyDetector for more information on using the DeleteLogAnomalyDetector API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteLogAnomalyDetectorRequest method.
req, resp := client.DeleteLogAnomalyDetectorRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogAnomalyDetector

func (*CloudWatchLogs) DeleteLogAnomalyDetectorWithContext added in v1.48.4

func (c *CloudWatchLogs) DeleteLogAnomalyDetectorWithContext(ctx aws.Context, input *DeleteLogAnomalyDetectorInput, opts ...request.Option) (*DeleteLogAnomalyDetectorOutput, error)

DeleteLogAnomalyDetectorWithContext is the same as DeleteLogAnomalyDetector with the addition of the ability to pass a context and additional request options.

See DeleteLogAnomalyDetector for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteLogGroup

func (c *CloudWatchLogs) DeleteLogGroup(input *DeleteLogGroupInput) (*DeleteLogGroupOutput, error)

DeleteLogGroup API operation for Amazon CloudWatch Logs.

Deletes the specified log group and permanently deletes all the archived log events associated with the log group.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteLogGroup for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup

func (*CloudWatchLogs) DeleteLogGroupRequest

func (c *CloudWatchLogs) DeleteLogGroupRequest(input *DeleteLogGroupInput) (req *request.Request, output *DeleteLogGroupOutput)

DeleteLogGroupRequest generates a "aws/request.Request" representing the client's request for the DeleteLogGroup operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteLogGroup for more information on using the DeleteLogGroup API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteLogGroupRequest method.
req, resp := client.DeleteLogGroupRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogGroup

func (*CloudWatchLogs) DeleteLogGroupWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteLogGroupWithContext(ctx aws.Context, input *DeleteLogGroupInput, opts ...request.Option) (*DeleteLogGroupOutput, error)

DeleteLogGroupWithContext is the same as DeleteLogGroup with the addition of the ability to pass a context and additional request options.

See DeleteLogGroup for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteLogStream

func (c *CloudWatchLogs) DeleteLogStream(input *DeleteLogStreamInput) (*DeleteLogStreamOutput, error)

DeleteLogStream API operation for Amazon CloudWatch Logs.

Deletes the specified log stream and permanently deletes all the archived log events associated with the log stream.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteLogStream for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream

func (*CloudWatchLogs) DeleteLogStreamRequest

func (c *CloudWatchLogs) DeleteLogStreamRequest(input *DeleteLogStreamInput) (req *request.Request, output *DeleteLogStreamOutput)

DeleteLogStreamRequest generates a "aws/request.Request" representing the client's request for the DeleteLogStream operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteLogStream for more information on using the DeleteLogStream API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteLogStreamRequest method.
req, resp := client.DeleteLogStreamRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteLogStream

func (*CloudWatchLogs) DeleteLogStreamWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteLogStreamWithContext(ctx aws.Context, input *DeleteLogStreamInput, opts ...request.Option) (*DeleteLogStreamOutput, error)

DeleteLogStreamWithContext is the same as DeleteLogStream with the addition of the ability to pass a context and additional request options.

See DeleteLogStream for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteMetricFilter

func (c *CloudWatchLogs) DeleteMetricFilter(input *DeleteMetricFilterInput) (*DeleteMetricFilterOutput, error)

DeleteMetricFilter API operation for Amazon CloudWatch Logs.

Deletes the specified metric filter.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteMetricFilter for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter

func (*CloudWatchLogs) DeleteMetricFilterRequest

func (c *CloudWatchLogs) DeleteMetricFilterRequest(input *DeleteMetricFilterInput) (req *request.Request, output *DeleteMetricFilterOutput)

DeleteMetricFilterRequest generates a "aws/request.Request" representing the client's request for the DeleteMetricFilter operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteMetricFilter for more information on using the DeleteMetricFilter API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteMetricFilterRequest method.
req, resp := client.DeleteMetricFilterRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteMetricFilter

func (*CloudWatchLogs) DeleteMetricFilterWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteMetricFilterWithContext(ctx aws.Context, input *DeleteMetricFilterInput, opts ...request.Option) (*DeleteMetricFilterOutput, error)

DeleteMetricFilterWithContext is the same as DeleteMetricFilter with the addition of the ability to pass a context and additional request options.

See DeleteMetricFilter for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteQueryDefinition added in v1.30.23

func (c *CloudWatchLogs) DeleteQueryDefinition(input *DeleteQueryDefinitionInput) (*DeleteQueryDefinitionOutput, error)

DeleteQueryDefinition API operation for Amazon CloudWatch Logs.

Deletes a saved CloudWatch Logs Insights query definition. A query definition contains details about a saved CloudWatch Logs Insights query.

Each DeleteQueryDefinition operation can delete one query definition.

You must have the logs:DeleteQueryDefinition permission to be able to perform this operation.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteQueryDefinition for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition

func (*CloudWatchLogs) DeleteQueryDefinitionRequest added in v1.30.23

func (c *CloudWatchLogs) DeleteQueryDefinitionRequest(input *DeleteQueryDefinitionInput) (req *request.Request, output *DeleteQueryDefinitionOutput)

DeleteQueryDefinitionRequest generates a "aws/request.Request" representing the client's request for the DeleteQueryDefinition operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteQueryDefinition for more information on using the DeleteQueryDefinition API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteQueryDefinitionRequest method.
req, resp := client.DeleteQueryDefinitionRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteQueryDefinition

func (*CloudWatchLogs) DeleteQueryDefinitionWithContext added in v1.30.23

func (c *CloudWatchLogs) DeleteQueryDefinitionWithContext(ctx aws.Context, input *DeleteQueryDefinitionInput, opts ...request.Option) (*DeleteQueryDefinitionOutput, error)

DeleteQueryDefinitionWithContext is the same as DeleteQueryDefinition with the addition of the ability to pass a context and additional request options.

See DeleteQueryDefinition for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteResourcePolicy added in v1.10.41

func (c *CloudWatchLogs) DeleteResourcePolicy(input *DeleteResourcePolicyInput) (*DeleteResourcePolicyOutput, error)

DeleteResourcePolicy API operation for Amazon CloudWatch Logs.

Deletes a resource policy from this account. This revokes the access of the identities in that policy to put log events to this account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteResourcePolicy for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy

func (*CloudWatchLogs) DeleteResourcePolicyRequest added in v1.10.41

func (c *CloudWatchLogs) DeleteResourcePolicyRequest(input *DeleteResourcePolicyInput) (req *request.Request, output *DeleteResourcePolicyOutput)

DeleteResourcePolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteResourcePolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteResourcePolicy for more information on using the DeleteResourcePolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteResourcePolicyRequest method.
req, resp := client.DeleteResourcePolicyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteResourcePolicy

func (*CloudWatchLogs) DeleteResourcePolicyWithContext added in v1.10.41

func (c *CloudWatchLogs) DeleteResourcePolicyWithContext(ctx aws.Context, input *DeleteResourcePolicyInput, opts ...request.Option) (*DeleteResourcePolicyOutput, error)

DeleteResourcePolicyWithContext is the same as DeleteResourcePolicy with the addition of the ability to pass a context and additional request options.

See DeleteResourcePolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteRetentionPolicy

func (c *CloudWatchLogs) DeleteRetentionPolicy(input *DeleteRetentionPolicyInput) (*DeleteRetentionPolicyOutput, error)

DeleteRetentionPolicy API operation for Amazon CloudWatch Logs.

Deletes the specified retention policy.

Log events do not expire if they belong to log groups without a retention policy.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteRetentionPolicy for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy

func (*CloudWatchLogs) DeleteRetentionPolicyRequest

func (c *CloudWatchLogs) DeleteRetentionPolicyRequest(input *DeleteRetentionPolicyInput) (req *request.Request, output *DeleteRetentionPolicyOutput)

DeleteRetentionPolicyRequest generates a "aws/request.Request" representing the client's request for the DeleteRetentionPolicy operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteRetentionPolicy for more information on using the DeleteRetentionPolicy API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteRetentionPolicyRequest method.
req, resp := client.DeleteRetentionPolicyRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteRetentionPolicy

func (*CloudWatchLogs) DeleteRetentionPolicyWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteRetentionPolicyWithContext(ctx aws.Context, input *DeleteRetentionPolicyInput, opts ...request.Option) (*DeleteRetentionPolicyOutput, error)

DeleteRetentionPolicyWithContext is the same as DeleteRetentionPolicy with the addition of the ability to pass a context and additional request options.

See DeleteRetentionPolicy for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DeleteSubscriptionFilter added in v0.6.1

func (c *CloudWatchLogs) DeleteSubscriptionFilter(input *DeleteSubscriptionFilterInput) (*DeleteSubscriptionFilterOutput, error)

DeleteSubscriptionFilter API operation for Amazon CloudWatch Logs.

Deletes the specified subscription filter.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DeleteSubscriptionFilter for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • ResourceNotFoundException The specified resource does not exist.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter

func (*CloudWatchLogs) DeleteSubscriptionFilterRequest added in v0.6.1

func (c *CloudWatchLogs) DeleteSubscriptionFilterRequest(input *DeleteSubscriptionFilterInput) (req *request.Request, output *DeleteSubscriptionFilterOutput)

DeleteSubscriptionFilterRequest generates a "aws/request.Request" representing the client's request for the DeleteSubscriptionFilter operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DeleteSubscriptionFilter for more information on using the DeleteSubscriptionFilter API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DeleteSubscriptionFilterRequest method.
req, resp := client.DeleteSubscriptionFilterRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DeleteSubscriptionFilter

func (*CloudWatchLogs) DeleteSubscriptionFilterWithContext added in v1.8.0

func (c *CloudWatchLogs) DeleteSubscriptionFilterWithContext(ctx aws.Context, input *DeleteSubscriptionFilterInput, opts ...request.Option) (*DeleteSubscriptionFilterOutput, error)

DeleteSubscriptionFilterWithContext is the same as DeleteSubscriptionFilter with the addition of the ability to pass a context and additional request options.

See DeleteSubscriptionFilter for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DescribeAccountPolicies added in v1.44.278

func (c *CloudWatchLogs) DescribeAccountPolicies(input *DescribeAccountPoliciesInput) (*DescribeAccountPoliciesOutput, error)

DescribeAccountPolicies API operation for Amazon CloudWatch Logs.

Returns a list of all CloudWatch Logs account policies in the account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DescribeAccountPolicies for usage and error information.

Returned Error Types:

  • InvalidParameterException A parameter is specified incorrectly.

  • OperationAbortedException Multiple concurrent requests to update the same resource were in conflict.

  • ResourceNotFoundException The specified resource does not exist.

  • ServiceUnavailableException The service cannot complete the request.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies

func (*CloudWatchLogs) DescribeAccountPoliciesRequest added in v1.44.278

func (c *CloudWatchLogs) DescribeAccountPoliciesRequest(input *DescribeAccountPoliciesInput) (req *request.Request, output *DescribeAccountPoliciesOutput)

DescribeAccountPoliciesRequest generates a "aws/request.Request" representing the client's request for the DescribeAccountPolicies operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeAccountPolicies for more information on using the DescribeAccountPolicies API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeAccountPoliciesRequest method.
req, resp := client.DescribeAccountPoliciesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeAccountPolicies

func (*CloudWatchLogs) DescribeAccountPoliciesWithContext added in v1.44.278

func (c *CloudWatchLogs) DescribeAccountPoliciesWithContext(ctx aws.Context, input *DescribeAccountPoliciesInput, opts ...request.Option) (*DescribeAccountPoliciesOutput, error)

DescribeAccountPoliciesWithContext is the same as DescribeAccountPolicies with the addition of the ability to pass a context and additional request options.

See DescribeAccountPolicies for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DescribeDeliveries added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveries(input *DescribeDeliveriesInput) (*DescribeDeliveriesOutput, error)

DescribeDeliveries API operation for Amazon CloudWatch Logs.

Retrieves a list of the deliveries that have been created in the account.

A delivery is a connection between a delivery source (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliverySource.html) and a delivery destination (https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDeliveryDestination.html).

A delivery source represents an Amazon Web Services resource that sends logs to an logs delivery destination. The destination can be CloudWatch Logs, Amazon S3, or Firehose. Only some Amazon Web Services services support being configured as a delivery source. These services are listed in Enable logging from Amazon Web Services services. (https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AWS-logs-and-resource-policy.html)

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DescribeDeliveries for usage and error information.

Returned Error Types:

  • ServiceUnavailableException The service cannot complete the request.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ValidationException One of the parameters for the request is not valid.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries

func (*CloudWatchLogs) DescribeDeliveriesPages added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveriesPages(input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool) error

DescribeDeliveriesPages iterates over the pages of a DescribeDeliveries operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeDeliveries method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeDeliveries operation.
pageNum := 0
err := client.DescribeDeliveriesPages(params,
    func(page *cloudwatchlogs.DescribeDeliveriesOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*CloudWatchLogs) DescribeDeliveriesPagesWithContext added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveriesPagesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, fn func(*DescribeDeliveriesOutput, bool) bool, opts ...request.Option) error

DescribeDeliveriesPagesWithContext same as DescribeDeliveriesPages except it takes a Context and allows setting request options on the pages.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DescribeDeliveriesRequest added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveriesRequest(input *DescribeDeliveriesInput) (req *request.Request, output *DescribeDeliveriesOutput)

DescribeDeliveriesRequest generates a "aws/request.Request" representing the client's request for the DescribeDeliveries operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See DescribeDeliveries for more information on using the DescribeDeliveries API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the DescribeDeliveriesRequest method.
req, resp := client.DescribeDeliveriesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveries

func (*CloudWatchLogs) DescribeDeliveriesWithContext added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveriesWithContext(ctx aws.Context, input *DescribeDeliveriesInput, opts ...request.Option) (*DescribeDeliveriesOutput, error)

DescribeDeliveriesWithContext is the same as DescribeDeliveries with the addition of the ability to pass a context and additional request options.

See DescribeDeliveries for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

func (*CloudWatchLogs) DescribeDeliveryDestinations added in v1.47.8

DescribeDeliveryDestinations API operation for Amazon CloudWatch Logs.

Retrieves a list of the delivery destinations that have been created in the account.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon CloudWatch Logs's API operation DescribeDeliveryDestinations for usage and error information.

Returned Error Types:

  • ServiceUnavailableException The service cannot complete the request.

  • ServiceQuotaExceededException This request exceeds a service quota.

  • ValidationException One of the parameters for the request is not valid.

  • ThrottlingException The request was throttled because of quota limits.

See also, https://docs.aws.amazon.com/goto/WebAPI/logs-2014-03-28/DescribeDeliveryDestinations

func (*CloudWatchLogs) DescribeDeliveryDestinationsPages added in v1.47.8

func (c *CloudWatchLogs) DescribeDeliveryDestinationsPages(input *DescribeDeliveryDestinationsInput, fn func(*DescribeDeliveryDestinationsOutput, bool) bool) error

DescribeDeliveryDestinationsPages iterates over the pages of a DescribeDeliveryDestinations operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See DescribeDeliveryDestinations method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a DescribeDeliveryDestinations operation.
pageNum := 0
err := client.DescribeDeliveryDestinationsPages(params,
    func(page *cloudwatchlogs.DescribeDeliveryDestinationsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*CloudWatchLogs)