@altostra/core
Version:
Core library for shared types and logic
28 lines (27 loc) • 1.2 kB
TypeScript
import type { Arn } from "../../aws/CustomTypes/Arn";
import type { NonEmptyString } from "../../common/CustomTypes/NonEmptyString";
import type { Maybe } from "../Common";
import type { DynamoDBIdType } from "../Resources/ExternalResource/ExternalDynamoTable";
export declare class DynamoDbTableIdentifier {
#private;
readonly isValid: boolean;
readonly hasStreamArn: boolean;
readonly hasTableArn: boolean;
readonly tableArn: Maybe<Arn>;
readonly streamArn: Maybe<Arn>;
constructor(tableId: NonEmptyString);
get identifierType(): DynamoDBIdType;
get tableName(): NonEmptyString;
get originalId(): NonEmptyString;
valueOf(): NonEmptyString;
/**
* Creates generic (parameterized. requires `Fn::Sub`) *ARN* from the table name,
* if no arn is provided. \
* Otherwise, returns the table *ARN* (which can be used with `Fn::Sub` regardless of parameterization).
*/
getGenericTableArn(): Arn;
}
export declare function isStreamArn(arn: Arn): boolean;
export declare function isTableArn(val: Arn): boolean;
export declare function tableNameFromArn(arn: Arn): NonEmptyString;
export declare function tableArnFromStreamArn(arn: Arn): Arn;