Skip to content

aws.devops_guru.get_cost_estimation

Example SQL Queries

SELECT * FROM
aws.devops_guru.get_cost_estimation;

Description

Returns an estimate of the monthly cost for DevOps Guru to analyze your Amazon Web Services resources. For more information, see Estimate your Amazon DevOps Guru costs and Amazon DevOps Guru pricing.

Table Definition

Column NameColumn Data Type
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
costs

An array of ResourceCost objects that each contains details about the monthly cost estimate to analyze one of your Amazon Web Services resources.

STRUCT(
"type" VARCHAR,
"state" VARCHAR,
"count" BIGINT,
"unit_cost" DOUBLE,
"cost" DOUBLE
)[]
Show child fields
costs[]
Show child fields
costs[].cost

The total estimated monthly cost to analyze the active resources for this resource.

costs[].count

The number of active resources analyzed for this service to create a monthly cost estimate.

costs[].state

The state of the resource. The resource is ACTIVE if it produces metrics, events, or logs within an hour, otherwise it is INACTIVE. You pay for the number of active Amazon Web Services resource hours analyzed for each resource. Inactive resources are not charged.

costs[].type

The type of the Amazon Web Services resource.

costs[].unit_cost

The price per hour to analyze the resources in the service. For more information, see Estimate your Amazon DevOps Guru costs and Amazon DevOps Guru pricing.

resource_collection

The collection of the Amazon Web Services resources used to create your monthly DevOps Guru cost estimate.

STRUCT(
"cloud_formation" STRUCT(
"stack_names" VARCHAR[]
),
"tags" STRUCT(
"app_boundary_key" VARCHAR,
"tag_values" VARCHAR[]
)[]
)
Show child fields
resource_collection.cloud_formation

An object that specifies the CloudFormation stack that defines the Amazon Web Services resources used to create a monthly estimate for DevOps Guru.

Show child fields
resource_collection.cloud_formation.stack_names[]
resource_collection.tags[]
Show child fields
resource_collection.tags[].app_boundary_key

An Amazon Web Services tag key that is used to identify the Amazon Web Services resources that DevOps Guru analyzes. All Amazon Web Services resources in your account and Region tagged with this key make up your DevOps Guru application and analysis boundary.

The string used for a key in a tag that you use to define your resource coverage must begin with the prefix Devops-guru-. The tag key might be DevOps-Guru-deployment-application or devops-guru-rds-application. When you create a key, the case of characters in the key can be whatever you choose. After you create a key, it is case-sensitive. For example, DevOps Guru works with a key named devops-guru-rds and a key named DevOps-Guru-RDS, and these act as two different keys. Possible key/value pairs in your application might be Devops-Guru-production-application/RDS or Devops-Guru-production-application/containers.

resource_collection.tags[].tag_values[]
status

The status of creating this cost estimate. If it's still in progress, the status ONGOING is returned. If it is finished, the status COMPLETED is returned.

VARCHAR
time_range

The start and end time of the cost estimation.

STRUCT(
"start_time" TIMESTAMP_S,
"end_time" TIMESTAMP_S
)
Show child fields
time_range.end_time

The end time of the cost estimation.

time_range.start_time

The start time of the cost estimation.

total_cost

The estimated monthly cost to analyze the Amazon Web Services resources. This value is the sum of the estimated costs to analyze each resource in the Costs object in this response.

DOUBLE