SDK for PHP 3.x

Client: Aws\FreeTier\FreeTierClient
Service ID: freetier
Version: 2023-09-07

This page describes the parameters and results for the operations of the AWS Free Tier (2023-09-07), and shows how to use the Aws\FreeTier\FreeTierClient object to call the described operations. This documentation is specific to the 2023-09-07 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

GetFreeTierUsage ( array $params = [] )
Returns a list of all Free Tier usage objects that match your filters.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

GetFreeTierUsage

Operations

GetFreeTierUsage

$result = $client->getFreeTierUsage([/* ... */]);
$promise = $client->getFreeTierUsageAsync([/* ... */]);

Returns a list of all Free Tier usage objects that match your filters.

Parameter Syntax

$result = $client->getFreeTierUsage([
    'filter' => [
        'And' => [
            [...], // RECURSIVE
            // ...
        ],
        'Dimensions' => [
            'Key' => 'SERVICE|OPERATION|USAGE_TYPE|REGION|FREE_TIER_TYPE|DESCRIPTION|USAGE_PERCENTAGE', // REQUIRED
            'MatchOptions' => ['<string>', ...], // REQUIRED
            'Values' => ['<string>', ...], // REQUIRED
        ],
        'Not' => [...], // RECURSIVE
        'Or' => [
            [...], // RECURSIVE
            // ...
        ],
    ],
    'maxResults' => <integer>,
    'nextToken' => '<string>',
]);

Parameter Details

Members
filter
Type: Expression structure

An expression that specifies the conditions that you want each FreeTierUsage object to meet.

maxResults
Type: int

The maximum number of results to return in the response. MaxResults means that there can be up to the specified number of values, but there might be fewer results based on your filters.

nextToken
Type: string

The pagination token that indicates the next set of results to retrieve.

Result Syntax

[
    'freeTierUsages' => [
        [
            'actualUsageAmount' => <float>,
            'description' => '<string>',
            'forecastedUsageAmount' => <float>,
            'freeTierType' => '<string>',
            'limit' => <float>,
            'operation' => '<string>',
            'region' => '<string>',
            'service' => '<string>',
            'unit' => '<string>',
            'usageType' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
freeTierUsages
Required: Yes
Type: Array of FreeTierUsage structures

The list of Free Tier usage objects that meet your filter expression.

nextToken
Type: string

The pagination token that indicates the next set of results to retrieve.

Errors

InternalServerException:

An unexpected error occurred during the processing of your request.

ValidationException:

The input fails to satisfy the constraints specified by an Amazon Web Service.

ThrottlingException:

The request was denied due to request throttling.

Shapes

DimensionValues

Description

Contains the specifications for the filters to use for your request.

Members
Key
Required: Yes
Type: string

The name of the dimension that you want to filter on.

MatchOptions
Required: Yes
Type: Array of strings

The match options that you can use to filter your results. You can specify only one of these values in the array.

Values
Required: Yes
Type: Array of strings

The metadata values you can specify to filter upon, so that the results all match at least one of the specified values.

Expression

Description

Use Expression to filter in the GetFreeTierUsage API operation.

You can use the following patterns:

  • Simple dimension values (Dimensions root operator)

  • Complex expressions with logical operators (AND, NOT, and OR root operators).

For simple dimension values, you can set the dimension name, values, and match type for the filters that you plan to use.

Example for simple dimension values

You can filter to match exactly for REGION==us-east-1 OR REGION==us-west-1.

The corresponding Expression appears like the following: { "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ], "MatchOptions": ["EQUALS"] } }

As shown in the previous example, lists of dimension values are combined with OR when you apply the filter.

For complex expressions with logical operators, you can have nested expressions to use the logical operators and specify advanced filtering.

Example for complex expressions with logical operators

You can filter by ((REGION == us-east-1 OR REGION == us-west-1) OR (SERVICE CONTAINS AWSLambda)) AND (USAGE_TYPE !CONTAINS DataTransfer).

The corresponding Expression appears like the following: { "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ], "MatchOptions": ["EQUALS"] }}, {"Dimensions": { "Key": "SERVICE", "Values": ["AWSLambda"], "MatchOptions": ["CONTAINS"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"], "MatchOptions": ["CONTAINS"] }}} ] }

In the following Contents, you must specify exactly one of the following root operators.

Members
And
Type: Array of Expression structures

Return results that match all Expressions that you specified in the array.

Dimensions
Type: DimensionValues structure

The specific dimension, values, and match type to filter objects with.

Not
Type: Expression structure

Return results that don’t match the Expression that you specified.

Or
Type: Array of Expression structures

Return results that match any of the Expressions that you specified. in the array.

FreeTierUsage

Description

Consists of a Amazon Web Services Free Tier offer’s metadata and your data usage for the offer.

Members
actualUsageAmount
Type: double

Describes the actual usage accrued month-to-day (MTD) that you've used so far.

description
Type: string

The description of the Free Tier offer.

forecastedUsageAmount
Type: double

Describes the forecasted usage by the month that you're expected to use.

freeTierType
Type: string

Describes the type of the Free Tier offer. For example, the offer can be "12 Months Free", "Always Free", and "Free Trial".

limit
Type: double

Describes the maximum usage allowed in Free Tier.

operation
Type: string

Describes usageType more granularly with the specific Amazon Web Service API operation. For example, this can be the RunInstances API operation for Amazon Elastic Compute Cloud.

region
Type: string

Describes the Amazon Web Services Region for which this offer is applicable

service
Type: string

The name of the Amazon Web Service providing the Free Tier offer. For example, this can be Amazon Elastic Compute Cloud.

unit
Type: string

Describes the unit of the usageType, such as Hrs.

usageType
Type: string

Describes the usage details of the offer. For example, this might be Global-BoxUsage:freetrial.

InternalServerException

Description

An unexpected error occurred during the processing of your request.

Members
message
Required: Yes
Type: string

ThrottlingException

Description

The request was denied due to request throttling.

Members
message
Required: Yes
Type: string

ValidationException

Description

The input fails to satisfy the constraints specified by an Amazon Web Service.

Members
message
Required: Yes
Type: string