pulumi-webflow 0.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_webflow/__init__.py +76 -0
- pulumi_webflow/_inputs.py +254 -0
- pulumi_webflow/_utilities.py +331 -0
- pulumi_webflow/asset.py +334 -0
- pulumi_webflow/asset_folder.py +225 -0
- pulumi_webflow/collection.py +235 -0
- pulumi_webflow/collection_field.py +322 -0
- pulumi_webflow/collection_item.py +283 -0
- pulumi_webflow/config/__init__.py +9 -0
- pulumi_webflow/config/__init__.pyi +21 -0
- pulumi_webflow/config/vars.py +29 -0
- pulumi_webflow/ecommerce_settings.py +146 -0
- pulumi_webflow/get_authorized_user.py +109 -0
- pulumi_webflow/get_token_info.py +82 -0
- pulumi_webflow/outputs.py +455 -0
- pulumi_webflow/page_content.py +172 -0
- pulumi_webflow/page_custom_code.py +178 -0
- pulumi_webflow/page_data.py +256 -0
- pulumi_webflow/provider.py +106 -0
- pulumi_webflow/pulumi-plugin.json +4 -0
- pulumi_webflow/py.typed +0 -0
- pulumi_webflow/redirect.py +226 -0
- pulumi_webflow/registered_script.py +295 -0
- pulumi_webflow/robots_txt.py +166 -0
- pulumi_webflow/site.py +361 -0
- pulumi_webflow/site_custom_code.py +178 -0
- pulumi_webflow/user.py +284 -0
- pulumi_webflow/webhook.py +235 -0
- pulumi_webflow-0.0.0.dist-info/METADATA +602 -0
- pulumi_webflow-0.0.0.dist-info/RECORD +32 -0
- pulumi_webflow-0.0.0.dist-info/WHEEL +5 -0
- pulumi_webflow-0.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['ProviderArgs', 'Provider']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class ProviderArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
api_token: Optional[pulumi.Input[_builtins.str]] = None):
|
|
23
|
+
"""
|
|
24
|
+
The set of arguments for constructing a Provider resource.
|
|
25
|
+
:param pulumi.Input[_builtins.str] api_token: Webflow API v2 bearer token for authentication. Can also be set via WEBFLOW_API_TOKEN environment variable.
|
|
26
|
+
"""
|
|
27
|
+
if api_token is not None:
|
|
28
|
+
pulumi.set(__self__, "api_token", api_token)
|
|
29
|
+
|
|
30
|
+
@_builtins.property
|
|
31
|
+
@pulumi.getter(name="apiToken")
|
|
32
|
+
def api_token(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
33
|
+
"""
|
|
34
|
+
Webflow API v2 bearer token for authentication. Can also be set via WEBFLOW_API_TOKEN environment variable.
|
|
35
|
+
"""
|
|
36
|
+
return pulumi.get(self, "api_token")
|
|
37
|
+
|
|
38
|
+
@api_token.setter
|
|
39
|
+
def api_token(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
40
|
+
pulumi.set(self, "api_token", value)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@pulumi.type_token("pulumi:providers:webflow")
|
|
44
|
+
class Provider(pulumi.ProviderResource):
|
|
45
|
+
@overload
|
|
46
|
+
def __init__(__self__,
|
|
47
|
+
resource_name: str,
|
|
48
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
49
|
+
api_token: Optional[pulumi.Input[_builtins.str]] = None,
|
|
50
|
+
__props__=None):
|
|
51
|
+
"""
|
|
52
|
+
Create a Webflow resource with the given unique name, props, and options.
|
|
53
|
+
:param str resource_name: The name of the resource.
|
|
54
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
55
|
+
:param pulumi.Input[_builtins.str] api_token: Webflow API v2 bearer token for authentication. Can also be set via WEBFLOW_API_TOKEN environment variable.
|
|
56
|
+
"""
|
|
57
|
+
...
|
|
58
|
+
@overload
|
|
59
|
+
def __init__(__self__,
|
|
60
|
+
resource_name: str,
|
|
61
|
+
args: Optional[ProviderArgs] = None,
|
|
62
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
63
|
+
"""
|
|
64
|
+
Create a Webflow resource with the given unique name, props, and options.
|
|
65
|
+
:param str resource_name: The name of the resource.
|
|
66
|
+
:param ProviderArgs args: The arguments to use to populate this resource's properties.
|
|
67
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
68
|
+
"""
|
|
69
|
+
...
|
|
70
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
71
|
+
resource_args, opts = _utilities.get_resource_args_opts(ProviderArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
72
|
+
if resource_args is not None:
|
|
73
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
74
|
+
else:
|
|
75
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
76
|
+
|
|
77
|
+
def _internal_init(__self__,
|
|
78
|
+
resource_name: str,
|
|
79
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
80
|
+
api_token: Optional[pulumi.Input[_builtins.str]] = None,
|
|
81
|
+
__props__=None):
|
|
82
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
83
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
84
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
85
|
+
if opts.id is None:
|
|
86
|
+
if __props__ is not None:
|
|
87
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
88
|
+
__props__ = ProviderArgs.__new__(ProviderArgs)
|
|
89
|
+
|
|
90
|
+
__props__.__dict__["api_token"] = None if api_token is None else pulumi.Output.secret(api_token)
|
|
91
|
+
secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["apiToken"])
|
|
92
|
+
opts = pulumi.ResourceOptions.merge(opts, secret_opts)
|
|
93
|
+
super(Provider, __self__).__init__(
|
|
94
|
+
'webflow',
|
|
95
|
+
resource_name,
|
|
96
|
+
__props__,
|
|
97
|
+
opts)
|
|
98
|
+
|
|
99
|
+
@_builtins.property
|
|
100
|
+
@pulumi.getter(name="apiToken")
|
|
101
|
+
def api_token(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
102
|
+
"""
|
|
103
|
+
Webflow API v2 bearer token for authentication. Can also be set via WEBFLOW_API_TOKEN environment variable.
|
|
104
|
+
"""
|
|
105
|
+
return pulumi.get(self, "api_token")
|
|
106
|
+
|
pulumi_webflow/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['RedirectArgs', 'Redirect']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class RedirectArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
destination_path: pulumi.Input[_builtins.str],
|
|
23
|
+
site_id: pulumi.Input[_builtins.str],
|
|
24
|
+
source_path: pulumi.Input[_builtins.str],
|
|
25
|
+
status_code: pulumi.Input[_builtins.int]):
|
|
26
|
+
"""
|
|
27
|
+
The set of arguments for constructing a Redirect resource.
|
|
28
|
+
:param pulumi.Input[_builtins.str] destination_path: The URL path to redirect to (e.g., '/new-page', '/home'). Must start with '/' and contain only valid URL characters. This is the location where users will be redirected when they visit the source path.
|
|
29
|
+
:param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
30
|
+
:param pulumi.Input[_builtins.str] source_path: The URL path to redirect from (e.g., '/old-page', '/blog/2023'). Must start with '/' and contain only valid URL characters (letters, numbers, hyphens, underscores, slashes, dots). Query strings and fragments are not allowed in the source path.
|
|
31
|
+
:param pulumi.Input[_builtins.int] status_code: The HTTP status code for the redirect. Must be either 301 or 302. 301 = permanent redirect (use when a page has moved permanently; search engines update their index). 302 = temporary redirect (use for maintenance or temporary page moves).
|
|
32
|
+
"""
|
|
33
|
+
pulumi.set(__self__, "destination_path", destination_path)
|
|
34
|
+
pulumi.set(__self__, "site_id", site_id)
|
|
35
|
+
pulumi.set(__self__, "source_path", source_path)
|
|
36
|
+
pulumi.set(__self__, "status_code", status_code)
|
|
37
|
+
|
|
38
|
+
@_builtins.property
|
|
39
|
+
@pulumi.getter(name="destinationPath")
|
|
40
|
+
def destination_path(self) -> pulumi.Input[_builtins.str]:
|
|
41
|
+
"""
|
|
42
|
+
The URL path to redirect to (e.g., '/new-page', '/home'). Must start with '/' and contain only valid URL characters. This is the location where users will be redirected when they visit the source path.
|
|
43
|
+
"""
|
|
44
|
+
return pulumi.get(self, "destination_path")
|
|
45
|
+
|
|
46
|
+
@destination_path.setter
|
|
47
|
+
def destination_path(self, value: pulumi.Input[_builtins.str]):
|
|
48
|
+
pulumi.set(self, "destination_path", value)
|
|
49
|
+
|
|
50
|
+
@_builtins.property
|
|
51
|
+
@pulumi.getter(name="siteId")
|
|
52
|
+
def site_id(self) -> pulumi.Input[_builtins.str]:
|
|
53
|
+
"""
|
|
54
|
+
The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
55
|
+
"""
|
|
56
|
+
return pulumi.get(self, "site_id")
|
|
57
|
+
|
|
58
|
+
@site_id.setter
|
|
59
|
+
def site_id(self, value: pulumi.Input[_builtins.str]):
|
|
60
|
+
pulumi.set(self, "site_id", value)
|
|
61
|
+
|
|
62
|
+
@_builtins.property
|
|
63
|
+
@pulumi.getter(name="sourcePath")
|
|
64
|
+
def source_path(self) -> pulumi.Input[_builtins.str]:
|
|
65
|
+
"""
|
|
66
|
+
The URL path to redirect from (e.g., '/old-page', '/blog/2023'). Must start with '/' and contain only valid URL characters (letters, numbers, hyphens, underscores, slashes, dots). Query strings and fragments are not allowed in the source path.
|
|
67
|
+
"""
|
|
68
|
+
return pulumi.get(self, "source_path")
|
|
69
|
+
|
|
70
|
+
@source_path.setter
|
|
71
|
+
def source_path(self, value: pulumi.Input[_builtins.str]):
|
|
72
|
+
pulumi.set(self, "source_path", value)
|
|
73
|
+
|
|
74
|
+
@_builtins.property
|
|
75
|
+
@pulumi.getter(name="statusCode")
|
|
76
|
+
def status_code(self) -> pulumi.Input[_builtins.int]:
|
|
77
|
+
"""
|
|
78
|
+
The HTTP status code for the redirect. Must be either 301 or 302. 301 = permanent redirect (use when a page has moved permanently; search engines update their index). 302 = temporary redirect (use for maintenance or temporary page moves).
|
|
79
|
+
"""
|
|
80
|
+
return pulumi.get(self, "status_code")
|
|
81
|
+
|
|
82
|
+
@status_code.setter
|
|
83
|
+
def status_code(self, value: pulumi.Input[_builtins.int]):
|
|
84
|
+
pulumi.set(self, "status_code", value)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@pulumi.type_token("webflow:index:Redirect")
|
|
88
|
+
class Redirect(pulumi.CustomResource):
|
|
89
|
+
@overload
|
|
90
|
+
def __init__(__self__,
|
|
91
|
+
resource_name: str,
|
|
92
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
93
|
+
destination_path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
94
|
+
site_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
95
|
+
source_path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
96
|
+
status_code: Optional[pulumi.Input[_builtins.int]] = None,
|
|
97
|
+
__props__=None):
|
|
98
|
+
"""
|
|
99
|
+
Manages HTTP redirects for a Webflow site. This resource allows you to define redirect rules for old URLs to new locations, supporting both permanent (301) and temporary (302) redirects.
|
|
100
|
+
|
|
101
|
+
:param str resource_name: The name of the resource.
|
|
102
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
103
|
+
:param pulumi.Input[_builtins.str] destination_path: The URL path to redirect to (e.g., '/new-page', '/home'). Must start with '/' and contain only valid URL characters. This is the location where users will be redirected when they visit the source path.
|
|
104
|
+
:param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
105
|
+
:param pulumi.Input[_builtins.str] source_path: The URL path to redirect from (e.g., '/old-page', '/blog/2023'). Must start with '/' and contain only valid URL characters (letters, numbers, hyphens, underscores, slashes, dots). Query strings and fragments are not allowed in the source path.
|
|
106
|
+
:param pulumi.Input[_builtins.int] status_code: The HTTP status code for the redirect. Must be either 301 or 302. 301 = permanent redirect (use when a page has moved permanently; search engines update their index). 302 = temporary redirect (use for maintenance or temporary page moves).
|
|
107
|
+
"""
|
|
108
|
+
...
|
|
109
|
+
@overload
|
|
110
|
+
def __init__(__self__,
|
|
111
|
+
resource_name: str,
|
|
112
|
+
args: RedirectArgs,
|
|
113
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
114
|
+
"""
|
|
115
|
+
Manages HTTP redirects for a Webflow site. This resource allows you to define redirect rules for old URLs to new locations, supporting both permanent (301) and temporary (302) redirects.
|
|
116
|
+
|
|
117
|
+
:param str resource_name: The name of the resource.
|
|
118
|
+
:param RedirectArgs args: The arguments to use to populate this resource's properties.
|
|
119
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
120
|
+
"""
|
|
121
|
+
...
|
|
122
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
123
|
+
resource_args, opts = _utilities.get_resource_args_opts(RedirectArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
124
|
+
if resource_args is not None:
|
|
125
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
126
|
+
else:
|
|
127
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
128
|
+
|
|
129
|
+
def _internal_init(__self__,
|
|
130
|
+
resource_name: str,
|
|
131
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
132
|
+
destination_path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
133
|
+
site_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
134
|
+
source_path: Optional[pulumi.Input[_builtins.str]] = None,
|
|
135
|
+
status_code: Optional[pulumi.Input[_builtins.int]] = None,
|
|
136
|
+
__props__=None):
|
|
137
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
138
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
139
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
140
|
+
if opts.id is None:
|
|
141
|
+
if __props__ is not None:
|
|
142
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
143
|
+
__props__ = RedirectArgs.__new__(RedirectArgs)
|
|
144
|
+
|
|
145
|
+
if destination_path is None and not opts.urn:
|
|
146
|
+
raise TypeError("Missing required property 'destination_path'")
|
|
147
|
+
__props__.__dict__["destination_path"] = destination_path
|
|
148
|
+
if site_id is None and not opts.urn:
|
|
149
|
+
raise TypeError("Missing required property 'site_id'")
|
|
150
|
+
__props__.__dict__["site_id"] = site_id
|
|
151
|
+
if source_path is None and not opts.urn:
|
|
152
|
+
raise TypeError("Missing required property 'source_path'")
|
|
153
|
+
__props__.__dict__["source_path"] = source_path
|
|
154
|
+
if status_code is None and not opts.urn:
|
|
155
|
+
raise TypeError("Missing required property 'status_code'")
|
|
156
|
+
__props__.__dict__["status_code"] = status_code
|
|
157
|
+
__props__.__dict__["created_on"] = None
|
|
158
|
+
super(Redirect, __self__).__init__(
|
|
159
|
+
'webflow:index:Redirect',
|
|
160
|
+
resource_name,
|
|
161
|
+
__props__,
|
|
162
|
+
opts)
|
|
163
|
+
|
|
164
|
+
@staticmethod
|
|
165
|
+
def get(resource_name: str,
|
|
166
|
+
id: pulumi.Input[str],
|
|
167
|
+
opts: Optional[pulumi.ResourceOptions] = None) -> 'Redirect':
|
|
168
|
+
"""
|
|
169
|
+
Get an existing Redirect resource's state with the given name, id, and optional extra
|
|
170
|
+
properties used to qualify the lookup.
|
|
171
|
+
|
|
172
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
173
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
174
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
175
|
+
"""
|
|
176
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
177
|
+
|
|
178
|
+
__props__ = RedirectArgs.__new__(RedirectArgs)
|
|
179
|
+
|
|
180
|
+
__props__.__dict__["created_on"] = None
|
|
181
|
+
__props__.__dict__["destination_path"] = None
|
|
182
|
+
__props__.__dict__["site_id"] = None
|
|
183
|
+
__props__.__dict__["source_path"] = None
|
|
184
|
+
__props__.__dict__["status_code"] = None
|
|
185
|
+
return Redirect(resource_name, opts=opts, __props__=__props__)
|
|
186
|
+
|
|
187
|
+
@_builtins.property
|
|
188
|
+
@pulumi.getter(name="createdOn")
|
|
189
|
+
def created_on(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
190
|
+
"""
|
|
191
|
+
The timestamp when the redirect was created (RFC3339 format). This is automatically set when the redirect is created and is read-only.
|
|
192
|
+
"""
|
|
193
|
+
return pulumi.get(self, "created_on")
|
|
194
|
+
|
|
195
|
+
@_builtins.property
|
|
196
|
+
@pulumi.getter(name="destinationPath")
|
|
197
|
+
def destination_path(self) -> pulumi.Output[_builtins.str]:
|
|
198
|
+
"""
|
|
199
|
+
The URL path to redirect to (e.g., '/new-page', '/home'). Must start with '/' and contain only valid URL characters. This is the location where users will be redirected when they visit the source path.
|
|
200
|
+
"""
|
|
201
|
+
return pulumi.get(self, "destination_path")
|
|
202
|
+
|
|
203
|
+
@_builtins.property
|
|
204
|
+
@pulumi.getter(name="siteId")
|
|
205
|
+
def site_id(self) -> pulumi.Output[_builtins.str]:
|
|
206
|
+
"""
|
|
207
|
+
The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
208
|
+
"""
|
|
209
|
+
return pulumi.get(self, "site_id")
|
|
210
|
+
|
|
211
|
+
@_builtins.property
|
|
212
|
+
@pulumi.getter(name="sourcePath")
|
|
213
|
+
def source_path(self) -> pulumi.Output[_builtins.str]:
|
|
214
|
+
"""
|
|
215
|
+
The URL path to redirect from (e.g., '/old-page', '/blog/2023'). Must start with '/' and contain only valid URL characters (letters, numbers, hyphens, underscores, slashes, dots). Query strings and fragments are not allowed in the source path.
|
|
216
|
+
"""
|
|
217
|
+
return pulumi.get(self, "source_path")
|
|
218
|
+
|
|
219
|
+
@_builtins.property
|
|
220
|
+
@pulumi.getter(name="statusCode")
|
|
221
|
+
def status_code(self) -> pulumi.Output[_builtins.int]:
|
|
222
|
+
"""
|
|
223
|
+
The HTTP status code for the redirect. Must be either 301 or 302. 301 = permanent redirect (use when a page has moved permanently; search engines update their index). 302 = temporary redirect (use for maintenance or temporary page moves).
|
|
224
|
+
"""
|
|
225
|
+
return pulumi.get(self, "status_code")
|
|
226
|
+
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['RegisteredScriptArgs', 'RegisteredScript']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class RegisteredScriptArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
display_name: pulumi.Input[_builtins.str],
|
|
23
|
+
hosted_location: pulumi.Input[_builtins.str],
|
|
24
|
+
integrity_hash: pulumi.Input[_builtins.str],
|
|
25
|
+
site_id: pulumi.Input[_builtins.str],
|
|
26
|
+
version: pulumi.Input[_builtins.str],
|
|
27
|
+
can_copy: Optional[pulumi.Input[_builtins.bool]] = None):
|
|
28
|
+
"""
|
|
29
|
+
The set of arguments for constructing a RegisteredScript resource.
|
|
30
|
+
:param pulumi.Input[_builtins.str] display_name: The user-facing name for the script (1-50 alphanumeric characters). This name is used to identify the script in the Webflow interface. Only letters (A-Z, a-z) and numbers (0-9) are allowed. Example valid names: 'CmsSlider', 'AnalyticsScript', 'MyCustomScript123'.
|
|
31
|
+
:param pulumi.Input[_builtins.str] hosted_location: The URI for the externally hosted script (e.g., 'https://cdn.example.com/my-script.js'). Must be a valid HTTP or HTTPS URL. The script should be publicly accessible and properly configured for cross-origin requests.
|
|
32
|
+
:param pulumi.Input[_builtins.str] integrity_hash: The Sub-Resource Integrity (SRI) hash for the script. Format: 'sha384-<hash>', 'sha256-<hash>', or 'sha512-<hash>'. SRI hashes help ensure that the script hasn't been modified in transit. You can generate an SRI hash using https://www.srihash.org/
|
|
33
|
+
:param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
34
|
+
:param pulumi.Input[_builtins.str] version: The Semantic Version (SemVer) string for the script (e.g., '1.0.0', '2.3.1'). This helps track different versions of your script. See https://semver.org/ for more information on semantic versioning.
|
|
35
|
+
:param pulumi.Input[_builtins.bool] can_copy: Indicates whether the script can be copied when the site is duplicated. Default: false. When true, the script will be included when creating a copy of the site.
|
|
36
|
+
"""
|
|
37
|
+
pulumi.set(__self__, "display_name", display_name)
|
|
38
|
+
pulumi.set(__self__, "hosted_location", hosted_location)
|
|
39
|
+
pulumi.set(__self__, "integrity_hash", integrity_hash)
|
|
40
|
+
pulumi.set(__self__, "site_id", site_id)
|
|
41
|
+
pulumi.set(__self__, "version", version)
|
|
42
|
+
if can_copy is not None:
|
|
43
|
+
pulumi.set(__self__, "can_copy", can_copy)
|
|
44
|
+
|
|
45
|
+
@_builtins.property
|
|
46
|
+
@pulumi.getter(name="displayName")
|
|
47
|
+
def display_name(self) -> pulumi.Input[_builtins.str]:
|
|
48
|
+
"""
|
|
49
|
+
The user-facing name for the script (1-50 alphanumeric characters). This name is used to identify the script in the Webflow interface. Only letters (A-Z, a-z) and numbers (0-9) are allowed. Example valid names: 'CmsSlider', 'AnalyticsScript', 'MyCustomScript123'.
|
|
50
|
+
"""
|
|
51
|
+
return pulumi.get(self, "display_name")
|
|
52
|
+
|
|
53
|
+
@display_name.setter
|
|
54
|
+
def display_name(self, value: pulumi.Input[_builtins.str]):
|
|
55
|
+
pulumi.set(self, "display_name", value)
|
|
56
|
+
|
|
57
|
+
@_builtins.property
|
|
58
|
+
@pulumi.getter(name="hostedLocation")
|
|
59
|
+
def hosted_location(self) -> pulumi.Input[_builtins.str]:
|
|
60
|
+
"""
|
|
61
|
+
The URI for the externally hosted script (e.g., 'https://cdn.example.com/my-script.js'). Must be a valid HTTP or HTTPS URL. The script should be publicly accessible and properly configured for cross-origin requests.
|
|
62
|
+
"""
|
|
63
|
+
return pulumi.get(self, "hosted_location")
|
|
64
|
+
|
|
65
|
+
@hosted_location.setter
|
|
66
|
+
def hosted_location(self, value: pulumi.Input[_builtins.str]):
|
|
67
|
+
pulumi.set(self, "hosted_location", value)
|
|
68
|
+
|
|
69
|
+
@_builtins.property
|
|
70
|
+
@pulumi.getter(name="integrityHash")
|
|
71
|
+
def integrity_hash(self) -> pulumi.Input[_builtins.str]:
|
|
72
|
+
"""
|
|
73
|
+
The Sub-Resource Integrity (SRI) hash for the script. Format: 'sha384-<hash>', 'sha256-<hash>', or 'sha512-<hash>'. SRI hashes help ensure that the script hasn't been modified in transit. You can generate an SRI hash using https://www.srihash.org/
|
|
74
|
+
"""
|
|
75
|
+
return pulumi.get(self, "integrity_hash")
|
|
76
|
+
|
|
77
|
+
@integrity_hash.setter
|
|
78
|
+
def integrity_hash(self, value: pulumi.Input[_builtins.str]):
|
|
79
|
+
pulumi.set(self, "integrity_hash", value)
|
|
80
|
+
|
|
81
|
+
@_builtins.property
|
|
82
|
+
@pulumi.getter(name="siteId")
|
|
83
|
+
def site_id(self) -> pulumi.Input[_builtins.str]:
|
|
84
|
+
"""
|
|
85
|
+
The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
86
|
+
"""
|
|
87
|
+
return pulumi.get(self, "site_id")
|
|
88
|
+
|
|
89
|
+
@site_id.setter
|
|
90
|
+
def site_id(self, value: pulumi.Input[_builtins.str]):
|
|
91
|
+
pulumi.set(self, "site_id", value)
|
|
92
|
+
|
|
93
|
+
@_builtins.property
|
|
94
|
+
@pulumi.getter
|
|
95
|
+
def version(self) -> pulumi.Input[_builtins.str]:
|
|
96
|
+
"""
|
|
97
|
+
The Semantic Version (SemVer) string for the script (e.g., '1.0.0', '2.3.1'). This helps track different versions of your script. See https://semver.org/ for more information on semantic versioning.
|
|
98
|
+
"""
|
|
99
|
+
return pulumi.get(self, "version")
|
|
100
|
+
|
|
101
|
+
@version.setter
|
|
102
|
+
def version(self, value: pulumi.Input[_builtins.str]):
|
|
103
|
+
pulumi.set(self, "version", value)
|
|
104
|
+
|
|
105
|
+
@_builtins.property
|
|
106
|
+
@pulumi.getter(name="canCopy")
|
|
107
|
+
def can_copy(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
108
|
+
"""
|
|
109
|
+
Indicates whether the script can be copied when the site is duplicated. Default: false. When true, the script will be included when creating a copy of the site.
|
|
110
|
+
"""
|
|
111
|
+
return pulumi.get(self, "can_copy")
|
|
112
|
+
|
|
113
|
+
@can_copy.setter
|
|
114
|
+
def can_copy(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
115
|
+
pulumi.set(self, "can_copy", value)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@pulumi.type_token("webflow:index:RegisteredScript")
|
|
119
|
+
class RegisteredScript(pulumi.CustomResource):
|
|
120
|
+
@overload
|
|
121
|
+
def __init__(__self__,
|
|
122
|
+
resource_name: str,
|
|
123
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
124
|
+
can_copy: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
125
|
+
display_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
126
|
+
hosted_location: Optional[pulumi.Input[_builtins.str]] = None,
|
|
127
|
+
integrity_hash: Optional[pulumi.Input[_builtins.str]] = None,
|
|
128
|
+
site_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
129
|
+
version: Optional[pulumi.Input[_builtins.str]] = None,
|
|
130
|
+
__props__=None):
|
|
131
|
+
"""
|
|
132
|
+
Manages custom code scripts in the Webflow script registry. This resource allows you to register and manage externally hosted scripts that can be deployed across your Webflow site with version control and integrity verification.
|
|
133
|
+
|
|
134
|
+
:param str resource_name: The name of the resource.
|
|
135
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
136
|
+
:param pulumi.Input[_builtins.bool] can_copy: Indicates whether the script can be copied when the site is duplicated. Default: false. When true, the script will be included when creating a copy of the site.
|
|
137
|
+
:param pulumi.Input[_builtins.str] display_name: The user-facing name for the script (1-50 alphanumeric characters). This name is used to identify the script in the Webflow interface. Only letters (A-Z, a-z) and numbers (0-9) are allowed. Example valid names: 'CmsSlider', 'AnalyticsScript', 'MyCustomScript123'.
|
|
138
|
+
:param pulumi.Input[_builtins.str] hosted_location: The URI for the externally hosted script (e.g., 'https://cdn.example.com/my-script.js'). Must be a valid HTTP or HTTPS URL. The script should be publicly accessible and properly configured for cross-origin requests.
|
|
139
|
+
:param pulumi.Input[_builtins.str] integrity_hash: The Sub-Resource Integrity (SRI) hash for the script. Format: 'sha384-<hash>', 'sha256-<hash>', or 'sha512-<hash>'. SRI hashes help ensure that the script hasn't been modified in transit. You can generate an SRI hash using https://www.srihash.org/
|
|
140
|
+
:param pulumi.Input[_builtins.str] site_id: The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
141
|
+
:param pulumi.Input[_builtins.str] version: The Semantic Version (SemVer) string for the script (e.g., '1.0.0', '2.3.1'). This helps track different versions of your script. See https://semver.org/ for more information on semantic versioning.
|
|
142
|
+
"""
|
|
143
|
+
...
|
|
144
|
+
@overload
|
|
145
|
+
def __init__(__self__,
|
|
146
|
+
resource_name: str,
|
|
147
|
+
args: RegisteredScriptArgs,
|
|
148
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
149
|
+
"""
|
|
150
|
+
Manages custom code scripts in the Webflow script registry. This resource allows you to register and manage externally hosted scripts that can be deployed across your Webflow site with version control and integrity verification.
|
|
151
|
+
|
|
152
|
+
:param str resource_name: The name of the resource.
|
|
153
|
+
:param RegisteredScriptArgs args: The arguments to use to populate this resource's properties.
|
|
154
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
155
|
+
"""
|
|
156
|
+
...
|
|
157
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
158
|
+
resource_args, opts = _utilities.get_resource_args_opts(RegisteredScriptArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
159
|
+
if resource_args is not None:
|
|
160
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
161
|
+
else:
|
|
162
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
163
|
+
|
|
164
|
+
def _internal_init(__self__,
|
|
165
|
+
resource_name: str,
|
|
166
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
167
|
+
can_copy: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
168
|
+
display_name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
169
|
+
hosted_location: Optional[pulumi.Input[_builtins.str]] = None,
|
|
170
|
+
integrity_hash: Optional[pulumi.Input[_builtins.str]] = None,
|
|
171
|
+
site_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
172
|
+
version: Optional[pulumi.Input[_builtins.str]] = None,
|
|
173
|
+
__props__=None):
|
|
174
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
175
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
176
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
177
|
+
if opts.id is None:
|
|
178
|
+
if __props__ is not None:
|
|
179
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
180
|
+
__props__ = RegisteredScriptArgs.__new__(RegisteredScriptArgs)
|
|
181
|
+
|
|
182
|
+
__props__.__dict__["can_copy"] = can_copy
|
|
183
|
+
if display_name is None and not opts.urn:
|
|
184
|
+
raise TypeError("Missing required property 'display_name'")
|
|
185
|
+
__props__.__dict__["display_name"] = display_name
|
|
186
|
+
if hosted_location is None and not opts.urn:
|
|
187
|
+
raise TypeError("Missing required property 'hosted_location'")
|
|
188
|
+
__props__.__dict__["hosted_location"] = hosted_location
|
|
189
|
+
if integrity_hash is None and not opts.urn:
|
|
190
|
+
raise TypeError("Missing required property 'integrity_hash'")
|
|
191
|
+
__props__.__dict__["integrity_hash"] = integrity_hash
|
|
192
|
+
if site_id is None and not opts.urn:
|
|
193
|
+
raise TypeError("Missing required property 'site_id'")
|
|
194
|
+
__props__.__dict__["site_id"] = site_id
|
|
195
|
+
if version is None and not opts.urn:
|
|
196
|
+
raise TypeError("Missing required property 'version'")
|
|
197
|
+
__props__.__dict__["version"] = version
|
|
198
|
+
__props__.__dict__["created_on"] = None
|
|
199
|
+
__props__.__dict__["last_updated"] = None
|
|
200
|
+
super(RegisteredScript, __self__).__init__(
|
|
201
|
+
'webflow:index:RegisteredScript',
|
|
202
|
+
resource_name,
|
|
203
|
+
__props__,
|
|
204
|
+
opts)
|
|
205
|
+
|
|
206
|
+
@staticmethod
|
|
207
|
+
def get(resource_name: str,
|
|
208
|
+
id: pulumi.Input[str],
|
|
209
|
+
opts: Optional[pulumi.ResourceOptions] = None) -> 'RegisteredScript':
|
|
210
|
+
"""
|
|
211
|
+
Get an existing RegisteredScript resource's state with the given name, id, and optional extra
|
|
212
|
+
properties used to qualify the lookup.
|
|
213
|
+
|
|
214
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
215
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
216
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
217
|
+
"""
|
|
218
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
219
|
+
|
|
220
|
+
__props__ = RegisteredScriptArgs.__new__(RegisteredScriptArgs)
|
|
221
|
+
|
|
222
|
+
__props__.__dict__["can_copy"] = None
|
|
223
|
+
__props__.__dict__["created_on"] = None
|
|
224
|
+
__props__.__dict__["display_name"] = None
|
|
225
|
+
__props__.__dict__["hosted_location"] = None
|
|
226
|
+
__props__.__dict__["integrity_hash"] = None
|
|
227
|
+
__props__.__dict__["last_updated"] = None
|
|
228
|
+
__props__.__dict__["site_id"] = None
|
|
229
|
+
__props__.__dict__["version"] = None
|
|
230
|
+
return RegisteredScript(resource_name, opts=opts, __props__=__props__)
|
|
231
|
+
|
|
232
|
+
@_builtins.property
|
|
233
|
+
@pulumi.getter(name="canCopy")
|
|
234
|
+
def can_copy(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
235
|
+
"""
|
|
236
|
+
Indicates whether the script can be copied when the site is duplicated. Default: false. When true, the script will be included when creating a copy of the site.
|
|
237
|
+
"""
|
|
238
|
+
return pulumi.get(self, "can_copy")
|
|
239
|
+
|
|
240
|
+
@_builtins.property
|
|
241
|
+
@pulumi.getter(name="createdOn")
|
|
242
|
+
def created_on(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
243
|
+
"""
|
|
244
|
+
The timestamp when the script was created (RFC3339 format). This is automatically set by Webflow when the script is created and is read-only.
|
|
245
|
+
"""
|
|
246
|
+
return pulumi.get(self, "created_on")
|
|
247
|
+
|
|
248
|
+
@_builtins.property
|
|
249
|
+
@pulumi.getter(name="displayName")
|
|
250
|
+
def display_name(self) -> pulumi.Output[_builtins.str]:
|
|
251
|
+
"""
|
|
252
|
+
The user-facing name for the script (1-50 alphanumeric characters). This name is used to identify the script in the Webflow interface. Only letters (A-Z, a-z) and numbers (0-9) are allowed. Example valid names: 'CmsSlider', 'AnalyticsScript', 'MyCustomScript123'.
|
|
253
|
+
"""
|
|
254
|
+
return pulumi.get(self, "display_name")
|
|
255
|
+
|
|
256
|
+
@_builtins.property
|
|
257
|
+
@pulumi.getter(name="hostedLocation")
|
|
258
|
+
def hosted_location(self) -> pulumi.Output[_builtins.str]:
|
|
259
|
+
"""
|
|
260
|
+
The URI for the externally hosted script (e.g., 'https://cdn.example.com/my-script.js'). Must be a valid HTTP or HTTPS URL. The script should be publicly accessible and properly configured for cross-origin requests.
|
|
261
|
+
"""
|
|
262
|
+
return pulumi.get(self, "hosted_location")
|
|
263
|
+
|
|
264
|
+
@_builtins.property
|
|
265
|
+
@pulumi.getter(name="integrityHash")
|
|
266
|
+
def integrity_hash(self) -> pulumi.Output[_builtins.str]:
|
|
267
|
+
"""
|
|
268
|
+
The Sub-Resource Integrity (SRI) hash for the script. Format: 'sha384-<hash>', 'sha256-<hash>', or 'sha512-<hash>'. SRI hashes help ensure that the script hasn't been modified in transit. You can generate an SRI hash using https://www.srihash.org/
|
|
269
|
+
"""
|
|
270
|
+
return pulumi.get(self, "integrity_hash")
|
|
271
|
+
|
|
272
|
+
@_builtins.property
|
|
273
|
+
@pulumi.getter(name="lastUpdated")
|
|
274
|
+
def last_updated(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
275
|
+
"""
|
|
276
|
+
The timestamp when the script was last updated (RFC3339 format). This is automatically updated by Webflow when the script is modified and is read-only.
|
|
277
|
+
"""
|
|
278
|
+
return pulumi.get(self, "last_updated")
|
|
279
|
+
|
|
280
|
+
@_builtins.property
|
|
281
|
+
@pulumi.getter(name="siteId")
|
|
282
|
+
def site_id(self) -> pulumi.Output[_builtins.str]:
|
|
283
|
+
"""
|
|
284
|
+
The Webflow site ID (24-character lowercase hexadecimal string, e.g., '5f0c8c9e1c9d440000e8d8c3'). You can find your site ID in the Webflow dashboard under Site Settings. This field will be validated before making any API calls.
|
|
285
|
+
"""
|
|
286
|
+
return pulumi.get(self, "site_id")
|
|
287
|
+
|
|
288
|
+
@_builtins.property
|
|
289
|
+
@pulumi.getter
|
|
290
|
+
def version(self) -> pulumi.Output[_builtins.str]:
|
|
291
|
+
"""
|
|
292
|
+
The Semantic Version (SemVer) string for the script (e.g., '1.0.0', '2.3.1'). This helps track different versions of your script. See https://semver.org/ for more information on semantic versioning.
|
|
293
|
+
"""
|
|
294
|
+
return pulumi.get(self, "version")
|
|
295
|
+
|