class Expires
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.S3.Deployment.Expires |
Java | software.amazon.awscdk.services.s3.deployment.Expires |
Python | aws_cdk.aws_s3_deployment.Expires |
TypeScript (source) | @aws-cdk/aws-s3-deployment » Expires |
⚠️ Deprecated: use core.Expiration
Used for HTTP expires header, which influences downstream caches.
Does NOT influence deletion of the object.
See also: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#SysMetadata
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as s3_deployment from '@aws-cdk/aws-s3-deployment';
import * as cdk from '@aws-cdk/core';
const expires = s3_deployment.Expires.after(cdk.Duration.minutes(30));
Properties
Name | Type | Description |
---|---|---|
value | any | The raw expiration date expression. |
value
⚠️ Deprecated: use core.Expiration
Type:
any
The raw expiration date expression.
Methods
Name | Description |
---|---|
static after(t) | Expire once the specified duration has passed since deployment time. |
static at | Expire at the specified date. |
static at | Expire at the specified timestamp. |
static from | Create an expiration date from a raw date string. |
static after(t)
public static after(t: Duration): Expires
⚠️ Deprecated: use core.Expiration
Parameters
- t
Duration
— the duration to wait before expiring.
Returns
Expire once the specified duration has passed since deployment time.
Date(d)
static atpublic static atDate(d: date): Expires
⚠️ Deprecated: use core.Expiration
Parameters
- d
date
— date to expire at.
Returns
Expire at the specified date.
Timestamp(t)
static atpublic static atTimestamp(t: number): Expires
⚠️ Deprecated: use core.Expiration
Parameters
- t
number
— timestamp in unix milliseconds.
Returns
Expire at the specified timestamp.
String(s)
static frompublic static fromString(s: string): Expires
⚠️ Deprecated: use core.Expiration
Parameters
- s
string
Returns
Create an expiration date from a raw date string.