Class: AWSCDK::S3Deployment::CacheControl

Inherits:
Jsii::Object
  • Object
show all
Defined in:
s3_deployment/cache_control.rb

Overview

Used for HTTP cache-control header, which influences downstream caches.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CacheControl

Returns a new instance of CacheControl.

Raises:

  • (NoMethodError)


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.

Parameters:

  • s (String)

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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

.immutableAWSCDK::S3Deployment::CacheControl

Sets 'immutable'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_methodsObject



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='.

Parameters:

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_revalidateAWSCDK::S3Deployment::CacheControl

Sets 'must-revalidate'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_understandAWSCDK::S3Deployment::CacheControl

Sets 'must-understand'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_cacheAWSCDK::S3Deployment::CacheControl

Sets 'no-cache'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_storeAWSCDK::S3Deployment::CacheControl

Sets 'no-store'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_transformAWSCDK::S3Deployment::CacheControl

Sets 'no-transform'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_revalidateAWSCDK::S3Deployment::CacheControl

Sets 'proxy-revalidate'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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='.

Parameters:

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_privateAWSCDK::S3Deployment::CacheControl

Sets 'private'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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_publicAWSCDK::S3Deployment::CacheControl

Sets 'public'.

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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='.

Parameters:

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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='.

Parameters:

Returns:

  • (AWSCDK::S3Deployment::CacheControl)


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

#valueObject

The raw cache control setting.

Returns:

  • (Object)


131
132
133
# File 's3_deployment/cache_control.rb', line 131

def value()
  jsii_get_property("value")
end