@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
81 lines (80 loc) • 2.34 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Parses an ARN into its constituent parts.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const dbInstance = aws.getArn({
* arn: "arn:aws:rds:eu-west-1:123456789012:db:mysql-db",
* });
* ```
*/
export declare function getArn(args: GetArnArgs, opts?: pulumi.InvokeOptions): Promise<GetArnResult>;
/**
* A collection of arguments for invoking getArn.
*/
export interface GetArnArgs {
/**
* ARN to parse.
*/
arn: string;
id?: string;
}
/**
* A collection of values returned by getArn.
*/
export interface GetArnResult {
/**
* The [ID](https://docs.aws.amazon.com/general/latest/gr/acct-identifiers.html) of the AWS account that owns the resource, without the hyphens.
*/
readonly account: string;
readonly arn: string;
readonly id: string;
/**
* Partition that the resource is in.
*/
readonly partition: string;
/**
* Region the resource resides in.
* Note that the ARNs for some resources do not include a Region, so this component might be omitted.
*/
readonly region: string;
/**
* Content of this part of the ARN varies by service.
* It often includes an indicator of the type of resource—for example, an IAM user or Amazon RDS database —followed by a slash (/) or a colon (:), followed by the resource name itself.
*/
readonly resource: string;
/**
* The [service namespace](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces) that identifies the AWS product.
*/
readonly service: string;
}
/**
* Parses an ARN into its constituent parts.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const dbInstance = aws.getArn({
* arn: "arn:aws:rds:eu-west-1:123456789012:db:mysql-db",
* });
* ```
*/
export declare function getArnOutput(args: GetArnOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetArnResult>;
/**
* A collection of arguments for invoking getArn.
*/
export interface GetArnOutputArgs {
/**
* ARN to parse.
*/
arn: pulumi.Input<string>;
id?: pulumi.Input<string>;
}