class ServerlessCacheBase
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.ElastiCache.Alpha.ServerlessCacheBase |
![]() | github.com/aws/aws-cdk-go/awscdkelasticachealpha/v2#ServerlessCacheBase |
![]() | software.amazon.awscdk.services.elasticache.alpha.ServerlessCacheBase |
![]() | aws_cdk.aws_elasticache_alpha.ServerlessCacheBase |
![]() | @aws-cdk/aws-elasticache-alpha ยป ServerlessCacheBase |
Implements
IConstruct
, IDependable
, IResource
, IServerless
, IConnectable
Extends
Resource
Implemented by
Serverless
Base class for ServerlessCache constructs.
Initializer
new ServerlessCacheBase(scope: Construct, id: string, props?: ResourceProps)
Parameters
- scope
Construct
- id
string
- props
Resource
Props
Properties
Name | Type | Description |
---|---|---|
connections | Connections | Access to network connections. |
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
Access to network connections.
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. |
to | Returns a string representation of this construct. |
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
โ The principal to grant permissions to. - actions
string
โ The actions to grant.
Returns
Grant the given identity custom permissions.
grantConnect(grantee)
public grantConnect(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
โ The principal to grant permissions to.
Returns
Grant connect permissions to the cache.
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string
โ The name of the metric. - props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Return the given named metric for this cache.
metricActiveConnections(props?)
public metricActiveConnections(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for active connections.
metricCacheHitCount(props?)
public metricCacheHitCount(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for cache hit count.
metricCacheHitRate(props?)
public metricCacheHitRate(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for cache hit rate.
metricCacheMissCount(props?)
public metricCacheMissCount(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for cache miss count.
metricDataStored(props?)
public metricDataStored(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for data stored in the cache.
metricNetworkBytesIn(props?)
public metricNetworkBytesIn(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for network bytes in.
metricNetworkBytesOut(props?)
public metricNetworkBytesOut(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for network bytes out.
metricProcessingUnitsConsumed(props?)
public metricProcessingUnitsConsumed(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for ECPUs consumed.
metricReadRequestLatency(props?)
public metricReadRequestLatency(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for read request latency.
metricWriteRequestLatency(props?)
public metricWriteRequestLatency(props?: MetricOptions): Metric
Parameters
- props
Metric
โ Additional properties which will be merged with the default metric.Options
Returns
Metric for write request latency.
toString()
public toString(): string
Returns
string
Returns a string representation of this construct.