|
12 | 12 | "NoneAuthSourceHostSourceResponse", |
13 | 13 | "NoneAuthSourceS3SourceResponse", |
14 | 14 | "NoneAuthSourceS3SourceResponseConfig", |
| 15 | + "NoneAuthSourceFastedgeSourceResponse", |
| 16 | + "NoneAuthSourceFastedgeSourceResponseConfig", |
15 | 17 | "AwsSignatureV4", |
16 | 18 | "AwsSignatureV4Auth", |
17 | 19 | ] |
@@ -112,13 +114,15 @@ class NoneAuthSourceS3SourceResponse(BaseModel): |
112 | 114 | config: NoneAuthSourceS3SourceResponseConfig |
113 | 115 | """S3 storage configuration. Required when `origin_type` is `s3`.""" |
114 | 116 |
|
115 | | - origin_type: Literal["host", "s3"] |
116 | | - """Origin type. Present in responses only for S3 sources. |
| 117 | + origin_type: Literal["host", "s3", "fastedge"] |
| 118 | + """Origin type. Present in responses for S3 and FastEdge sources. |
117 | 119 |
|
118 | 120 | Possible values: |
119 | 121 |
|
120 | 122 | - **host** - A source server or endpoint from which content is fetched. |
121 | 123 | - **s3** - S3 storage with either AWS v4 authentication or public access. |
| 124 | + - **fastedge** - A FastEdge application served directly from the local FastEdge |
| 125 | + runtime on the edge node, identified by `app_id`. |
122 | 126 | """ |
123 | 127 |
|
124 | 128 | backup: Optional[bool] = None |
@@ -154,7 +158,71 @@ class NoneAuthSourceS3SourceResponse(BaseModel): |
154 | 158 | """Tag for the origin source.""" |
155 | 159 |
|
156 | 160 |
|
157 | | -NoneAuthSource: TypeAlias = Union[NoneAuthSourceHostSourceResponse, NoneAuthSourceS3SourceResponse] |
| 161 | +class NoneAuthSourceFastedgeSourceResponseConfig(BaseModel): |
| 162 | + """FastEdge application configuration. Required when `origin_type` is `fastedge`.""" |
| 163 | + |
| 164 | + app_id: str |
| 165 | + """ |
| 166 | + ID of the FastEdge application served as origin (string, matching the existing |
| 167 | + fastedge option's convention). The CDN dispatches requests to the local FastEdge |
| 168 | + runtime on the edge node using this identifier. The application must belong to |
| 169 | + the requesting client, be enabled, and have `wasi-http` API type. |
| 170 | + """ |
| 171 | + |
| 172 | + |
| 173 | +class NoneAuthSourceFastedgeSourceResponse(BaseModel): |
| 174 | + """A FastEdge application origin source.""" |
| 175 | + |
| 176 | + config: NoneAuthSourceFastedgeSourceResponseConfig |
| 177 | + """FastEdge application configuration. Required when `origin_type` is `fastedge`.""" |
| 178 | + |
| 179 | + origin_type: Literal["host", "s3", "fastedge"] |
| 180 | + """Origin type. Present in responses for S3 and FastEdge sources. |
| 181 | +
|
| 182 | + Possible values: |
| 183 | +
|
| 184 | + - **host** - A source server or endpoint from which content is fetched. |
| 185 | + - **s3** - S3 storage with either AWS v4 authentication or public access. |
| 186 | + - **fastedge** - A FastEdge application served directly from the local FastEdge |
| 187 | + runtime on the edge node, identified by `app_id`. |
| 188 | + """ |
| 189 | + |
| 190 | + backup: Optional[bool] = None |
| 191 | + """ |
| 192 | + Defines whether the origin is a backup, meaning that it will not be used until |
| 193 | + one of active origins become unavailable. |
| 194 | +
|
| 195 | + Possible values: |
| 196 | +
|
| 197 | + - **true** - Origin is a backup. |
| 198 | + - **false** - Origin is not a backup. |
| 199 | + """ |
| 200 | + |
| 201 | + enabled: Optional[bool] = None |
| 202 | + """Enables or disables an origin source in the origin group. |
| 203 | +
|
| 204 | + Possible values: |
| 205 | +
|
| 206 | + - **true** - Origin is enabled and the CDN uses it to pull content. |
| 207 | + - **false** - Origin is disabled and the CDN does not use it to pull content. |
| 208 | +
|
| 209 | + Origin group must contain at least one enabled origin. |
| 210 | + """ |
| 211 | + |
| 212 | + host_header_override: Optional[str] = None |
| 213 | + """Per-origin Host header override. |
| 214 | +
|
| 215 | + When set, the CDN sends this value as the Host header when requesting content |
| 216 | + from this origin instead of the default. |
| 217 | + """ |
| 218 | + |
| 219 | + tag: Optional[str] = None |
| 220 | + """Tag for the origin source.""" |
| 221 | + |
| 222 | + |
| 223 | +NoneAuthSource: TypeAlias = Union[ |
| 224 | + NoneAuthSourceHostSourceResponse, NoneAuthSourceS3SourceResponse, NoneAuthSourceFastedgeSourceResponse |
| 225 | +] |
158 | 226 |
|
159 | 227 |
|
160 | 228 | class NoneAuth(BaseModel): |
|
0 commit comments