Skip to content

Commit

Permalink
Update document for poll.url_locator to clarify its fallback logic
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo committed Dec 1, 2023
1 parent a10fc19 commit 66a1f8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/resources/operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Optional:

- `default_delay_sec` (Number) The interval between two pollings if there is no `Retry-After` in the response header, in second. Defaults to `10`.
- `header` (Map of String) The header parameters. This overrides the `header` set in the resource block.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.

<a id="nestedatt--poll--status"></a>
### Nested Schema for `poll.status`
Expand All @@ -98,7 +98,7 @@ Optional:

- `default_delay_sec` (Number) The interval between two pollings if there is no `Retry-After` in the response header, in second. Defaults to `10`.
- `header` (Map of String) The header parameters. This overrides the `header` set in the resource block.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.

<a id="nestedatt--poll_delete--status"></a>
### Nested Schema for `poll_delete.status`
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Optional:

- `default_delay_sec` (Number) The interval between two pollings if there is no `Retry-After` in the response header, in second. Defaults to `10`.
- `header` (Map of String) The header parameters. This overrides the `header` set in the resource block.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.

<a id="nestedatt--poll_create--status"></a>
### Nested Schema for `poll_create.status`
Expand All @@ -115,7 +115,7 @@ Optional:

- `default_delay_sec` (Number) The interval between two pollings if there is no `Retry-After` in the response header, in second. Defaults to `10`.
- `header` (Map of String) The header parameters. This overrides the `header` set in the resource block.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.

<a id="nestedatt--poll_delete--status"></a>
### Nested Schema for `poll_delete.status`
Expand All @@ -142,7 +142,7 @@ Optional:

- `default_delay_sec` (Number) The interval between two pollings if there is no `Retry-After` in the response header, in second. Defaults to `10`.
- `header` (Map of String) The header parameters. This overrides the `header` set in the resource block.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.
- `url_locator` (String) Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.

<a id="nestedatt--poll_update--status"></a>
### Nested Schema for `poll_update.status`
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ func pollAttribute(s string) schema.SingleNestedAttribute {
},
},
"url_locator": schema.StringAttribute{
Description: "Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.",
MarkdownDescription: "Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the resource's path is used for polling.",
Description: "Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.",
MarkdownDescription: "Specifies how to discover the polling url. The format can be one of `header.path` (use the property at `path` in response header), `body.path` (use the property at `path` in response body) or `exact.value` (use the exact `value`). When absent, the current operation's URL is used for polling, execpt `Create` where it fallbacks to use the resource id as the polling URL.",
Optional: true,
Validators: []validator.String{
myvalidator.StringIsParsable("locator", func(s string) error {
Expand Down

0 comments on commit 66a1f8e

Please sign in to comment.