Represents a Cost Report construct in AWS CDK.
This class creates an AWS Cost and Usage Report, stored in an S3 bucket, and configures the necessary permissions.
Example
const report = new CostReport(stack, 'MyReport', {
costReportName: 'business-report',
reportGranularity: ReportGranularity.MONTHLY,
format: CurFormat.PARQUET
});import { aws_cur } from '@open-constructs/aws-cdk'
new aws_cur.CostReport(scope: Construct, id: string, props: CostReportProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
@open-constructs/aws-cdk.aws_cur.CostReportProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: @open-constructs/aws-cdk.aws_cur.CostReportProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
public toString(): stringReturns a string representation of this construct.
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
import { aws_cur } from '@open-constructs/aws-cdk'
aws_cur.CostReport.isConstruct(x: any)Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
- Type: any
Any object.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
reportBucket |
aws-cdk-lib.aws_s3.IBucket |
The S3 bucket that stores the cost report. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly reportBucket: IBucket;- Type: aws-cdk-lib.aws_s3.IBucket
The S3 bucket that stores the cost report.
- Implements: @open-constructs/aws-cdk.aws_ec2.IInstanceConnectEndpoint
Represents an EC2 Instance Connect Endpoint construct in AWS CDK.
Example
declare const securityGroups: aws_ec2.ISecurityGroup[];
declare const vpc: aws_ec2.IVpc;
const instanceConnectEndpoint = new InstanceConnectEndpoint(
stack,
'InstanceConnectEndpoint',
{
clientToken: 'my-client-token',
preserveClientIp: true,
securityGroups,
vpc,
},
);import { aws_ec2 } from '@open-constructs/aws-cdk'
new aws_ec2.InstanceConnectEndpoint(scope: Construct, id: string, props: InstanceConnectEndpointProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
@open-constructs/aws-cdk.aws_ec2.InstanceConnectEndpointProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: @open-constructs/aws-cdk.aws_ec2.InstanceConnectEndpointProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
public toString(): stringReturns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): voidApply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
- Type: aws-cdk-lib.RemovalPolicy
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromInstanceConnectEndpointAttributes |
Import an existing endpoint to the stack from its attributes. |
import { aws_ec2 } from '@open-constructs/aws-cdk'
aws_ec2.InstanceConnectEndpoint.isConstruct(x: any)Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
- Type: any
Any object.
import { aws_ec2 } from '@open-constructs/aws-cdk'
aws_ec2.InstanceConnectEndpoint.isOwnedResource(construct: IConstruct)Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { aws_ec2 } from '@open-constructs/aws-cdk'
aws_ec2.InstanceConnectEndpoint.isResource(construct: IConstruct)Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { aws_ec2 } from '@open-constructs/aws-cdk'
aws_ec2.InstanceConnectEndpoint.fromInstanceConnectEndpointAttributes(scope: Construct, id: string, attrs: InstanceConnectEndpointAttributes)Import an existing endpoint to the stack from its attributes.
- Type: constructs.Construct
- Type: string
- Type: @open-constructs/aws-cdk.aws_ec2.InstanceConnectEndpointAttributes
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
connections |
aws-cdk-lib.aws_ec2.Connections |
The connection object associated with the EC2 Instance Connect Endpoint. |
instanceConnectEndpointId |
string |
The ID of the EC2 Instance Connect Endpoint. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly connections: Connections;- Type: aws-cdk-lib.aws_ec2.Connections
The connection object associated with the EC2 Instance Connect Endpoint.
public readonly instanceConnectEndpointId: string;- Type: string
The ID of the EC2 Instance Connect Endpoint.
Properties for defining a Cost and Usage Report.
import { aws_cur } from '@open-constructs/aws-cdk'
const costReportProps: aws_cur.CostReportProps = { ... }| Name | Type | Description |
|---|---|---|
bucket |
aws-cdk-lib.aws_s3.IBucket |
The bucket to place the cost report into. |
costReportName |
string |
The name of the cost report. |
format |
@open-constructs/aws-cdk.aws_cur.CurFormat |
The format to use for the cost and usage report. |
reportGranularity |
@open-constructs/aws-cdk.aws_cur.ReportGranularity |
The granularity of the line items in the report. |
public readonly bucket: IBucket;- Type: aws-cdk-lib.aws_s3.IBucket
- Default: a new bucket will be created.
The bucket to place the cost report into.
If non is provided, a new bucket will be created.
public readonly costReportName: string;- Type: string
- Default: 'default-cur'
The name of the cost report.
public readonly format: CurFormat;- Type: @open-constructs/aws-cdk.aws_cur.CurFormat
- Default: TEXT_OR_CSV
The format to use for the cost and usage report.
public readonly reportGranularity: ReportGranularity;- Type: @open-constructs/aws-cdk.aws_cur.ReportGranularity
- Default: HOURLY
The granularity of the line items in the report.
Attributes for importing an EC2 Instance Connect Endpoint.
import { aws_ec2 } from '@open-constructs/aws-cdk'
const instanceConnectEndpointAttributes: aws_ec2.InstanceConnectEndpointAttributes = { ... }| Name | Type | Description |
|---|---|---|
instanceConnectEndpointId |
string |
The ID of the EC2 Instance Connect Endpoint. |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
The security groups associated with the EC2 Instance Connect Endpoint. |
public readonly instanceConnectEndpointId: string;- Type: string
The ID of the EC2 Instance Connect Endpoint.
public readonly securityGroups: ISecurityGroup[];- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
The security groups associated with the EC2 Instance Connect Endpoint.
Properties for defining an EC2 Instance Connect Endpoint.
import { aws_ec2 } from '@open-constructs/aws-cdk'
const instanceConnectEndpointProps: aws_ec2.InstanceConnectEndpointProps = { ... }| Name | Type | Description |
|---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC in which the EC2 Instance Connect Endpoint is created. |
clientToken |
string |
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. |
preserveClientIp |
boolean |
Indicates whether your client's IP address is preserved as the source. |
securityGroups |
aws-cdk-lib.aws_ec2.ISecurityGroup[] |
The security groups to associate with the EC2 Instance Connect Endpoint. |
public readonly vpc: IVpc;- Type: aws-cdk-lib.aws_ec2.IVpc
The VPC in which the EC2 Instance Connect Endpoint is created.
public readonly clientToken: string;- Type: string
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
public readonly preserveClientIp: boolean;- Type: boolean
- Default: true
Indicates whether your client's IP address is preserved as the source.
public readonly securityGroups: ISecurityGroup[];- Type: aws-cdk-lib.aws_ec2.ISecurityGroup[]
- Default: a new security group is created
The security groups to associate with the EC2 Instance Connect Endpoint.
Enum for the possible formats of a cost report.
import { aws_cur } from '@open-constructs/aws-cdk'
new aws_cur.CurFormat(compression: string, format: string)| Name | Type | Description |
|---|---|---|
compression |
string |
No description. |
format |
string |
No description. |
- Type: string
- Type: string
| Name | Description |
|---|---|
for |
Returns a CurFormat instance for the given compression and format string values. |
import { aws_cur } from '@open-constructs/aws-cdk'
aws_cur.CurFormat.for(compression: string, format: string)Returns a CurFormat instance for the given compression and format string values.
- Type: string
The compression string value.
- Type: string
The format string value.
| Name | Type | Description |
|---|---|---|
compression |
string |
No description. |
format |
string |
No description. |
public readonly compression: string;- Type: string
public readonly format: string;- Type: string
| Name | Type | Description |
|---|---|---|
PARQUET |
@open-constructs/aws-cdk.aws_cur.CurFormat |
Parquet format. |
TEXT_OR_CSV |
@open-constructs/aws-cdk.aws_cur.CurFormat |
GZIP compressed text or CSV format. |
public readonly PARQUET: CurFormat;- Type: @open-constructs/aws-cdk.aws_cur.CurFormat
Parquet format.
public readonly TEXT_OR_CSV: CurFormat;- Type: @open-constructs/aws-cdk.aws_cur.CurFormat
GZIP compressed text or CSV format.
Enum for the possible granularities of a cost report.
import { aws_cur } from '@open-constructs/aws-cdk'
new aws_cur.ReportGranularity(value: string)| Name | Type | Description |
|---|---|---|
value |
string |
No description. |
- Type: string
| Name | Description |
|---|---|
for |
Returns a ReportGranularity instance for the given granularity string value. |
import { aws_cur } from '@open-constructs/aws-cdk'
aws_cur.ReportGranularity.for(granularity: string)Returns a ReportGranularity instance for the given granularity string value.
- Type: string
The granularity string value to create an instance for.
| Name | Type | Description |
|---|---|---|
value |
string |
No description. |
public readonly value: string;- Type: string
| Name | Type | Description |
|---|---|---|
DAILY |
@open-constructs/aws-cdk.aws_cur.ReportGranularity |
Daily granularity. |
HOURLY |
@open-constructs/aws-cdk.aws_cur.ReportGranularity |
Hourly granularity. |
MONTHLY |
@open-constructs/aws-cdk.aws_cur.ReportGranularity |
Weekly granularity. |
public readonly DAILY: ReportGranularity;- Type: @open-constructs/aws-cdk.aws_cur.ReportGranularity
Daily granularity.
public readonly HOURLY: ReportGranularity;- Type: @open-constructs/aws-cdk.aws_cur.ReportGranularity
Hourly granularity.
public readonly MONTHLY: ReportGranularity;- Type: @open-constructs/aws-cdk.aws_cur.ReportGranularity
Weekly granularity.
-
Extends: aws-cdk-lib.aws_ec2.IConnectable, aws-cdk-lib.IResource
-
Implemented By: @open-constructs/aws-cdk.aws_ec2.InstanceConnectEndpoint, @open-constructs/aws-cdk.aws_ec2.IInstanceConnectEndpoint
An EC2 Instance Connect Endpoint.
| Name | Type | Description |
|---|---|---|
connections |
aws-cdk-lib.aws_ec2.Connections |
The network connections associated with this resource. |
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
instanceConnectEndpointId |
string |
The ID of the EC2 Instance Connect Endpoint. |
public readonly connections: Connections;- Type: aws-cdk-lib.aws_ec2.Connections
The network connections associated with this resource.
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;- Type: aws-cdk-lib.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly instanceConnectEndpointId: string;- Type: string
The ID of the EC2 Instance Connect Endpoint.