Interface MeterUsageRequest.Builder

    • Method Detail

      • productCode

        MeterUsageRequest.Builder productCode​(String productCode)

        Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.

        Parameters:
        productCode - Product code is used to uniquely identify a product in AWS Marketplace. The product code should be the same as the one used during the publishing of a new product.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • timestamp

        MeterUsageRequest.Builder timestamp​(Instant timestamp)

        Timestamp, in UTC, for which the usage is being reported. Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.

        Parameters:
        timestamp - Timestamp, in UTC, for which the usage is being reported. Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • usageDimension

        MeterUsageRequest.Builder usageDimension​(String usageDimension)

        It will be one of the fcp dimension name provided during the publishing of the product.

        Parameters:
        usageDimension - It will be one of the fcp dimension name provided during the publishing of the product.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • usageQuantity

        MeterUsageRequest.Builder usageQuantity​(Integer usageQuantity)

        Consumption value for the hour. Defaults to 0 if not specified.

        Parameters:
        usageQuantity - Consumption value for the hour. Defaults to 0 if not specified.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • dryRun

        MeterUsageRequest.Builder dryRun​(Boolean dryRun)

        Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException. Defaults to false if not specified.

        Parameters:
        dryRun - Checks whether you have the permissions required for the action, but does not make the request. If you have the permissions, the request returns DryRunOperation; otherwise, it returns UnauthorizedException. Defaults to false if not specified.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • usageAllocations

        MeterUsageRequest.Builder usageAllocations​(Collection<UsageAllocation> usageAllocations)

        The set of UsageAllocations to submit.

        The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

        Parameters:
        usageAllocations - The set of UsageAllocations to submit.

        The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • usageAllocations

        MeterUsageRequest.Builder usageAllocations​(UsageAllocation... usageAllocations)

        The set of UsageAllocations to submit.

        The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

        Parameters:
        usageAllocations - The set of UsageAllocations to submit.

        The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • usageAllocations

        MeterUsageRequest.Builder usageAllocations​(Consumer<UsageAllocation.Builder>... usageAllocations)

        The set of UsageAllocations to submit.

        The sum of all UsageAllocation quantities must equal the UsageQuantity of the MeterUsage request, and each UsageAllocation must have a unique set of tags (include no tags).

        This is a convenience method that creates an instance of the UsageAllocation.Builder avoiding the need to create one manually via UsageAllocation.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #usageAllocations(List).

        Parameters:
        usageAllocations - a consumer that will call methods on UsageAllocation.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #usageAllocations(java.util.Collection)