cloudflare.Snippets
Explore with Pulumi AI
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
exampleSnippets:
type: cloudflare:Snippets
name: example_snippets
properties:
zoneId: 9f1839b6152d298aca64c4e906b6d074
snippetName: my_snippet
files:
- null
metadata:
main_module: main.js
Create Snippets Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Snippets(name: string, args: SnippetsArgs, opts?: CustomResourceOptions);
@overload
def Snippets(resource_name: str,
args: SnippetsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Snippets(resource_name: str,
opts: Optional[ResourceOptions] = None,
files: Optional[Sequence[str]] = None,
metadata: Optional[SnippetsMetadataArgs] = None,
snippet_name: Optional[str] = None,
zone_id: Optional[str] = None)
func NewSnippets(ctx *Context, name string, args SnippetsArgs, opts ...ResourceOption) (*Snippets, error)
public Snippets(string name, SnippetsArgs args, CustomResourceOptions? opts = null)
public Snippets(String name, SnippetsArgs args)
public Snippets(String name, SnippetsArgs args, CustomResourceOptions options)
type: cloudflare:Snippets
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SnippetsArgs
- 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 SnippetsArgs
- 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 SnippetsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnippetsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnippetsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var snippetsResource = new Cloudflare.Snippets("snippetsResource", new()
{
Files = new[]
{
"string",
},
Metadata = new Cloudflare.Inputs.SnippetsMetadataArgs
{
MainModule = "string",
},
SnippetName = "string",
ZoneId = "string",
});
example, err := cloudflare.NewSnippets(ctx, "snippetsResource", &cloudflare.SnippetsArgs{
Files: pulumi.StringArray{
pulumi.String("string"),
},
Metadata: &cloudflare.SnippetsMetadataArgs{
MainModule: pulumi.String("string"),
},
SnippetName: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var snippetsResource = new Snippets("snippetsResource", SnippetsArgs.builder()
.files("string")
.metadata(SnippetsMetadataArgs.builder()
.mainModule("string")
.build())
.snippetName("string")
.zoneId("string")
.build());
snippets_resource = cloudflare.Snippets("snippetsResource",
files=["string"],
metadata={
"main_module": "string",
},
snippet_name="string",
zone_id="string")
const snippetsResource = new cloudflare.Snippets("snippetsResource", {
files: ["string"],
metadata: {
mainModule: "string",
},
snippetName: "string",
zoneId: "string",
});
type: cloudflare:Snippets
properties:
files:
- string
metadata:
mainModule: string
snippetName: string
zoneId: string
Snippets 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 Snippets resource accepts the following input properties:
- Files List<string>
- The list of files belonging to the snippet.
- Metadata
Snippets
Metadata - Metadata about the snippet.
- Snippet
Name string - The identifying name of the snippet.
- Zone
Id string - The unique ID of the zone.
- Files []string
- The list of files belonging to the snippet.
- Metadata
Snippets
Metadata Args - Metadata about the snippet.
- Snippet
Name string - The identifying name of the snippet.
- Zone
Id string - The unique ID of the zone.
- files List<String>
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata - Metadata about the snippet.
- snippet
Name String - The identifying name of the snippet.
- zone
Id String - The unique ID of the zone.
- files string[]
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata - Metadata about the snippet.
- snippet
Name string - The identifying name of the snippet.
- zone
Id string - The unique ID of the zone.
- files Sequence[str]
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata Args - Metadata about the snippet.
- snippet_
name str - The identifying name of the snippet.
- zone_
id str - The unique ID of the zone.
- files List<String>
- The list of files belonging to the snippet.
- metadata Property Map
- Metadata about the snippet.
- snippet
Name String - The identifying name of the snippet.
- zone
Id String - The unique ID of the zone.
Outputs
All input properties are implicitly available as output properties. Additionally, the Snippets resource produces the following output properties:
- Created
On string - The timestamp of when the snippet was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The timestamp of when the snippet was last modified.
- Created
On string - The timestamp of when the snippet was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The timestamp of when the snippet was last modified.
- created
On String - The timestamp of when the snippet was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The timestamp of when the snippet was last modified.
- created
On string - The timestamp of when the snippet was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - The timestamp of when the snippet was last modified.
- created_
on str - The timestamp of when the snippet was created.
- id str
- The provider-assigned unique ID for this managed resource.
- modified_
on str - The timestamp of when the snippet was last modified.
- created
On String - The timestamp of when the snippet was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The timestamp of when the snippet was last modified.
Look up Existing Snippets Resource
Get an existing Snippets 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?: SnippetsState, opts?: CustomResourceOptions): Snippets
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_on: Optional[str] = None,
files: Optional[Sequence[str]] = None,
metadata: Optional[SnippetsMetadataArgs] = None,
modified_on: Optional[str] = None,
snippet_name: Optional[str] = None,
zone_id: Optional[str] = None) -> Snippets
func GetSnippets(ctx *Context, name string, id IDInput, state *SnippetsState, opts ...ResourceOption) (*Snippets, error)
public static Snippets Get(string name, Input<string> id, SnippetsState? state, CustomResourceOptions? opts = null)
public static Snippets get(String name, Output<String> id, SnippetsState state, CustomResourceOptions options)
resources: _: type: cloudflare:Snippets get: 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.
- Created
On string - The timestamp of when the snippet was created.
- Files List<string>
- The list of files belonging to the snippet.
- Metadata
Snippets
Metadata - Metadata about the snippet.
- Modified
On string - The timestamp of when the snippet was last modified.
- Snippet
Name string - The identifying name of the snippet.
- Zone
Id string - The unique ID of the zone.
- Created
On string - The timestamp of when the snippet was created.
- Files []string
- The list of files belonging to the snippet.
- Metadata
Snippets
Metadata Args - Metadata about the snippet.
- Modified
On string - The timestamp of when the snippet was last modified.
- Snippet
Name string - The identifying name of the snippet.
- Zone
Id string - The unique ID of the zone.
- created
On String - The timestamp of when the snippet was created.
- files List<String>
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata - Metadata about the snippet.
- modified
On String - The timestamp of when the snippet was last modified.
- snippet
Name String - The identifying name of the snippet.
- zone
Id String - The unique ID of the zone.
- created
On string - The timestamp of when the snippet was created.
- files string[]
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata - Metadata about the snippet.
- modified
On string - The timestamp of when the snippet was last modified.
- snippet
Name string - The identifying name of the snippet.
- zone
Id string - The unique ID of the zone.
- created_
on str - The timestamp of when the snippet was created.
- files Sequence[str]
- The list of files belonging to the snippet.
- metadata
Snippets
Metadata Args - Metadata about the snippet.
- modified_
on str - The timestamp of when the snippet was last modified.
- snippet_
name str - The identifying name of the snippet.
- zone_
id str - The unique ID of the zone.
- created
On String - The timestamp of when the snippet was created.
- files List<String>
- The list of files belonging to the snippet.
- metadata Property Map
- Metadata about the snippet.
- modified
On String - The timestamp of when the snippet was last modified.
- snippet
Name String - The identifying name of the snippet.
- zone
Id String - The unique ID of the zone.
Supporting Types
SnippetsMetadata, SnippetsMetadataArgs
- Main
Module string - Name of the file that contains the main module of the snippet.
- Main
Module string - Name of the file that contains the main module of the snippet.
- main
Module String - Name of the file that contains the main module of the snippet.
- main
Module string - Name of the file that contains the main module of the snippet.
- main_
module str - Name of the file that contains the main module of the snippet.
- main
Module String - Name of the file that contains the main module of the snippet.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.