/* * 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 GetCostAndUsage operation. /// Retrieves cost and usage metrics for your account. You can specify which cost and /// usage-related metric that you want the request to return. For example, you can specify /// BlendedCosts or UsageQuantity. 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. /// /// /// /// For information about filter limitations, see Quotas /// and restrictions in the Billing and Cost Management User Guide. /// /// public partial class GetCostAndUsageRequest : 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. /// /// /// /// /// 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. /// /// 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 or DAILY, /// or HOURLY. If Granularity isn't set, the response object /// doesn't include the Granularity, either MONTHLY or 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, either dimensions, /// tag keys, cost categories, or any two group by types. /// /// /// /// Valid values for the DIMENSION type are AZ, INSTANCE_TYPE, /// LEGAL_ENTITY_NAME, INVOICING_ENTITY, LINKED_ACCOUNT, /// OPERATION, PLATFORM, PURCHASE_TYPE, SERVICE, /// TENANCY, RECORD_TYPE, and USAGE_TYPE. /// /// /// /// When you group by the TAG type and include a valid tag key, you get all /// tag values, including empty strings. /// /// 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 into account the units. 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, hours and GB). /// To get more meaningful UsageQuantity metrics, filter by UsageType /// or UsageTypeGroups. /// /// /// /// Metrics is required for GetCostAndUsage requests. /// /// [AWSProperty(Required=true)] 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 date and end date for retrieving Amazon Web Services costs. 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; } } }