interface IServerlessCache
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElastiCache.Alpha.IServerlessCache |
![]() | github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2#IServerlessCache |
![]() | software.amazon.awscdk.services.elasticache.alpha.IServerlessCache |
![]() | aws_cdk.aws_elasticache_alpha.IServerlessCache |
![]() | @aws-cdk/aws-elasticache-alpha ยป IServerlessCache |
Implemented by
Serverless
Obtainable from
Serverless
.fromServerlessCacheArn()
, Serverless
.fromServerlessCacheAttributes()
, Serverless
.fromServerlessCacheName()
Represents a Serverless ElastiCache cache.
Properties
Name | Type | Description |
---|---|---|
connections | Connections | The network connections associated with this resource. |
env | Resource | The environment this resource belongs to. |
node | Node | The tree node. |
serverless | string | The ARN of the serverless cache. |
serverless | string | The name of the serverless cache. |
stack | Stack | The stack in which this resource is defined. |
backup | string[] | The ARNs of backups restored in the cache. |
engine? | Cache | The cache engine used by this cache. |
kms | IKey | The KMS key used for encryption. |
security | ISecurity [] | The security groups associated with this cache. |
subnets? | ISubnet [] | The subnets this cache is deployed in. |
user | IUser | The user group associated with this cache. |
vpc? | IVpc | The VPC this cache is deployed in. |
connections
Type:
Connections
The network connections associated with this resource.
env
Type:
Resource
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.
node
Type:
Node
The tree node.
serverlessCacheArn
Type:
string
The ARN of the serverless cache.
serverlessCacheName
Type:
string
The name of the serverless cache.
stack
Type:
Stack
The stack in which this resource is defined.
backupArnsToRestore?
Type:
string[]
(optional)
The ARNs of backups restored in the cache.
engine?
Type:
Cache
(optional)
The cache engine used by this cache.
kmsKey?
Type:
IKey
(optional)
The KMS key used for encryption.
securityGroups?
Type:
ISecurity
[]
(optional)
The security groups associated with this cache.
subnets?
Type:
ISubnet
[]
(optional)
The subnets this cache is deployed in.
userGroup?
Type:
IUser
(optional)
The user group associated with this cache.
vpc?
Type:
IVpc
(optional)
The VPC this cache is deployed in.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Grant the given identity custom permissions. |
grant | Grant connect permissions to the cache. |
metric(metricName, props?) | Return the given named metric for this cache. |
metric | Metric for active connections. |
metric | Metric for cache hit count. |
metric | Metric for cache hit rate. |
metric | Metric for cache miss count. |
metric | Metric for data stored in the cache. |
metric | Metric for network bytes in. |
metric | Metric for network bytes out. |
metric | Metric for ECPUs consumed. |
metric | Metric for read request latency. |
metric | Metric for write request latency. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply 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
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given identity custom permissions.
grantConnect(grantee)
public grantConnect(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant connect permissions to the cache.
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string
- props
Metric
Options
Returns
Return the given named metric for this cache.
metricActiveConnections(props?)
public metricActiveConnections(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for active connections.
metricCacheHitCount(props?)
public metricCacheHitCount(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for cache hit count.
metricCacheHitRate(props?)
public metricCacheHitRate(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for cache hit rate.
metricCacheMissCount(props?)
public metricCacheMissCount(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for cache miss count.
metricDataStored(props?)
public metricDataStored(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for data stored in the cache.
metricNetworkBytesIn(props?)
public metricNetworkBytesIn(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for network bytes in.
metricNetworkBytesOut(props?)
public metricNetworkBytesOut(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for network bytes out.
metricProcessingUnitsConsumed(props?)
public metricProcessingUnitsConsumed(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for ECPUs consumed.
metricReadRequestLatency(props?)
public metricReadRequestLatency(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for read request latency.
metricWriteRequestLatency(props?)
public metricWriteRequestLatency(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Metric for write request latency.