AwsElastiCache
Service-level Amazon ElastiCache component.
Remarks
Creates exactly one private cache capability: an encrypted Redis OSS/Valkey replication group, a Valkey Serverless cache, an independently managed parameter group, or an independently managed subnet group. Cache resources require private security groups and retain seven days of snapshots by default. Encryption at rest and in transit are enforced for replication groups; Serverless caches use service-managed encryption unless kmsKey is supplied. Replication groups optionally deliver JSON slow-query and engine logs to consumer-supplied CloudWatch log groups.
Naming:
- Type token:
${namespace}:aws:AwsElastiCache. ThereplicationGroup,serverlessCache,parameterGroup, andsubnetGrouproots respectively use capability literalselasticache-replication-group,elasticache-serverless-cache,elasticache-parameter-group, andelasticache-subnet-group, yielding${env}-${projectHash}-<capability>-<sanitised args.<capability>.name>. - Each
aws:elasticache/replicationGroup:ReplicationGroup,aws:elasticache/serverlessCache:ServerlessCache,aws:elasticache/parameterGroup:ParameterGroup, andaws:elasticache/subnetGroup:SubnetGroupchild is parented by this type and uses the corresponding[args.<capability>.name]tuple, yielding${env}-${projectHash}-<sanitised args.<capability>.name>. - Each provider name and owned
Nametag uses lower-casestackAndPurposethroughbuildAwsNameFromLiteralCamelCasePurpose(...):${env}-${projectHash}-${lowerCase purpose}. Replication-group and Serverless-cache purposes have a 27-character budget; parameter- and subnet-group purposes have a 242-character budget.args.parameterGroup.familyis a semantic AWS engine-family value, forwarded unchanged; AWS validates the required valid ElastiCache engine-family value, intentionally retained as provider-owned validation. - Exception: replication-group final snapshots use
${env}-${projectHash}-${lowerCase purpose}-final; this is a service-required deletion-safety identifier, not an independently named AWS resource. Intentional.
Example
import { AwsElastiCache } from '@jobcloud/aws-elasticache';
const cache = new AwsElastiCache({
serverlessCache: {
name: 'ordersCache', description: 'Private application cache', majorEngineVersion: '8',
subnetIds: ['subnet-00000001', 'subnet-00000002'], securityGroupIds: ['sg-00000001'],
},
});Constructors
new AwsElastiCache(
args: AwsElastiCacheArgs,
options?: ComponentResourceOptions,
): AwsElastiCache
Parameters
args(AwsElastiCacheArgs)options(ComponentResourceOptions, optional)
Returns
AwsElastiCache
Hierarchy
ComponentResourceAwsElastiCache
Properties
arn: Output<string>
ARN of the selected resource where AWS exposes one.
configurationEndpoint: Output<string>
Cluster-mode configuration endpoint for a sharded replication group.
endpoint: Output<string | undefined>
General cache endpoint: primary for one shard, configuration for multiple shards, or the Serverless endpoint.
parameterGroup: ParameterGroup
Selected parameter group.
primaryEndpoint: Output<string>
Primary cache endpoint for a replication group.
readerEndpoint: Output<string | undefined>
Reader cache endpoint when the selected capability exposes one.
replicationGroup: ReplicationGroup
Selected replication group.
serverlessCache: ServerlessCache
Selected Serverless cache.
subnetGroup: SubnetGroup
Selected subnet group.
urn: Output<string>
Inherited from urn
The stable logical URN used to distinctly address a resource, both before and after deployments.
Methods
getData(): Promise<any>
Inherited from getData
Retrieves the data produces by initialize. The data is immediately available in a derived class's constructor after the super(...) call to ComponentResource.
Returns
Promise<any>
getProvider(moduleMember: string): ProviderResource | undefined
Inherited from getProvider
Returns the provider for the given module member, if one exists.
Parameters
moduleMember(string)
Returns
ProviderResource | undefined
initialize(
args: Inputs,
opts?: ComponentResourceOptions,
name?: string,
type?: string,
): Promise<any>
Inherited from initialize
Can be overridden by a subclass to asynchronously initialize data for this component automatically when constructed. The data will be available immediately for subclass constructors to use. To access the data use getData.
Parameters
args(Inputs)opts(ComponentResourceOptions, optional)name(string, optional)type(string, optional)
Returns
Promise<any>
registerOutputs(
outputs?: Inputs | Promise<Inputs> | Output<Inputs>,
): void
Inherited from registerOutputs
Registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
Component resources can call this at the end of their constructor to indicate that they are done creating child resources. This is not strictly necessary as this will automatically be called after the initialize method completes.
Parameters
outputs(Inputs | Promise<Inputs> | Output<Inputs>, optional)
Returns
void
Static Methods
isInstance(obj: any): obj is ComponentResource<any>
Inherited from isInstance
Returns true if the given object is a CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
Parameters
obj(any)
Returns
obj is ComponentResource<any>