« blib/lib/Paws/CostExplorer/GetCostAndUsageResponse.pm
↑ Summary
blib/lib/Paws/CostExplorer/GetCostAndUsageWithResourcesResponse.pm »
| 1 | |||
| 2 | package Paws::CostExplorer::GetCostAndUsageWithResources; | ||
| 3 | use Moose; | ||
| 4 | has Filter => (is => 'ro', isa => 'Paws::CostExplorer::Expression', required => 1); | ||
| 5 | has Granularity => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has GroupBy => (is => 'ro', isa => 'ArrayRef[Paws::CostExplorer::GroupDefinition]'); | ||
| 7 | has Metrics => (is => 'ro', isa => 'ArrayRef[Str|Undef]'); | ||
| 8 | has NextPageToken => (is => 'ro', isa => 'Str'); | ||
| 9 | has TimePeriod => (is => 'ro', isa => 'Paws::CostExplorer::DateInterval', required => 1); | ||
| 10 | |||
| 11 | use MooseX::ClassAttribute; | ||
| 12 | |||
| 13 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'GetCostAndUsageWithResources'); | ||
| 14 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CostExplorer::GetCostAndUsageWithResourcesResponse'); | ||
| 15 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 16 | 1; | ||
| 17 | |||
| 18 | ### main pod documentation begin ### | ||
| 19 | |||
| 20 | =head1 NAME | ||
| 21 | |||
| 22 | Paws::CostExplorer::GetCostAndUsageWithResources - Arguments for method GetCostAndUsageWithResources on L<Paws::CostExplorer> | ||
| 23 | |||
| 24 | =head1 DESCRIPTION | ||
| 25 | |||
| 26 | This class represents the parameters used for calling the method GetCostAndUsageWithResources on the | ||
| 27 | L<AWS Cost Explorer Service|Paws::CostExplorer> service. Use the attributes of this class | ||
| 28 | as arguments to method GetCostAndUsageWithResources. | ||
| 29 | |||
| 30 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to GetCostAndUsageWithResources. | ||
| 31 | |||
| 32 | =head1 SYNOPSIS | ||
| 33 | |||
| 34 | my $ce = Paws->service('CostExplorer'); | ||
| 35 | my $GetCostAndUsageWithResourcesResponse = | ||
| 36 | $ce->GetCostAndUsageWithResources( | ||
| 37 | Filter => { | ||
| 38 | And => [ <Expression>, ... ], # OPTIONAL | ||
| 39 | CostCategories => { | ||
| 40 | Key => 'MyCostCategoryName', # min: 1, max: 50; OPTIONAL | ||
| 41 | MatchOptions => [ | ||
| 42 | 'EQUALS', | ||
| 43 | ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE | ||
| 44 | ], # OPTIONAL | ||
| 45 | Values => [ | ||
| 46 | 'MyValue', ... # max: 1024 | ||
| 47 | ], # OPTIONAL | ||
| 48 | }, # OPTIONAL | ||
| 49 | Dimensions => { | ||
| 50 | Key => 'AZ' | ||
| 51 | , # values: AZ, INSTANCE_TYPE, LINKED_ACCOUNT, LINKED_ACCOUNT_NAME, OPERATION, PURCHASE_TYPE, REGION, SERVICE, SERVICE_CODE, USAGE_TYPE, USAGE_TYPE_GROUP, RECORD_TYPE, OPERATING_SYSTEM, TENANCY, SCOPE, PLATFORM, SUBSCRIPTION_ID, LEGAL_ENTITY_NAME, DEPLOYMENT_OPTION, DATABASE_ENGINE, CACHE_ENGINE, INSTANCE_TYPE_FAMILY, BILLING_ENTITY, RESERVATION_ID, RESOURCE_ID, RIGHTSIZING_TYPE, SAVINGS_PLANS_TYPE, SAVINGS_PLAN_ARN, PAYMENT_OPTION, AGREEMENT_END_DATE_TIME_AFTER, AGREEMENT_END_DATE_TIME_BEFORE; OPTIONAL | ||
| 52 | MatchOptions => [ | ||
| 53 | 'EQUALS', | ||
| 54 | ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE | ||
| 55 | ], # OPTIONAL | ||
| 56 | Values => [ | ||
| 57 | 'MyValue', ... # max: 1024 | ||
| 58 | ], # OPTIONAL | ||
| 59 | }, # OPTIONAL | ||
| 60 | Not => <Expression>, | ||
| 61 | Or => [ <Expression>, ... ], # OPTIONAL | ||
| 62 | Tags => { | ||
| 63 | Key => 'MyTagKey', # max: 1024; OPTIONAL | ||
| 64 | MatchOptions => [ | ||
| 65 | 'EQUALS', | ||
| 66 | ... # values: EQUALS, ABSENT, STARTS_WITH, ENDS_WITH, CONTAINS, CASE_SENSITIVE, CASE_INSENSITIVE | ||
| 67 | ], # OPTIONAL | ||
| 68 | Values => [ | ||
| 69 | 'MyValue', ... # max: 1024 | ||
| 70 | ], # OPTIONAL | ||
| 71 | }, # OPTIONAL | ||
| 72 | }, | ||
| 73 | Granularity => 'DAILY', | ||
| 74 | TimePeriod => { | ||
| 75 | End => 'MyYearMonthDay', # max: 40 | ||
| 76 | Start => 'MyYearMonthDay', # max: 40 | ||
| 77 | |||
| 78 | }, | ||
| 79 | GroupBy => [ | ||
| 80 | { | ||
| 81 | Key => 'MyGroupDefinitionKey', # max: 1024; OPTIONAL | ||
| 82 | Type => 'DIMENSION', # values: DIMENSION, TAG, COST_CATEGORY; OPTIONAL | ||
| 83 | }, | ||
| 84 | ... | ||
| 85 | ], # OPTIONAL | ||
| 86 | Metrics => [ | ||
| 87 | 'MyMetricName', ... # max: 1024 | ||
| 88 | ], # OPTIONAL | ||
| 89 | NextPageToken => 'MyNextPageToken', # OPTIONAL | ||
| 90 | ); | ||
| 91 | |||
| 92 | # Results: | ||
| 93 | my $DimensionValueAttributes = | ||
| 94 | $GetCostAndUsageWithResourcesResponse->DimensionValueAttributes; | ||
| 95 | my $GroupDefinitions = | ||
| 96 | $GetCostAndUsageWithResourcesResponse->GroupDefinitions; | ||
| 97 | my $NextPageToken = $GetCostAndUsageWithResourcesResponse->NextPageToken; | ||
| 98 | my $ResultsByTime = $GetCostAndUsageWithResourcesResponse->ResultsByTime; | ||
| 99 | |||
| 100 | # Returns a L<Paws::CostExplorer::GetCostAndUsageWithResourcesResponse> 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/ce/GetCostAndUsageWithResources> | ||
| 104 | |||
| 105 | =head1 ATTRIBUTES | ||
| 106 | |||
| 107 | |||
| 108 | =head2 B<REQUIRED> Filter => L<Paws::CostExplorer::Expression> | ||
| 109 | |||
| 110 | Filters Amazon Web Services costs by different dimensions. For example, | ||
| 111 | you can specify C<SERVICE> and C<LINKED_ACCOUNT> and get the costs that | ||
| 112 | are associated with that account's usage of that service. You can nest | ||
| 113 | C<Expression> objects to define any combination of dimension filters. | ||
| 114 | For more information, see Expression | ||
| 115 | (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html). | ||
| 116 | |||
| 117 | The C<GetCostAndUsageWithResources> operation requires that you either | ||
| 118 | group by or filter by a C<ResourceId>. It requires the Expression | ||
| 119 | (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) | ||
| 120 | C<"SERVICE = Amazon Elastic Compute Cloud - Compute"> in the filter. | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | =head2 B<REQUIRED> Granularity => Str | ||
| 125 | |||
| 126 | Sets the AWS cost granularity to C<MONTHLY>, C<DAILY>, or C<HOURLY>. If | ||
| 127 | C<Granularity> isn't set, the response object doesn't include the | ||
| 128 | C<Granularity>, C<MONTHLY>, C<DAILY>, or C<HOURLY>. | ||
| 129 | |||
| 130 | Valid values are: C<"DAILY">, C<"MONTHLY">, C<"HOURLY"> | ||
| 131 | |||
| 132 | =head2 GroupBy => ArrayRef[L<Paws::CostExplorer::GroupDefinition>] | ||
| 133 | |||
| 134 | You can group Amazon Web Services costs using up to two different | ||
| 135 | groups: C<DIMENSION>, C<TAG>, C<COST_CATEGORY>. | ||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | =head2 Metrics => ArrayRef[Str|Undef] | ||
| 140 | |||
| 141 | Which metrics are returned in the query. For more information about | ||
| 142 | blended and unblended rates, see Why does the "blended" annotation | ||
| 143 | appear on some line items in my bill? | ||
| 144 | (http://aws.amazon.com/premiumsupport/knowledge-center/blended-rates-intro/). | ||
| 145 | |||
| 146 | Valid values are C<AmortizedCost>, C<BlendedCost>, C<NetAmortizedCost>, | ||
| 147 | C<NetUnblendedCost>, C<NormalizedUsageAmount>, C<UnblendedCost>, and | ||
| 148 | C<UsageQuantity>. | ||
| 149 | |||
| 150 | If you return the C<UsageQuantity> metric, the service aggregates all | ||
| 151 | usage numbers without taking the units into account. For example, if | ||
| 152 | you aggregate C<usageQuantity> across all of Amazon EC2, the results | ||
| 153 | aren't meaningful because Amazon EC2 compute hours and data transfer | ||
| 154 | are measured in different units (for example, hours vs. GB). To get | ||
| 155 | more meaningful C<UsageQuantity> metrics, filter by C<UsageType> or | ||
| 156 | C<UsageTypeGroups>. | ||
| 157 | |||
| 158 | C<Metrics> is required for C<GetCostAndUsageWithResources> requests. | ||
| 159 | |||
| 160 | |||
| 161 | |||
| 162 | =head2 NextPageToken => Str | ||
| 163 | |||
| 164 | The token to retrieve the next set of results. AWS provides the token | ||
| 165 | when the response from a previous call has more results than the | ||
| 166 | maximum page size. | ||
| 167 | |||
| 168 | |||
| 169 | |||
| 170 | =head2 B<REQUIRED> TimePeriod => L<Paws::CostExplorer::DateInterval> | ||
| 171 | |||
| 172 | Sets the start and end dates for retrieving Amazon Web Services costs. | ||
| 173 | The range must be within the last 14 days (the start date cannot be | ||
| 174 | earlier than 14 days ago). The start date is inclusive, but the end | ||
| 175 | date is exclusive. For example, if C<start> is C<2017-01-01> and C<end> | ||
| 176 | is C<2017-05-01>, then the cost and usage data is retrieved from | ||
| 177 | C<2017-01-01> up to and including C<2017-04-30> but not including | ||
| 178 | C<2017-05-01>. | ||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | =head1 SEE ALSO | ||
| 184 | |||
| 185 | This class forms part of L<Paws>, documenting arguments for method GetCostAndUsageWithResources in L<Paws::CostExplorer> | ||
| 186 | |||
| 187 | =head1 BUGS and CONTRIBUTIONS | ||
| 188 | |||
| 189 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 190 | |||
| 191 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 192 | |||
| 193 | =cut | ||
| 194 |