/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the ce-2017-10-25.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CostExplorer.Model
{
///
/// Container for the parameters to the GetCostAndUsageWithResources operation.
/// Retrieves cost and usage metrics with resources for your account. You can specify
/// which cost and usage-related metric, such as BlendedCosts
or UsageQuantity
,
/// that you want the request to return. You can also filter and group your data by various
/// dimensions, such as SERVICE
or AZ
, in a specific time range.
/// For a complete list of valid dimensions, see the GetDimensionValues
/// operation. Management account in an organization in Organizations have access to all
/// member accounts. This API is currently available for the Amazon Elastic Compute Cloud
/// – Compute service only.
///
///
///
/// This is an opt-in only feature. You can enable this feature from the Cost Explorer
/// Settings page. For information about how to access the Settings page, see Controlling
/// Access for Cost Explorer in the Billing and Cost Management User Guide.
///
///
///
public partial class GetCostAndUsageWithResourcesRequest : AmazonCostExplorerRequest
{
private Expression _filter;
private Granularity _granularity;
private List _groupBy = new List();
private List _metrics = new List();
private string _nextPageToken;
private DateInterval _timePeriod;
///
/// Gets and sets the property Filter.
///
/// Filters Amazon Web Services costs by different dimensions. For example, you can specify
/// SERVICE
and LINKED_ACCOUNT
and get the costs that are associated
/// with that account's usage of that service. You can nest Expression
objects
/// to define any combination of dimension filters. For more information, see Expression.
///
///
///
///
/// The GetCostAndUsageWithResources
operation requires that you either group
/// by or filter by a ResourceId
. It requires the Expression
/// "SERVICE = Amazon Elastic Compute Cloud - Compute"
in the filter.
///
///
///
/// Valid values for MatchOptions
for Dimensions
are EQUALS
/// and CASE_SENSITIVE
.
///
///
///
/// Valid values for MatchOptions
for CostCategories
and Tags
/// are EQUALS
, ABSENT
, and CASE_SENSITIVE
. Default
/// values are EQUALS
and CASE_SENSITIVE
.
///
///
[AWSProperty(Required=true)]
public Expression Filter
{
get { return this._filter; }
set { this._filter = value; }
}
// Check to see if Filter property is set
internal bool IsSetFilter()
{
return this._filter != null;
}
///
/// Gets and sets the property Granularity.
///
/// Sets the Amazon Web Services cost granularity to MONTHLY
, DAILY
,
/// or HOURLY
. If Granularity
isn't set, the response object
/// doesn't include the Granularity
, MONTHLY
, DAILY
,
/// or HOURLY
.
///
///
[AWSProperty(Required=true)]
public Granularity Granularity
{
get { return this._granularity; }
set { this._granularity = value; }
}
// Check to see if Granularity property is set
internal bool IsSetGranularity()
{
return this._granularity != null;
}
///
/// Gets and sets the property GroupBy.
///
/// You can group Amazon Web Services costs using up to two different groups: DIMENSION
,
/// TAG
, COST_CATEGORY
.
///
///
public List GroupBy
{
get { return this._groupBy; }
set { this._groupBy = value; }
}
// Check to see if GroupBy property is set
internal bool IsSetGroupBy()
{
return this._groupBy != null && this._groupBy.Count > 0;
}
///
/// Gets and sets the property Metrics.
///
/// Which metrics are returned in the query. For more information about blended and unblended
/// rates, see Why
/// does the "blended" annotation appear on some line items in my bill?.
///
///
///
/// Valid values are AmortizedCost
, BlendedCost
, NetAmortizedCost
,
/// NetUnblendedCost
, NormalizedUsageAmount
, UnblendedCost
,
/// and UsageQuantity
.
///
///
///
/// If you return the UsageQuantity
metric, the service aggregates all usage
/// numbers without taking the units into account. For example, if you aggregate usageQuantity
/// across all of Amazon EC2, the results aren't meaningful because Amazon EC2 compute
/// hours and data transfer are measured in different units (for example, hour or GB).
/// To get more meaningful UsageQuantity
metrics, filter by UsageType
/// or UsageTypeGroups
.
///
///
///
/// Metrics
is required for GetCostAndUsageWithResources
requests.
///
///
public List Metrics
{
get { return this._metrics; }
set { this._metrics = value; }
}
// Check to see if Metrics property is set
internal bool IsSetMetrics()
{
return this._metrics != null && this._metrics.Count > 0;
}
///
/// Gets and sets the property NextPageToken.
///
/// The token to retrieve the next set of results. Amazon Web Services provides the token
/// when the response from a previous call has more results than the maximum page size.
///
///
[AWSProperty(Min=0, Max=8192)]
public string NextPageToken
{
get { return this._nextPageToken; }
set { this._nextPageToken = value; }
}
// Check to see if NextPageToken property is set
internal bool IsSetNextPageToken()
{
return this._nextPageToken != null;
}
///
/// Gets and sets the property TimePeriod.
///
/// Sets the start and end dates for retrieving Amazon Web Services costs. The range must
/// be within the last 14 days (the start date cannot be earlier than 14 days ago). The
/// start date is inclusive, but the end date is exclusive. For example, if start
/// is 2017-01-01
and end
is 2017-05-01
, then the
/// cost and usage data is retrieved from 2017-01-01
up to and including
/// 2017-04-30
but not including 2017-05-01
.
///
///
[AWSProperty(Required=true)]
public DateInterval TimePeriod
{
get { return this._timePeriod; }
set { this._timePeriod = value; }
}
// Check to see if TimePeriod property is set
internal bool IsSetTimePeriod()
{
return this._timePeriod != null;
}
}
}