Skip to content

New-PodeLogAwsMethod

SYNOPSIS

Creates a new AWS CloudWatch Log Method.

SYNTAX

New-PodeLogAwsMethod [[-Id] <String>] [-LogGroupName] <String> [-LogStreamName] <String> [-Region] <String>
 [-Token] <String> [[-SourceType] <String>] [[-Source] <String>] [[-Index] <String>] [[-BatchInfo] <Hashtable>]
 [-SkipCertificateCheck] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Creates a new AWS CloudWatch Log Method for outputting log items to an AWS CloudWatch Logs group and stream.

EXAMPLES

EXAMPLE 1

'

EXAMPLE 2

$batchInfo = New-PodeLogBatchInfo -Size 10 -Timeout 10
$methodId = New-PodeLogAwsMethod -LogGroupName 'my-log-group' -LogStreamName 'my-log-stream' -Region 'us-east-1' -Token '<token>' -BatchInfo $batchInfo

PARAMETERS

-BatchInfo

An optional hashtable containing batch configuration for writing log items in bulk. Should be created using New-PodeLogBatchInfo.

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 9
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

An optional ID to assign to the Log Method. If not supplied, a random ID will be generated.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Index

The index for the log events.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 8
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogGroupName

The name of the AWS CloudWatch Logs group to which log events will be sent.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-LogStreamName

The name of the AWS CloudWatch Logs stream within the specified log group.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Region

The AWS region where the CloudWatch Logs group and stream are located.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SkipCertificateCheck

If supplied, the API request will skip certificate validation checks.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Source

The source for the log events. (Default: the server's AppName)

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SourceType

The source type for the log events.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Token

The authentication bearer token for the AWS CloudWatch Logs API.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

NOTES