« blib/lib/Paws/Synthetics/CanaryTimeline.pm
↑ Summary
blib/lib/Paws/Synthetics/CreateCanaryResponse.pm »
| 1 | |||
| 2 | package Paws::Synthetics::CreateCanary; | ||
| 3 | use Moose; | ||
| 4 | has ArtifactS3Location => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has Code => (is => 'ro', isa => 'Paws::Synthetics::CanaryCodeInput', required => 1); | ||
| 6 | has ExecutionRoleArn => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has FailureRetentionPeriodInDays => (is => 'ro', isa => 'Int'); | ||
| 8 | has Name => (is => 'ro', isa => 'Str', required => 1); | ||
| 9 | has RunConfig => (is => 'ro', isa => 'Paws::Synthetics::CanaryRunConfigInput'); | ||
| 10 | has RuntimeVersion => (is => 'ro', isa => 'Str', required => 1); | ||
| 11 | has Schedule => (is => 'ro', isa => 'Paws::Synthetics::CanaryScheduleInput', required => 1); | ||
| 12 | has SuccessRetentionPeriodInDays => (is => 'ro', isa => 'Int'); | ||
| 13 | has Tags => (is => 'ro', isa => 'Paws::Synthetics::TagMap'); | ||
| 14 | has VpcConfig => (is => 'ro', isa => 'Paws::Synthetics::VpcConfigInput'); | ||
| 15 | |||
| 16 | use MooseX::ClassAttribute; | ||
| 17 | |||
| 18 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateCanary'); | ||
| 19 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/canary'); | ||
| 20 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 21 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Synthetics::CreateCanaryResponse'); | ||
| 22 | 1; | ||
| 23 | |||
| 24 | ### main pod documentation begin ### | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Paws::Synthetics::CreateCanary - Arguments for method CreateCanary on L<Paws::Synthetics> | ||
| 29 | |||
| 30 | =head1 DESCRIPTION | ||
| 31 | |||
| 32 | This class represents the parameters used for calling the method CreateCanary on the | ||
| 33 | L<Synthetics|Paws::Synthetics> service. Use the attributes of this class | ||
| 34 | as arguments to method CreateCanary. | ||
| 35 | |||
| 36 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateCanary. | ||
| 37 | |||
| 38 | =head1 SYNOPSIS | ||
| 39 | |||
| 40 | my $synthetics = Paws->service('Synthetics'); | ||
| 41 | my $CreateCanaryResponse = $synthetics->CreateCanary( | ||
| 42 | ArtifactS3Location => 'MyString', | ||
| 43 | Code => { | ||
| 44 | Handler => 'MyString', # min: 1, max: 1024 | ||
| 45 | S3Bucket => 'MyString', # min: 1, max: 1024 | ||
| 46 | S3Key => 'MyString', # min: 1, max: 1024 | ||
| 47 | S3Version => 'MyString', # min: 1, max: 1024 | ||
| 48 | ZipFile => 'BlobBlob', # min: 1, max: 10000000; OPTIONAL | ||
| 49 | }, | ||
| 50 | ExecutionRoleArn => 'MyRoleArn', | ||
| 51 | Name => 'MyCanaryName', | ||
| 52 | RuntimeVersion => 'MyString', | ||
| 53 | Schedule => { | ||
| 54 | Expression => 'MyString', # min: 1, max: 1024 | ||
| 55 | DurationInSeconds => 1, # max: 31622400; OPTIONAL | ||
| 56 | }, | ||
| 57 | FailureRetentionPeriodInDays => 1, # OPTIONAL | ||
| 58 | RunConfig => { | ||
| 59 | ActiveTracing => 1, # OPTIONAL | ||
| 60 | EnvironmentVariables => | ||
| 61 | { 'MyEnvironmentVariableName' => 'MyEnvironmentVariableValue', } | ||
| 62 | , # OPTIONAL | ||
| 63 | MemoryInMB => 1, # min: 960, max: 3008; OPTIONAL | ||
| 64 | TimeoutInSeconds => 1, # min: 3, max: 840; OPTIONAL | ||
| 65 | }, # OPTIONAL | ||
| 66 | SuccessRetentionPeriodInDays => 1, # OPTIONAL | ||
| 67 | Tags => { | ||
| 68 | 'MyTagKey' => 'MyTagValue', # key: min: 1, max: 128, value: max: 256 | ||
| 69 | }, # OPTIONAL | ||
| 70 | VpcConfig => { | ||
| 71 | SecurityGroupIds => [ 'MySecurityGroupId', ... ], # max: 5; OPTIONAL | ||
| 72 | SubnetIds => [ 'MySubnetId', ... ], # max: 16; OPTIONAL | ||
| 73 | }, # OPTIONAL | ||
| 74 | ); | ||
| 75 | |||
| 76 | # Results: | ||
| 77 | my $Canary = $CreateCanaryResponse->Canary; | ||
| 78 | |||
| 79 | # Returns a L<Paws::Synthetics::CreateCanaryResponse> object. | ||
| 80 | |||
| 81 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 82 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/synthetics/CreateCanary> | ||
| 83 | |||
| 84 | =head1 ATTRIBUTES | ||
| 85 | |||
| 86 | |||
| 87 | =head2 B<REQUIRED> ArtifactS3Location => Str | ||
| 88 | |||
| 89 | The location in Amazon S3 where Synthetics stores artifacts from the | ||
| 90 | test runs of this canary. Artifacts include the log file, screenshots, | ||
| 91 | and HAR files. | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | =head2 B<REQUIRED> Code => L<Paws::Synthetics::CanaryCodeInput> | ||
| 96 | |||
| 97 | A structure that includes the entry point from which the canary should | ||
| 98 | start running your script. If the script is stored in an S3 bucket, the | ||
| 99 | bucket name, key, and version are also included. | ||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | =head2 B<REQUIRED> ExecutionRoleArn => Str | ||
| 104 | |||
| 105 | The ARN of the IAM role to be used to run the canary. This role must | ||
| 106 | already exist, and must include C<lambda.amazonaws.com> as a principal | ||
| 107 | in the trust policy. The role must also have the following permissions: | ||
| 108 | |||
| 109 | =over | ||
| 110 | |||
| 111 | =item * | ||
| 112 | |||
| 113 | C<s3:PutObject> | ||
| 114 | |||
| 115 | =item * | ||
| 116 | |||
| 117 | C<s3:GetBucketLocation> | ||
| 118 | |||
| 119 | =item * | ||
| 120 | |||
| 121 | C<s3:ListAllMyBuckets> | ||
| 122 | |||
| 123 | =item * | ||
| 124 | |||
| 125 | C<cloudwatch:PutMetricData> | ||
| 126 | |||
| 127 | =item * | ||
| 128 | |||
| 129 | C<logs:CreateLogGroup> | ||
| 130 | |||
| 131 | =item * | ||
| 132 | |||
| 133 | C<logs:CreateLogStream> | ||
| 134 | |||
| 135 | =item * | ||
| 136 | |||
| 137 | C<logs:PutLogEvents> | ||
| 138 | |||
| 139 | =back | ||
| 140 | |||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | =head2 FailureRetentionPeriodInDays => Int | ||
| 145 | |||
| 146 | The number of days to retain data about failed runs of this canary. If | ||
| 147 | you omit this field, the default of 31 days is used. The valid range is | ||
| 148 | 1 to 455 days. | ||
| 149 | |||
| 150 | |||
| 151 | |||
| 152 | =head2 B<REQUIRED> Name => Str | ||
| 153 | |||
| 154 | The name for this canary. Be sure to give it a descriptive name that | ||
| 155 | distinguishes it from other canaries in your account. | ||
| 156 | |||
| 157 | Do not include secrets or proprietary information in your canary names. | ||
| 158 | The canary name makes up part of the canary ARN, and the ARN is | ||
| 159 | included in outbound calls over the internet. For more information, see | ||
| 160 | Security Considerations for Synthetics Canaries | ||
| 161 | (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/servicelens_canaries_security.html). | ||
| 162 | |||
| 163 | |||
| 164 | |||
| 165 | =head2 RunConfig => L<Paws::Synthetics::CanaryRunConfigInput> | ||
| 166 | |||
| 167 | A structure that contains the configuration for individual canary runs, | ||
| 168 | such as timeout value. | ||
| 169 | |||
| 170 | |||
| 171 | |||
| 172 | =head2 B<REQUIRED> RuntimeVersion => Str | ||
| 173 | |||
| 174 | Specifies the runtime version to use for the canary. For a list of | ||
| 175 | valid runtime versions and more information about runtime versions, see | ||
| 176 | Canary Runtime Versions | ||
| 177 | (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html). | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | =head2 B<REQUIRED> Schedule => L<Paws::Synthetics::CanaryScheduleInput> | ||
| 182 | |||
| 183 | A structure that contains information about how often the canary is to | ||
| 184 | run and when these test runs are to stop. | ||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | =head2 SuccessRetentionPeriodInDays => Int | ||
| 189 | |||
| 190 | The number of days to retain data about successful runs of this canary. | ||
| 191 | If you omit this field, the default of 31 days is used. The valid range | ||
| 192 | is 1 to 455 days. | ||
| 193 | |||
| 194 | |||
| 195 | |||
| 196 | =head2 Tags => L<Paws::Synthetics::TagMap> | ||
| 197 | |||
| 198 | A list of key-value pairs to associate with the canary. You can | ||
| 199 | associate as many as 50 tags with a canary. | ||
| 200 | |||
| 201 | Tags can help you organize and categorize your resources. You can also | ||
| 202 | use them to scope user permissions, by granting a user permission to | ||
| 203 | access or change only the resources that have certain tag values. | ||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | =head2 VpcConfig => L<Paws::Synthetics::VpcConfigInput> | ||
| 208 | |||
| 209 | If this canary is to test an endpoint in a VPC, this structure contains | ||
| 210 | information about the subnet and security groups of the VPC endpoint. | ||
| 211 | For more information, see Running a Canary in a VPC | ||
| 212 | (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_VPC.html). | ||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | =head1 SEE ALSO | ||
| 218 | |||
| 219 | This class forms part of L<Paws>, documenting arguments for method CreateCanary in L<Paws::Synthetics> | ||
| 220 | |||
| 221 | =head1 BUGS and CONTRIBUTIONS | ||
| 222 | |||
| 223 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 224 | |||
| 225 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 226 | |||
| 227 | =cut | ||
| 228 |