« blib/lib/Paws/IoT/CreateDynamicThingGroupResponse.pm
↑ Summary
blib/lib/Paws/IoT/CreateJobResponse.pm »
| 1 | |||
| 2 | package Paws::IoT::CreateJob; | ||
| 3 | use Moose; | ||
| 4 | has AbortConfig => (is => 'ro', isa => 'Paws::IoT::AbortConfig', traits => ['NameInRequest'], request_name => 'abortConfig'); | ||
| 5 | has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description'); | ||
| 6 | has Document => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'document'); | ||
| 7 | has DocumentSource => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'documentSource'); | ||
| 8 | has JobExecutionsRolloutConfig => (is => 'ro', isa => 'Paws::IoT::JobExecutionsRolloutConfig', traits => ['NameInRequest'], request_name => 'jobExecutionsRolloutConfig'); | ||
| 9 | has JobId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'jobId', required => 1); | ||
| 10 | has JobTemplateArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'jobTemplateArn'); | ||
| 11 | has NamespaceId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'namespaceId'); | ||
| 12 | has PresignedUrlConfig => (is => 'ro', isa => 'Paws::IoT::PresignedUrlConfig', traits => ['NameInRequest'], request_name => 'presignedUrlConfig'); | ||
| 13 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::IoT::Tag]', traits => ['NameInRequest'], request_name => 'tags'); | ||
| 14 | has Targets => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'targets', required => 1); | ||
| 15 | has TargetSelection => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'targetSelection'); | ||
| 16 | has TimeoutConfig => (is => 'ro', isa => 'Paws::IoT::TimeoutConfig', traits => ['NameInRequest'], request_name => 'timeoutConfig'); | ||
| 17 | |||
| 18 | use MooseX::ClassAttribute; | ||
| 19 | |||
| 20 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateJob'); | ||
| 21 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/jobs/{jobId}'); | ||
| 22 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); | ||
| 23 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::IoT::CreateJobResponse'); | ||
| 24 | 1; | ||
| 25 | |||
| 26 | ### main pod documentation begin ### | ||
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Paws::IoT::CreateJob - Arguments for method CreateJob on L<Paws::IoT> | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 34 | This class represents the parameters used for calling the method CreateJob on the | ||
| 35 | L<AWS IoT|Paws::IoT> service. Use the attributes of this class | ||
| 36 | as arguments to method CreateJob. | ||
| 37 | |||
| 38 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateJob. | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | my $iot = Paws->service('IoT'); | ||
| 43 | my $CreateJobResponse = $iot->CreateJob( | ||
| 44 | JobId => 'MyJobId', | ||
| 45 | Targets => [ | ||
| 46 | 'MyTargetArn', ... # max: 2048 | ||
| 47 | ], | ||
| 48 | AbortConfig => { | ||
| 49 | CriteriaList => [ | ||
| 50 | { | ||
| 51 | Action => 'CANCEL', # values: CANCEL | ||
| 52 | FailureType => 'FAILED', # values: FAILED, REJECTED, TIMED_OUT, ALL | ||
| 53 | MinNumberOfExecutedThings => 1, # min: 1 | ||
| 54 | ThresholdPercentage => 1, # max: 100 | ||
| 55 | |||
| 56 | }, | ||
| 57 | ... | ||
| 58 | ], # min: 1 | ||
| 59 | |||
| 60 | }, # OPTIONAL | ||
| 61 | Description => 'MyJobDescription', # OPTIONAL | ||
| 62 | Document => 'MyJobDocument', # OPTIONAL | ||
| 63 | DocumentSource => 'MyJobDocumentSource', # OPTIONAL | ||
| 64 | JobExecutionsRolloutConfig => { | ||
| 65 | ExponentialRate => { | ||
| 66 | BaseRatePerMinute => 1, # min: 1, max: 1000 | ||
| 67 | IncrementFactor => 1, # min: 1, max: 5 | ||
| 68 | RateIncreaseCriteria => { | ||
| 69 | NumberOfNotifiedThings => 1, # min: 1; OPTIONAL | ||
| 70 | NumberOfSucceededThings => 1, # min: 1; OPTIONAL | ||
| 71 | }, | ||
| 72 | |||
| 73 | }, # OPTIONAL | ||
| 74 | MaximumPerMinute => 1, # min: 1; OPTIONAL | ||
| 75 | }, # OPTIONAL | ||
| 76 | JobTemplateArn => 'MyJobTemplateArn', # OPTIONAL | ||
| 77 | NamespaceId => 'MyNamespaceId', # OPTIONAL | ||
| 78 | PresignedUrlConfig => { | ||
| 79 | ExpiresInSec => 1, # min: 60, max: 3600; OPTIONAL | ||
| 80 | RoleArn => 'MyRoleArn', # min: 20, max: 2048; OPTIONAL | ||
| 81 | }, # OPTIONAL | ||
| 82 | Tags => [ | ||
| 83 | { | ||
| 84 | Key => 'MyTagKey', # min: 1, max: 128 | ||
| 85 | Value => 'MyTagValue', # min: 1, max: 256; OPTIONAL | ||
| 86 | }, | ||
| 87 | ... | ||
| 88 | ], # OPTIONAL | ||
| 89 | TargetSelection => 'CONTINUOUS', # OPTIONAL | ||
| 90 | TimeoutConfig => { | ||
| 91 | InProgressTimeoutInMinutes => 1, # OPTIONAL | ||
| 92 | }, # OPTIONAL | ||
| 93 | ); | ||
| 94 | |||
| 95 | # Results: | ||
| 96 | my $Description = $CreateJobResponse->Description; | ||
| 97 | my $JobArn = $CreateJobResponse->JobArn; | ||
| 98 | my $JobId = $CreateJobResponse->JobId; | ||
| 99 | |||
| 100 | # Returns a L<Paws::IoT::CreateJobResponse> object. | ||
| 101 | |||
| 102 | 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. | ||
| 103 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/iot/CreateJob> | ||
| 104 | |||
| 105 | =head1 ATTRIBUTES | ||
| 106 | |||
| 107 | |||
| 108 | =head2 AbortConfig => L<Paws::IoT::AbortConfig> | ||
| 109 | |||
| 110 | Allows you to create criteria to abort a job. | ||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | =head2 Description => Str | ||
| 115 | |||
| 116 | A short text description of the job. | ||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | =head2 Document => Str | ||
| 121 | |||
| 122 | The job document. Required if you don't specify a value for | ||
| 123 | C<documentSource>. | ||
| 124 | |||
| 125 | |||
| 126 | |||
| 127 | =head2 DocumentSource => Str | ||
| 128 | |||
| 129 | An S3 link to the job document. Required if you don't specify a value | ||
| 130 | for C<document>. | ||
| 131 | |||
| 132 | If the job document resides in an S3 bucket, you must use a placeholder | ||
| 133 | link when specifying the document. | ||
| 134 | |||
| 135 | The placeholder link is of the following form: | ||
| 136 | |||
| 137 | C<${aws:iot:s3-presigned-url:https://s3.amazonaws.com/I<bucket>/I<key>}> | ||
| 138 | |||
| 139 | where I<bucket> is your bucket name and I<key> is the object in the | ||
| 140 | bucket to which you are linking. | ||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | =head2 JobExecutionsRolloutConfig => L<Paws::IoT::JobExecutionsRolloutConfig> | ||
| 145 | |||
| 146 | Allows you to create a staged rollout of the job. | ||
| 147 | |||
| 148 | |||
| 149 | |||
| 150 | =head2 B<REQUIRED> JobId => Str | ||
| 151 | |||
| 152 | A job identifier which must be unique for your AWS account. We | ||
| 153 | recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid | ||
| 154 | for use here. | ||
| 155 | |||
| 156 | |||
| 157 | |||
| 158 | =head2 JobTemplateArn => Str | ||
| 159 | |||
| 160 | The ARN of the job template used to create the job. | ||
| 161 | |||
| 162 | |||
| 163 | |||
| 164 | =head2 NamespaceId => Str | ||
| 165 | |||
| 166 | The namespace used to indicate that a job is a customer-managed job. | ||
| 167 | |||
| 168 | When you specify a value for this parameter, AWS IoT Core sends jobs | ||
| 169 | notifications to MQTT topics that contain the value in the following | ||
| 170 | format. | ||
| 171 | |||
| 172 | C<$aws/things/I<THING_NAME>/jobs/I<JOB_ID>/notify-namespace-I<NAMESPACE_ID>/> | ||
| 173 | |||
| 174 | The C<namespaceId> feature is in public preview. | ||
| 175 | |||
| 176 | |||
| 177 | |||
| 178 | =head2 PresignedUrlConfig => L<Paws::IoT::PresignedUrlConfig> | ||
| 179 | |||
| 180 | Configuration information for pre-signed S3 URLs. | ||
| 181 | |||
| 182 | |||
| 183 | |||
| 184 | =head2 Tags => ArrayRef[L<Paws::IoT::Tag>] | ||
| 185 | |||
| 186 | Metadata which can be used to manage the job. | ||
| 187 | |||
| 188 | |||
| 189 | |||
| 190 | =head2 B<REQUIRED> Targets => ArrayRef[Str|Undef] | ||
| 191 | |||
| 192 | A list of things and thing groups to which the job should be sent. | ||
| 193 | |||
| 194 | |||
| 195 | |||
| 196 | =head2 TargetSelection => Str | ||
| 197 | |||
| 198 | Specifies whether the job will continue to run (CONTINUOUS), or will be | ||
| 199 | complete after all those things specified as targets have completed the | ||
| 200 | job (SNAPSHOT). If continuous, the job may also be run on a thing when | ||
| 201 | a change is detected in a target. For example, a job will run on a | ||
| 202 | thing when the thing is added to a target group, even after the job was | ||
| 203 | completed by all things originally in the group. | ||
| 204 | |||
| 205 | Valid values are: C<"CONTINUOUS">, C<"SNAPSHOT"> | ||
| 206 | |||
| 207 | =head2 TimeoutConfig => L<Paws::IoT::TimeoutConfig> | ||
| 208 | |||
| 209 | Specifies the amount of time each device has to finish its execution of | ||
| 210 | the job. The timer is started when the job execution status is set to | ||
| 211 | C<IN_PROGRESS>. If the job execution status is not set to another | ||
| 212 | terminal state before the time expires, it will be automatically set to | ||
| 213 | C<TIMED_OUT>. | ||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | |||
| 218 | =head1 SEE ALSO | ||
| 219 | |||
| 220 | This class forms part of L<Paws>, documenting arguments for method CreateJob in L<Paws::IoT> | ||
| 221 | |||
| 222 | =head1 BUGS and CONTRIBUTIONS | ||
| 223 | |||
| 224 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 225 | |||
| 226 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 227 | |||
| 228 | =cut | ||
| 229 |