AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS Cost Explorer GetDimensionValues API operation.

Syntax

Get-CEDimensionValue
-TimePeriod <DateInterval>
-Context <Context>
-Dimension <Dimension>
-SearchString <String>
-NextPageToken <String>

Description

You can use GetDimensionValues to retrieve all available filter values for a specific filter over a period of time. You can search the dimension values for an arbitrary string.

Parameters

-Context <Context>
The context for the call to GetDimensionValues. This can be RESERVED_INSTANCE or COST_AND_USAGE. The default value is COST_AND_USAGE. If the context is set to RESERVED_INSTANCE, the resulting dimension values can be used in the GetReservationUtilization action. If the context is set to COST_AND_USAGE, , the resulting dimension values can be used in the GetCostAndUsage operation.If you set the context to CostAndUsage, you can use the following dimensions for searching:
  • AZ - The Availability Zone. An example is us-east-1a.
  • InstanceType - The type of EC2 instance. An example is m4.xlarge.
  • LinkedAccount - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account
  • Operation - The action performed. Examples include RunInstance and CreateBucket.
  • PurchaseType - The reservation type of the purchase to which this usage is related. Examples include: On Demand Instances and Standard Reserved Instances
  • Service - The AWS service such as DynamoDB.
  • UsageType -The type of usage. An example is DataTransfer-In-Bytes. The response for the GetDimensionValues action includes a unit attribute, examples of which include GB and Hrs.
  • UsageTypeGroup - The grouping of common usage types. An example is EC2: CloudWatch – Alarms. The response for this action includes a unit attribute.
  • RecordType - The different types of charges such as RI fees, usage costs, tax refunds, and credits
If you set the context to ReservedInstance, you can use the following dimensions for searching:
  • AZ - The Availability Zone. An example is us-east-1a.
  • InstanceType - The type of EC2 instance. An example is m4.xlarge.
  • LinkedAccount - The description in the attribute map that includes the full name of the member account. The value field contains the AWS ID of the member account
  • Platform - The operating system. Examples are Windows or Linux.
  • Region - The AWS region.
  • Scope - The scope of a reserved instance (RI). Values are regional or a single availability zone.
  • Tenancy - The tenancy of a resource. Examples are shared or dedicated.
Required?False
Position?Named
Accept pipeline input?False
-Dimension <Dimension>
The name of the dimension. Different Dimensionsare available for different Contexts. For more information, see Context.
Required?False
Position?Named
Accept pipeline input?False
-NextPageToken <String>
The token to retrieve the next set of results. AWS provides the token when the response from a previous call has more results than the maximum page size.
Required?False
Position?Named
Accept pipeline input?False
-SearchString <String>
The value that you want to search the filter values for.
Required?False
Position?Named
Accept pipeline input?False
-TimePeriod <DateInterval>
The start and end dates for retrieving the dimension values. 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.
Required?False
Position?1
Accept pipeline input?True (ByValue, )

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

You can pipe a DateInterval object to this cmdlet for the TimePeriod parameter.

Outputs

This cmdlet returns a Amazon.CostExplorer.Model.GetDimensionValuesResponse object containing multiple properties. The object can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z