Class: AWSCDK::CodePipelineActions::CacheControl

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

Overview

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

Use the provided static factory methods to construct instances of this class. Used in the S3DeployActionProps.cacheControl property.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CacheControl

Returns a new instance of CacheControl.

Raises:

  • (NoMethodError)


13
14
15
# File 'code_pipeline_actions/cache_control.rb', line 13

def initialize(*args)
  raise NoMethodError, "aws-cdk-lib.aws_codepipeline_actions.CacheControl does not have a visible constructor; use the provided factory methods"
end

Class Method Details

.from_string(s) ⇒ AWSCDK::CodePipelineActions::CacheControl

Allows you to create an arbitrary cache control directive, in case our support is missing a method for a particular directive.

Parameters:

  • s (String)

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


27
28
29
30
# File 'code_pipeline_actions/cache_control.rb', line 27

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_codepipeline_actions.CacheControl", "fromString", [s])
end

.immutableAWSCDK::CodePipelineActions::CacheControl

The 'immutable' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


35
36
37
# File 'code_pipeline_actions/cache_control.rb', line 35

def self.immutable()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "immutable", [])
end

.jsii_overridable_methodsObject



17
18
19
20
21
# File 'code_pipeline_actions/cache_control.rb', line 17

def self.jsii_overridable_methods
  {
    :value => { kind: :property, name: "value", is_optional: false },
  }
end

.max_age(t) ⇒ AWSCDK::CodePipelineActions::CacheControl

The 'max-age' cache control directive.

Parameters:

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


43
44
45
46
# File 'code_pipeline_actions/cache_control.rb', line 43

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_codepipeline_actions.CacheControl", "maxAge", [t])
end

.must_revalidateAWSCDK::CodePipelineActions::CacheControl

The 'must-revalidate' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


51
52
53
# File 'code_pipeline_actions/cache_control.rb', line 51

def self.must_revalidate()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "mustRevalidate", [])
end

.must_understandAWSCDK::CodePipelineActions::CacheControl

The 'must-understand' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


58
59
60
# File 'code_pipeline_actions/cache_control.rb', line 58

def self.must_understand()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "mustUnderstand", [])
end

.no_cacheAWSCDK::CodePipelineActions::CacheControl

The 'no-cache' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


65
66
67
# File 'code_pipeline_actions/cache_control.rb', line 65

def self.no_cache()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "noCache", [])
end

.no_storeAWSCDK::CodePipelineActions::CacheControl

The 'no-store' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


72
73
74
# File 'code_pipeline_actions/cache_control.rb', line 72

def self.no_store()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "noStore", [])
end

.no_transformAWSCDK::CodePipelineActions::CacheControl

The 'no-transform' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


79
80
81
# File 'code_pipeline_actions/cache_control.rb', line 79

def self.no_transform()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "noTransform", [])
end

.proxy_revalidateAWSCDK::CodePipelineActions::CacheControl

The 'proxy-revalidate' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


86
87
88
# File 'code_pipeline_actions/cache_control.rb', line 86

def self.proxy_revalidate()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "proxyRevalidate", [])
end

.s_max_age(t) ⇒ AWSCDK::CodePipelineActions::CacheControl

The 's-max-age' cache control directive.

Parameters:

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


108
109
110
111
# File 'code_pipeline_actions/cache_control.rb', line 108

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_codepipeline_actions.CacheControl", "sMaxAge", [t])
end

.set_privateAWSCDK::CodePipelineActions::CacheControl

The 'private' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


93
94
95
# File 'code_pipeline_actions/cache_control.rb', line 93

def self.set_private()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "setPrivate", [])
end

.set_publicAWSCDK::CodePipelineActions::CacheControl

The 'public' cache control directive.

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


100
101
102
# File 'code_pipeline_actions/cache_control.rb', line 100

def self.set_public()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codepipeline_actions.CacheControl", "setPublic", [])
end

.stale_if_error(t) ⇒ AWSCDK::CodePipelineActions::CacheControl

The 'stale-if-error' cache control directive.

Parameters:

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


117
118
119
120
# File 'code_pipeline_actions/cache_control.rb', line 117

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_codepipeline_actions.CacheControl", "staleIfError", [t])
end

.stale_while_revalidate(t) ⇒ AWSCDK::CodePipelineActions::CacheControl

The 'stale-while-revalidate' cache control directive.

Parameters:

Returns:

  • (AWSCDK::CodePipelineActions::CacheControl)


126
127
128
129
# File 'code_pipeline_actions/cache_control.rb', line 126

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_codepipeline_actions.CacheControl", "staleWhileRevalidate", [t])
end

Instance Method Details

#valueString

the actual text value of the created directive.

Returns:

  • (String)


134
135
136
# File 'code_pipeline_actions/cache_control.rb', line 134

def value()
  jsii_get_property("value")
end

#value=(value) ⇒ Object



138
139
140
141
# File 'code_pipeline_actions/cache_control.rb', line 138

def value=(value)
  Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  jsii_set_property("value", value)
end