| 1 | |||
| 2 | package Paws::DLM::CreateLifecyclePolicy; | ||
| 3 | use Moose; | ||
| 4 | has Description => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has ExecutionRoleArn => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has PolicyDetails => (is => 'ro', isa => 'Paws::DLM::PolicyDetails', required => 1); | ||
| 7 | has State => (is => 'ro', isa => 'Str', required => 1); | ||
| 8 | has Tags => (is => 'ro', isa => 'Paws::DLM::TagMap'); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateLifecyclePolicy'); | ||
| 13 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/policies'); | ||
| 14 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 15 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DLM::CreateLifecyclePolicyResponse'); | ||
| 16 | 1; | ||
| 17 | |||
| 18 | ### main pod documentation begin ### | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | Paws::DLM::CreateLifecyclePolicy - Arguments for method CreateLifecyclePolicy on L<Paws::DLM> | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | This class represents the parameters used for calling the method CreateLifecyclePolicy on the | ||
| 27 | L<Amazon Data Lifecycle Manager|Paws::DLM> service. Use the attributes of this class | ||
| 28 | as arguments to method CreateLifecyclePolicy. | ||
| 29 | |||
| 30 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateLifecyclePolicy. | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | my $dlm = Paws->service('DLM'); | ||
| 35 | my $CreateLifecyclePolicyResponse = $dlm->CreateLifecyclePolicy( | ||
| 36 | Description => 'MyPolicyDescription', | ||
| 37 | ExecutionRoleArn => 'MyExecutionRoleArn', | ||
| 38 | PolicyDetails => { | ||
| 39 | Actions => [ | ||
| 40 | { | ||
| 41 | CrossRegionCopy => [ | ||
| 42 | { | ||
| 43 | EncryptionConfiguration => { | ||
| 44 | Encrypted => 1, | ||
| 45 | CmkArn => 'MyCmkArn', # max: 2048; OPTIONAL | ||
| 46 | }, | ||
| 47 | Target => 'MyTarget', # max: 2048 | ||
| 48 | RetainRule => { | ||
| 49 | Interval => 1, # min: 1; OPTIONAL | ||
| 50 | IntervalUnit => | ||
| 51 | 'DAYS', # values: DAYS, WEEKS, MONTHS, YEARS; OPTIONAL | ||
| 52 | }, # OPTIONAL | ||
| 53 | }, | ||
| 54 | ... | ||
| 55 | ], # max: 3 | ||
| 56 | Name => 'MyActionName', # max: 120 | ||
| 57 | |||
| 58 | }, | ||
| 59 | ... | ||
| 60 | ], # min: 1, max: 1; OPTIONAL | ||
| 61 | EventSource => { | ||
| 62 | Type => 'MANAGED_CWE', # values: MANAGED_CWE | ||
| 63 | Parameters => { | ||
| 64 | DescriptionRegex => 'MyDescriptionRegex', # max: 1000 | ||
| 65 | EventType => 'shareSnapshot', # values: shareSnapshot | ||
| 66 | SnapshotOwner => [ | ||
| 67 | 'MyAwsAccountId', ... # min: 12, max: 12 | ||
| 68 | ], # max: 50 | ||
| 69 | |||
| 70 | }, # OPTIONAL | ||
| 71 | }, # OPTIONAL | ||
| 72 | Parameters => { | ||
| 73 | ExcludeBootVolume => 1, # OPTIONAL | ||
| 74 | NoReboot => 1, # OPTIONAL | ||
| 75 | }, # OPTIONAL | ||
| 76 | PolicyType => 'EBS_SNAPSHOT_MANAGEMENT' | ||
| 77 | , # values: EBS_SNAPSHOT_MANAGEMENT, IMAGE_MANAGEMENT, EVENT_BASED_POLICY; OPTIONAL | ||
| 78 | ResourceLocations => [ | ||
| 79 | 'CLOUD', ... # values: CLOUD, OUTPOST | ||
| 80 | ], # min: 1, max: 1; OPTIONAL | ||
| 81 | ResourceTypes => [ | ||
| 82 | 'VOLUME', ... # values: VOLUME, INSTANCE | ||
| 83 | ], # min: 1, max: 1; OPTIONAL | ||
| 84 | Schedules => [ | ||
| 85 | { | ||
| 86 | CopyTags => 1, # OPTIONAL | ||
| 87 | CreateRule => { | ||
| 88 | CronExpression => | ||
| 89 | 'MyCronExpression', # min: 17, max: 106; OPTIONAL | ||
| 90 | Interval => 1, # min: 1; OPTIONAL | ||
| 91 | IntervalUnit => 'HOURS', # values: HOURS; OPTIONAL | ||
| 92 | Location => 'CLOUD', # values: CLOUD, OUTPOST_LOCAL; OPTIONAL | ||
| 93 | Times => [ | ||
| 94 | 'MyTime', ... # min: 5, max: 5 | ||
| 95 | ], # max: 1; OPTIONAL | ||
| 96 | }, # OPTIONAL | ||
| 97 | CrossRegionCopyRules => [ | ||
| 98 | { | ||
| 99 | Encrypted => 1, | ||
| 100 | CmkArn => 'MyCmkArn', # max: 2048; OPTIONAL | ||
| 101 | CopyTags => 1, # OPTIONAL | ||
| 102 | RetainRule => { | ||
| 103 | Interval => 1, # min: 1; OPTIONAL | ||
| 104 | IntervalUnit => | ||
| 105 | 'DAYS', # values: DAYS, WEEKS, MONTHS, YEARS; OPTIONAL | ||
| 106 | }, # OPTIONAL | ||
| 107 | Target => 'MyTarget', # max: 2048 | ||
| 108 | TargetRegion => 'MyTargetRegion', # max: 16; OPTIONAL | ||
| 109 | }, | ||
| 110 | ... | ||
| 111 | ], # max: 3; OPTIONAL | ||
| 112 | FastRestoreRule => { | ||
| 113 | AvailabilityZones => [ | ||
| 114 | 'MyAvailabilityZone', ... # max: 16 | ||
| 115 | ], # min: 1, max: 10 | ||
| 116 | Count => 1, # min: 1, max: 1000; OPTIONAL | ||
| 117 | Interval => 1, # min: 1; OPTIONAL | ||
| 118 | IntervalUnit => | ||
| 119 | 'DAYS', # values: DAYS, WEEKS, MONTHS, YEARS; OPTIONAL | ||
| 120 | }, # OPTIONAL | ||
| 121 | Name => 'MyScheduleName', # max: 120; OPTIONAL | ||
| 122 | RetainRule => { | ||
| 123 | Count => 1, # min: 1, max: 1000; OPTIONAL | ||
| 124 | Interval => 1, # min: 1; OPTIONAL | ||
| 125 | IntervalUnit => | ||
| 126 | 'DAYS', # values: DAYS, WEEKS, MONTHS, YEARS; OPTIONAL | ||
| 127 | }, # OPTIONAL | ||
| 128 | ShareRules => [ | ||
| 129 | { | ||
| 130 | TargetAccounts => [ | ||
| 131 | 'MyAwsAccountId', ... # min: 12, max: 12 | ||
| 132 | ], # min: 1 | ||
| 133 | UnshareInterval => 1, # min: 1; OPTIONAL | ||
| 134 | UnshareIntervalUnit => | ||
| 135 | 'DAYS', # values: DAYS, WEEKS, MONTHS, YEARS; OPTIONAL | ||
| 136 | }, | ||
| 137 | ... | ||
| 138 | ], # max: 1; OPTIONAL | ||
| 139 | TagsToAdd => [ | ||
| 140 | { | ||
| 141 | Key => 'MyString', # max: 500 | ||
| 142 | Value => 'MyString', # max: 500 | ||
| 143 | |||
| 144 | }, | ||
| 145 | ... | ||
| 146 | ], # max: 45; OPTIONAL | ||
| 147 | VariableTags => [ | ||
| 148 | { | ||
| 149 | Key => 'MyString', # max: 500 | ||
| 150 | Value => 'MyString', # max: 500 | ||
| 151 | |||
| 152 | }, | ||
| 153 | ... | ||
| 154 | ], # max: 45; OPTIONAL | ||
| 155 | }, | ||
| 156 | ... | ||
| 157 | ], # min: 1, max: 4; OPTIONAL | ||
| 158 | TargetTags => [ | ||
| 159 | { | ||
| 160 | Key => 'MyString', # max: 500 | ||
| 161 | Value => 'MyString', # max: 500 | ||
| 162 | |||
| 163 | }, | ||
| 164 | ... | ||
| 165 | ], # min: 1, max: 50; OPTIONAL | ||
| 166 | }, | ||
| 167 | State => 'ENABLED', | ||
| 168 | Tags => { | ||
| 169 | 'MyTagKey' => 'MyTagValue', # key: min: 1, max: 128, value: max: 256 | ||
| 170 | }, # OPTIONAL | ||
| 171 | ); | ||
| 172 | |||
| 173 | # Results: | ||
| 174 | my $PolicyId = $CreateLifecyclePolicyResponse->PolicyId; | ||
| 175 | |||
| 176 | # Returns a L<Paws::DLM::CreateLifecyclePolicyResponse> object. | ||
| 177 | |||
| 178 | 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. | ||
| 179 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dlm/CreateLifecyclePolicy> | ||
| 180 | |||
| 181 | =head1 ATTRIBUTES | ||
| 182 | |||
| 183 | |||
| 184 | =head2 B<REQUIRED> Description => Str | ||
| 185 | |||
| 186 | A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ | ||
| 187 | are supported. | ||
| 188 | |||
| 189 | |||
| 190 | |||
| 191 | =head2 B<REQUIRED> ExecutionRoleArn => Str | ||
| 192 | |||
| 193 | The Amazon Resource Name (ARN) of the IAM role used to run the | ||
| 194 | operations specified by the lifecycle policy. | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head2 B<REQUIRED> PolicyDetails => L<Paws::DLM::PolicyDetails> | ||
| 199 | |||
| 200 | The configuration details of the lifecycle policy. | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | =head2 B<REQUIRED> State => Str | ||
| 205 | |||
| 206 | The desired activation state of the lifecycle policy after creation. | ||
| 207 | |||
| 208 | Valid values are: C<"ENABLED">, C<"DISABLED"> | ||
| 209 | |||
| 210 | =head2 Tags => L<Paws::DLM::TagMap> | ||
| 211 | |||
| 212 | The tags to apply to the lifecycle policy during creation. | ||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | =head1 SEE ALSO | ||
| 218 | |||
| 219 | This class forms part of L<Paws>, documenting arguments for method CreateLifecyclePolicy in L<Paws::DLM> | ||
| 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 |