Viewing docs for CAST AI v8.60.0
published on Wednesday, Aug 19, 2026 by CAST AI
published on Wednesday, Aug 19, 2026 by CAST AI
Viewing docs for CAST AI v8.60.0
published on Wednesday, Aug 19, 2026 by CAST AI
published on Wednesday, Aug 19, 2026 by CAST AI
Create CacheRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CacheRule(name: string, args: CacheRuleArgs, opts?: CustomResourceOptions);@overload
def CacheRule(resource_name: str,
args: CacheRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CacheRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
cache_configuration_id: Optional[str] = None,
cache_group_id: Optional[str] = None,
mode: Optional[str] = None,
manual_ttl: Optional[int] = None,
table: Optional[str] = None,
template_hash: Optional[str] = None)func NewCacheRule(ctx *Context, name string, args CacheRuleArgs, opts ...ResourceOption) (*CacheRule, error)public CacheRule(string name, CacheRuleArgs args, CustomResourceOptions? opts = null)
public CacheRule(String name, CacheRuleArgs args)
public CacheRule(String name, CacheRuleArgs args, CustomResourceOptions options)
type: castai:cache:CacheRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "castai_cache_rule" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CacheRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
CacheRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CacheRule resource accepts the following input properties:
- Cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- Cache
Group stringId - ID of the cache group this rule belongs to.
- Mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- Manual
Ttl int - TTL in seconds. Required when mode is Manual.
- Table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- Template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- Cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- Cache
Group stringId - ID of the cache group this rule belongs to.
- Mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- Manual
Ttl int - TTL in seconds. Required when mode is Manual.
- Table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- Template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- cache_
configuration_ stringid - ID of the cache configuration this rule belongs to.
- cache_
group_ stringid - ID of the cache group this rule belongs to.
- mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- manual_
ttl number - TTL in seconds. Required when mode is Manual.
- table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template_
hash string - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration StringId - ID of the cache configuration this rule belongs to.
- cache
Group StringId - ID of the cache group this rule belongs to.
- mode String
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- manual
Ttl Integer - TTL in seconds. Required when mode is Manual.
- table String
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash String - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- cache
Group stringId - ID of the cache group this rule belongs to.
- mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- manual
Ttl number - TTL in seconds. Required when mode is Manual.
- table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- cache_
configuration_ strid - ID of the cache configuration this rule belongs to.
- cache_
group_ strid - ID of the cache group this rule belongs to.
- mode str
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- manual_
ttl int - TTL in seconds. Required when mode is Manual.
- table str
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template_
hash str - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration StringId - ID of the cache configuration this rule belongs to.
- cache
Group StringId - ID of the cache group this rule belongs to.
- mode String
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- manual
Ttl Number - TTL in seconds. Required when mode is Manual.
- table String
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash String - Hash of the query template. Either table or templateHash must be specified.
Outputs
All input properties are implicitly available as output properties. Additionally, the CacheRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CacheRule Resource
Get an existing CacheRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CacheRuleState, opts?: CustomResourceOptions): CacheRule@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cache_configuration_id: Optional[str] = None,
cache_group_id: Optional[str] = None,
manual_ttl: Optional[int] = None,
mode: Optional[str] = None,
table: Optional[str] = None,
template_hash: Optional[str] = None) -> CacheRulefunc GetCacheRule(ctx *Context, name string, id IDInput, state *CacheRuleState, opts ...ResourceOption) (*CacheRule, error)public static CacheRule Get(string name, Input<string> id, CacheRuleState? state, CustomResourceOptions? opts = null)public static CacheRule get(String name, Output<String> id, CacheRuleState state, CustomResourceOptions options)resources: _: type: castai:cache:CacheRule get: id: ${id}import {
to = castai_cache_rule.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- Cache
Group stringId - ID of the cache group this rule belongs to.
- Manual
Ttl int - TTL in seconds. Required when mode is Manual.
- Mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- Table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- Template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- Cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- Cache
Group stringId - ID of the cache group this rule belongs to.
- Manual
Ttl int - TTL in seconds. Required when mode is Manual.
- Mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- Table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- Template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- cache_
configuration_ stringid - ID of the cache configuration this rule belongs to.
- cache_
group_ stringid - ID of the cache group this rule belongs to.
- manual_
ttl number - TTL in seconds. Required when mode is Manual.
- mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template_
hash string - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration StringId - ID of the cache configuration this rule belongs to.
- cache
Group StringId - ID of the cache group this rule belongs to.
- manual
Ttl Integer - TTL in seconds. Required when mode is Manual.
- mode String
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- table String
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash String - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration stringId - ID of the cache configuration this rule belongs to.
- cache
Group stringId - ID of the cache group this rule belongs to.
- manual
Ttl number - TTL in seconds. Required when mode is Manual.
- mode string
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- table string
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash string - Hash of the query template. Either table or templateHash must be specified.
- cache_
configuration_ strid - ID of the cache configuration this rule belongs to.
- cache_
group_ strid - ID of the cache group this rule belongs to.
- manual_
ttl int - TTL in seconds. Required when mode is Manual.
- mode str
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- table str
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template_
hash str - Hash of the query template. Either table or templateHash must be specified.
- cache
Configuration StringId - ID of the cache configuration this rule belongs to.
- cache
Group StringId - ID of the cache group this rule belongs to.
- manual
Ttl Number - TTL in seconds. Required when mode is Manual.
- mode String
- TTL mode for queries matching this rule. Valid values: Auto, DontCache, Manual.
- table String
- Database table name to apply this rule to. Either table or templateHash must be specified.
- template
Hash String - Hash of the query template. Either table or templateHash must be specified.
Package Details
- Repository
- castai castai/pulumi-castai
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
castaiTerraform Provider.
Viewing docs for CAST AI v8.60.0
published on Wednesday, Aug 19, 2026 by CAST AI
published on Wednesday, Aug 19, 2026 by CAST AI