Class: AWSCDK::S3Deployment::CacheControl
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::S3Deployment::CacheControl
- Defined in:
- s3_deployment/cache_control.rb
Overview
Used for HTTP cache-control header, which influences downstream caches.
Class Method Summary collapse
-
.from_string(s) ⇒ AWSCDK::S3Deployment::CacheControl
Constructs a custom cache control key from the literal value.
-
.immutable ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'immutable'.
- .jsii_overridable_methods ⇒ Object
-
.max_age(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'max-age=
'. -
.must_revalidate ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'must-revalidate'.
-
.must_understand ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'must-understand'.
-
.no_cache ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-cache'.
-
.no_store ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-store'.
-
.no_transform ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-transform'.
-
.proxy_revalidate ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'proxy-revalidate'.
-
.s_max_age(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 's-maxage=
'. -
.set_private ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'private'.
-
.set_public ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'public'.
-
.stale_if_error(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'stale-if-error=
'. -
.stale_while_revalidate(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'stale-while-revalidate=
'.
Instance Method Summary collapse
-
#initialize(*args) ⇒ CacheControl
constructor
A new instance of CacheControl.
-
#value ⇒ Object
The raw cache control setting.
Constructor Details
#initialize(*args) ⇒ CacheControl
Returns a new instance of CacheControl.
10 11 12 |
# File 's3_deployment/cache_control.rb', line 10 def initialize(*args) raise NoMethodError, "aws-cdk-lib.aws_s3_deployment.CacheControl does not have a visible constructor; use the provided factory methods" end |
Class Method Details
.from_string(s) ⇒ AWSCDK::S3Deployment::CacheControl
Constructs a custom cache control key from the literal value.
24 25 26 27 |
# File 's3_deployment/cache_control.rb', line 24 def self.from_string(s) Jsii::Type.check_type(s, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "s") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "fromString", [s]) end |
.immutable ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'immutable'.
32 33 34 |
# File 's3_deployment/cache_control.rb', line 32 def self.immutable() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "immutable", []) end |
.jsii_overridable_methods ⇒ Object
14 15 16 17 18 |
# File 's3_deployment/cache_control.rb', line 14 def self.jsii_overridable_methods { :value => { kind: :property, name: "value", is_optional: false }, } end |
.max_age(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'max-age=
40 41 42 43 |
# File 's3_deployment/cache_control.rb', line 40 def self.max_age(t) Jsii::Type.check_type(t, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "t") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "maxAge", [t]) end |
.must_revalidate ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'must-revalidate'.
48 49 50 |
# File 's3_deployment/cache_control.rb', line 48 def self.must_revalidate() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "mustRevalidate", []) end |
.must_understand ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'must-understand'.
55 56 57 |
# File 's3_deployment/cache_control.rb', line 55 def self.must_understand() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "mustUnderstand", []) end |
.no_cache ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-cache'.
62 63 64 |
# File 's3_deployment/cache_control.rb', line 62 def self.no_cache() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "noCache", []) end |
.no_store ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-store'.
69 70 71 |
# File 's3_deployment/cache_control.rb', line 69 def self.no_store() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "noStore", []) end |
.no_transform ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'no-transform'.
76 77 78 |
# File 's3_deployment/cache_control.rb', line 76 def self.no_transform() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "noTransform", []) end |
.proxy_revalidate ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'proxy-revalidate'.
83 84 85 |
# File 's3_deployment/cache_control.rb', line 83 def self.proxy_revalidate() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "proxyRevalidate", []) end |
.s_max_age(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 's-maxage=
105 106 107 108 |
# File 's3_deployment/cache_control.rb', line 105 def self.s_max_age(t) Jsii::Type.check_type(t, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "t") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "sMaxAge", [t]) end |
.set_private ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'private'.
90 91 92 |
# File 's3_deployment/cache_control.rb', line 90 def self.set_private() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "setPrivate", []) end |
.set_public ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'public'.
97 98 99 |
# File 's3_deployment/cache_control.rb', line 97 def self.set_public() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "setPublic", []) end |
.stale_if_error(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'stale-if-error=
114 115 116 117 |
# File 's3_deployment/cache_control.rb', line 114 def self.stale_if_error(t) Jsii::Type.check_type(t, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "t") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "staleIfError", [t]) end |
.stale_while_revalidate(t) ⇒ AWSCDK::S3Deployment::CacheControl
Sets 'stale-while-revalidate=
123 124 125 126 |
# File 's3_deployment/cache_control.rb', line 123 def self.stale_while_revalidate(t) Jsii::Type.check_type(t, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "t") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_s3_deployment.CacheControl", "staleWhileRevalidate", [t]) end |
Instance Method Details
#value ⇒ Object
The raw cache control setting.
131 132 133 |
# File 's3_deployment/cache_control.rb', line 131 def value() jsii_get_property("value") end |