AWS Application Cost Profiler

2021/05/17 - AWS Application Cost Profiler - 6 new api methods

Changes  APIs for AWS Application Cost Profiler.

UpdateReportDefinition (new) Link ¶

Updates existing report in AWS Application Cost Profiler.

See also: AWS API Documentation

Request Syntax

client.update_report_definition(
    reportId='string',
    reportDescription='string',
    reportFrequency='MONTHLY'|'DAILY'|'ALL',
    format='CSV'|'PARQUET',
    destinationS3Location={
        'bucket': 'string',
        'prefix': 'string'
    }
)
type reportId

string

param reportId

[REQUIRED]

Required. ID of the report to update.

type reportDescription

string

param reportDescription

[REQUIRED]

Required. Description of the report.

type reportFrequency

string

param reportFrequency

[REQUIRED]

Required. The cadence to generate the report.

type format

string

param format

[REQUIRED]

Required. The format to use for the generated report.

type destinationS3Location

dict

param destinationS3Location

[REQUIRED]

Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.

  • bucket (string) -- [REQUIRED]

    Name of the S3 bucket.

  • prefix (string) -- [REQUIRED]

    Prefix for the location to write to.

rtype

dict

returns

Response Syntax

{
    'reportId': 'string'
}

Response Structure

  • (dict) --

    • reportId (string) --

      ID of the report.

GetReportDefinition (new) Link ¶

Retrieves the definition of a report already configured in AWS Application Cost Profiler.

See also: AWS API Documentation

Request Syntax

client.get_report_definition(
    reportId='string'
)
type reportId

string

param reportId

[REQUIRED]

ID of the report to retrieve.

rtype

dict

returns

Response Syntax

{
    'reportId': 'string',
    'reportDescription': 'string',
    'reportFrequency': 'MONTHLY'|'DAILY'|'ALL',
    'format': 'CSV'|'PARQUET',
    'destinationS3Location': {
        'bucket': 'string',
        'prefix': 'string'
    },
    'createdAt': datetime(2015, 1, 1),
    'lastUpdated': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • reportId (string) --

      ID of the report retrieved.

    • reportDescription (string) --

      Description of the report.

    • reportFrequency (string) --

      Cadence used to generate the report.

    • format (string) --

      Format of the generated report.

    • destinationS3Location (dict) --

      Amazon Simple Storage Service (Amazon S3) location where the report is uploaded.

      • bucket (string) --

        Name of the S3 bucket.

      • prefix (string) --

        Prefix for the location to write to.

    • createdAt (datetime) --

      Timestamp (milliseconds) when this report definition was created.

    • lastUpdated (datetime) --

      Timestamp (milliseconds) when this report definition was last updated.

ListReportDefinitions (new) Link ¶

Retrieves a list of all reports and their configurations for your AWS account.

The maximum number of reports is one.

See also: AWS API Documentation

Request Syntax

client.list_report_definitions(
    nextToken='string',
    maxResults=123
)
type nextToken

string

param nextToken

The token value from a previous call to access the next page of results.

type maxResults

integer

param maxResults

The maximum number of results to return.

rtype

dict

returns

Response Syntax

{
    'reportDefinitions': [
        {
            'reportId': 'string',
            'reportDescription': 'string',
            'reportFrequency': 'MONTHLY'|'DAILY'|'ALL',
            'format': 'CSV'|'PARQUET',
            'destinationS3Location': {
                'bucket': 'string',
                'prefix': 'string'
            },
            'createdAt': datetime(2015, 1, 1),
            'lastUpdatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • reportDefinitions (list) --

      The retrieved reports.

      • (dict) --

        The configuration of a report in AWS Application Cost Profiler.

        • reportId (string) --

          The ID of the report.

        • reportDescription (string) --

          Description of the report

        • reportFrequency (string) --

          The cadence at which the report is generated.

        • format (string) --

          The format used for the generated reports.

        • destinationS3Location (dict) --

          The location in Amazon Simple Storage Service (Amazon S3) the reports should be saved to.

          • bucket (string) --

            Name of the S3 bucket.

          • prefix (string) --

            Prefix for the location to write to.

        • createdAt (datetime) --

          Timestamp (milliseconds) when this report definition was created.

        • lastUpdatedAt (datetime) --

          Timestamp (milliseconds) when this report definition was last updated.

    • nextToken (string) --

      The value of the next token, if it exists. Null if there are no more results.

PutReportDefinition (new) Link ¶

Creates the report definition for a report in Application Cost Profiler.

See also: AWS API Documentation

Request Syntax

client.put_report_definition(
    reportId='string',
    reportDescription='string',
    reportFrequency='MONTHLY'|'DAILY'|'ALL',
    format='CSV'|'PARQUET',
    destinationS3Location={
        'bucket': 'string',
        'prefix': 'string'
    }
)
type reportId

string

param reportId

[REQUIRED]

Required. ID of the report. You can choose any valid string matching the pattern for the ID.

type reportDescription

string

param reportDescription

[REQUIRED]

Required. Description of the report.

type reportFrequency

string

param reportFrequency

[REQUIRED]

Required. The cadence to generate the report.

type format

string

param format

[REQUIRED]

Required. The format to use for the generated report.

type destinationS3Location

dict

param destinationS3Location

[REQUIRED]

Required. Amazon Simple Storage Service (Amazon S3) location where Application Cost Profiler uploads the report.

  • bucket (string) -- [REQUIRED]

    Name of the S3 bucket.

  • prefix (string) -- [REQUIRED]

    Prefix for the location to write to.

rtype

dict

returns

Response Syntax

{
    'reportId': 'string'
}

Response Structure

  • (dict) --

    • reportId (string) --

      ID of the report.

DeleteReportDefinition (new) Link ¶

Deletes the specified report definition in AWS Application Cost Profiler. This stops the report from being generated.

See also: AWS API Documentation

Request Syntax

client.delete_report_definition(
    reportId='string'
)
type reportId

string

param reportId

[REQUIRED]

Required. ID of the report to delete.

rtype

dict

returns

Response Syntax

{
    'reportId': 'string'
}

Response Structure

  • (dict) --

    • reportId (string) --

      ID of the report that was deleted.

ImportApplicationUsage (new) Link ¶

Ingests application usage data from Amazon Simple Storage Service (Amazon S3).

The data must already exist in the S3 location. As part of the action, AWS Application Cost Profiler copies the object from your S3 bucket to an S3 bucket owned by Amazon for processing asynchronously.

See also: AWS API Documentation

Request Syntax

client.import_application_usage(
    sourceS3Location={
        'bucket': 'string',
        'key': 'string',
        'region': 'ap-east-1'|'me-south-1'|'eu-south-1'|'af-south-1'
    }
)
type sourceS3Location

dict

param sourceS3Location

[REQUIRED]

Amazon S3 location to import application usage data from.

  • bucket (string) -- [REQUIRED]

    Name of the bucket.

  • key (string) -- [REQUIRED]

    Key of the object.

  • region (string) --

    Region of the bucket. Only required for Regions that are disabled by default. For more infomration about Regions that are disabled by default, see Enabling a Region in the AWS General Reference guide .

rtype

dict

returns

Response Syntax

{
    'importId': 'string'
}

Response Structure

  • (dict) --

    • importId (string) --

      ID of the import request.