| 1 | # Generated by default/object.tt | ||
| 2 | package Paws::SSM::Target; | ||
| 3 | use Moose; | ||
| 4 | has Key => (is => 'ro', isa => 'Str'); | ||
| 5 | has Values => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 6 | |||
| 7 | 1; | ||
| 8 | |||
| 9 | ### main pod documentation begin ### | ||
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | Paws::SSM::Target | ||
| 14 | |||
| 15 | =head1 USAGE | ||
| 16 | |||
| 17 | This class represents one of two things: | ||
| 18 | |||
| 19 | =head3 Arguments in a call to a service | ||
| 20 | |||
| 21 | Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. | ||
| 22 | Each attribute should be used as a named argument in the calls that expect this type of object. | ||
| 23 | |||
| 24 | As an example, if Att1 is expected to be a Paws::SSM::Target object: | ||
| 25 | |||
| 26 | $service_obj->Method(Att1 => { Key => $value, ..., Values => $value }); | ||
| 27 | |||
| 28 | =head3 Results returned from an API call | ||
| 29 | |||
| 30 | Use accessors for each attribute. If Att1 is expected to be an Paws::SSM::Target object: | ||
| 31 | |||
| 32 | $result = $service_obj->Method(...); | ||
| 33 | $result->Att1->Key | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | An array of search criteria that targets instances using a Key,Value | ||
| 38 | combination that you specify. | ||
| 39 | |||
| 40 | One or more targets must be specified for maintenance window Run | ||
| 41 | Command-type tasks. Depending on the task, targets are optional for | ||
| 42 | other maintenance window task types (Automation, AWS Lambda, and AWS | ||
| 43 | Step Functions). For more information about running tasks that do not | ||
| 44 | specify targets, see Registering maintenance window tasks without | ||
| 45 | targets | ||
| 46 | (https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html) | ||
| 47 | in the I<AWS Systems Manager User Guide>. | ||
| 48 | |||
| 49 | Supported formats include the following. | ||
| 50 | |||
| 51 | =over | ||
| 52 | |||
| 53 | =item * | ||
| 54 | |||
| 55 | C<Key=InstanceIds,Values=I<instance-id-1>,I<instance-id-2>,I<instance-id-3>> | ||
| 56 | |||
| 57 | =item * | ||
| 58 | |||
| 59 | C<Key=tag:I<my-tag-key>,Values=I<my-tag-value-1>,I<my-tag-value-2>> | ||
| 60 | |||
| 61 | =item * | ||
| 62 | |||
| 63 | C<Key=tag-key,Values=I<my-tag-key-1>,I<my-tag-key-2>> | ||
| 64 | |||
| 65 | =item * | ||
| 66 | |||
| 67 | B<Run Command and Maintenance window targets only>: | ||
| 68 | C<Key=resource-groups:Name,Values=I<resource-group-name>> | ||
| 69 | |||
| 70 | =item * | ||
| 71 | |||
| 72 | B<Maintenance window targets only>: | ||
| 73 | C<Key=resource-groups:ResourceTypeFilters,Values=I<resource-type-1>,I<resource-type-2>> | ||
| 74 | |||
| 75 | =item * | ||
| 76 | |||
| 77 | B<Automation targets only>: | ||
| 78 | C<Key=ResourceGroup;Values=I<resource-group-name>> | ||
| 79 | |||
| 80 | =back | ||
| 81 | |||
| 82 | For example: | ||
| 83 | |||
| 84 | =over | ||
| 85 | |||
| 86 | =item * | ||
| 87 | |||
| 88 | C<Key=InstanceIds,Values=i-02573cafcfEXAMPLE,i-0471e04240EXAMPLE,i-07782c72faEXAMPLE> | ||
| 89 | |||
| 90 | =item * | ||
| 91 | |||
| 92 | C<Key=tag:CostCenter,Values=CostCenter1,CostCenter2,CostCenter3> | ||
| 93 | |||
| 94 | =item * | ||
| 95 | |||
| 96 | C<Key=tag-key,Values=Name,Instance-Type,CostCenter> | ||
| 97 | |||
| 98 | =item * | ||
| 99 | |||
| 100 | B<Run Command and Maintenance window targets only>: | ||
| 101 | C<Key=resource-groups:Name,Values=ProductionResourceGroup> | ||
| 102 | |||
| 103 | This example demonstrates how to target all resources in the resource | ||
| 104 | group B<ProductionResourceGroup> in your maintenance window. | ||
| 105 | |||
| 106 | =item * | ||
| 107 | |||
| 108 | B<Maintenance window targets only>: | ||
| 109 | C<Key=resource-groups:ResourceTypeFilters,Values=I<AWS::EC2::INSTANCE>,I<AWS::EC2::VPC>> | ||
| 110 | |||
| 111 | This example demonstrates how to target only EC2 instances and VPCs in | ||
| 112 | your maintenance window. | ||
| 113 | |||
| 114 | =item * | ||
| 115 | |||
| 116 | B<Automation targets only>: C<Key=ResourceGroup,Values=MyResourceGroup> | ||
| 117 | |||
| 118 | =item * | ||
| 119 | |||
| 120 | B<State Manager association targets only>: | ||
| 121 | C<Key=InstanceIds,Values=I<*>> | ||
| 122 | |||
| 123 | This example demonstrates how to target all managed instances in the | ||
| 124 | AWS Region where the association was created. | ||
| 125 | |||
| 126 | =back | ||
| 127 | |||
| 128 | For more information about how to send commands that target instances | ||
| 129 | using C<Key,Value> parameters, see Targeting multiple instances | ||
| 130 | (https://docs.aws.amazon.com/systems-manager/latest/userguide/send-commands-multiple.html#send-commands-targeting) | ||
| 131 | in the I<AWS Systems Manager User Guide>. | ||
| 132 | |||
| 133 | =head1 ATTRIBUTES | ||
| 134 | |||
| 135 | |||
| 136 | =head2 Key => Str | ||
| 137 | |||
| 138 | User-defined criteria for sending commands that target instances that | ||
| 139 | meet the criteria. | ||
| 140 | |||
| 141 | |||
| 142 | =head2 Values => ArrayRef[Str|Undef] | ||
| 143 | |||
| 144 | User-defined criteria that maps to C<Key>. For example, if you | ||
| 145 | specified C<tag:ServerRole>, you could specify C<value:WebServer> to | ||
| 146 | run a command on instances that include EC2 tags of | ||
| 147 | C<ServerRole,WebServer>. | ||
| 148 | |||
| 149 | Depending on the type of C<Target>, the maximum number of values for a | ||
| 150 | C<Key> might be lower than the global maximum of 50. | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | =head1 SEE ALSO | ||
| 155 | |||
| 156 | This class forms part of L<Paws>, describing an object used in L<Paws::SSM> | ||
| 157 | |||
| 158 | =head1 BUGS and CONTRIBUTIONS | ||
| 159 | |||
| 160 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 161 | |||
| 162 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 163 | |||
| 164 | =cut | ||
| 165 |