You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <CopyableCodecode="create_database_role" /> |`INSERT`| <CopyableCodecode="database_name, data__name, endpoint" /> | <CopyableCodecode="createMode" /> | Create a database role |
47
-
| <CopyableCodecode="delete_database_role" /> |`DELETE`| <CopyableCodecode="database_name, name, endpoint" /> | <CopyableCodecode="ifExists" /> | Delete a database role |
48
-
| <CopyableCodecode="clone_database_role" /> |`EXEC`| <CopyableCodecode="database_name, name, data__name, endpoint" /> | <CopyableCodecode="createMode" />, <CopyableCodecode="targetDatabase" /> | Create a new database role by cloning from the specified resource |
32
+
The following fields are returned by `SELECT` queries:
<td>How many database roles this database role has been granted to</td>
77
+
</tr>
78
+
<tr>
79
+
<td><CopyableCode code="granted_to_roles" /></td>
80
+
<td><code>integer (int64)</code></td>
81
+
<td>How many roles this database role has been granted to</td>
82
+
</tr>
83
+
<tr>
84
+
<td><CopyableCode code="owner" /></td>
85
+
<td><code>string</code></td>
86
+
<td>Role that owns the database role (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$)</td>
87
+
</tr>
88
+
<tr>
89
+
<td><CopyableCode code="owner_role_type" /></td>
90
+
<td><code>string</code></td>
91
+
<td>The type of role that owns the database role (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$)</td>
92
+
</tr>
93
+
</tbody>
94
+
</table>
95
+
</TabItem>
96
+
</Tabs>
55
97
56
-
| Name | Description | Type | Default |
57
-
|------|-------------|------|---------|
58
-
| <CopyableCodecode="createMode" /> | Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. |`string`|`errorIfExists`|
59
-
| <CopyableCodecode="fromName" /> | Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. |`string`|`-`|
60
-
| <CopyableCodecode="ifExists" /> | Query parameter that specifies how to handle the request for a resource that does not exist: - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - `false`: The endpoint throws an error if the resource doesn't exist. |`boolean`|`false`|
61
-
| <CopyableCodecode="showLimit" /> | Query parameter to limit the maximum number of rows returned by a command. |`integer`|`-`|
62
-
| <CopyableCodecode="targetDatabase" /> | Database of the target resource. Defaults to the source's database |`string`|`-`|
98
+
## Methods
63
99
64
-
</details>
100
+
The following methods are available for this resource:
<td>Create a new database role by cloning from the specified resource</td>
140
+
</tr>
141
+
</tbody>
142
+
</table>## Parameters
143
+
144
+
Parameters can be passed in the `WHERE` clause of a query. Check the [Methods](#methods) section to see which parameters are required or optional for each operation.
145
+
146
+
<table>
147
+
<thead>
148
+
<tr>
149
+
<th>Name</th>
150
+
<th>Datatype</th>
151
+
<th>Description</th>
152
+
</tr>
153
+
</thead>
154
+
<tbody>
155
+
<trid="parameter-database_name">
156
+
<td><CopyableCode code="database_name" /></td>
157
+
<td><code>string</code></td>
158
+
<td>Identifier (i.e. name) for the database to which the resource belongs. You can use the `/api/v2/databases` GET request to get a list of available databases. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)</td>
159
+
</tr>
160
+
<trid="parameter-endpoint">
161
+
<td><CopyableCode code="endpoint" /></td>
162
+
<td><code>string</code></td>
163
+
<td>Organization and Account Name (default: orgid-acctid)</td>
164
+
</tr>
165
+
<trid="parameter-name">
166
+
<td><CopyableCode code="name" /></td>
167
+
<td><code>string</code></td>
168
+
<td>Identifier (i.e. name) for the resource. (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$, example: TEST_NAME)</td>
169
+
</tr>
170
+
<trid="parameter-createMode">
171
+
<td><CopyableCode code="createMode" /></td>
172
+
<td><code>string</code></td>
173
+
<td>Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. (enum: [errorIfExists, orReplace, ifNotExists], example: ifNotExists, default: errorIfExists)</td>
174
+
</tr>
175
+
<trid="parameter-fromName">
176
+
<td><CopyableCode code="fromName" /></td>
177
+
<td><code>string</code></td>
178
+
<td>Query parameter to enable fetching rows only following the first row whose object name matches the specified string. Case-sensitive and does not have to be the full name. (example: from_test)</td>
179
+
</tr>
180
+
<trid="parameter-ifExists">
181
+
<td><CopyableCode code="ifExists" /></td>
182
+
<td><code>boolean</code></td>
183
+
<td>Query parameter that specifies how to handle the request for a resource that does not exist: - `true`: The endpoint does not throw an error if the resource does not exist. It returns a 200 success response, but does not take any action on the resource. - `false`: The endpoint throws an error if the resource doesn't exist. (example: true, default: false)</td>
184
+
</tr>
185
+
<trid="parameter-showLimit">
186
+
<td><CopyableCode code="showLimit" /></td>
187
+
<td><code>integer</code></td>
188
+
<td>Query parameter to limit the maximum number of rows returned by a command. (example: 10, minimum: 1, maximum: 10000)</td>
189
+
</tr>
190
+
<trid="parameter-targetDatabase">
191
+
<td><CopyableCode code="targetDatabase" /></td>
192
+
<td><code>string</code></td>
193
+
<td>Database of the target resource. Defaults to the source's database (pattern: ^"([^"]|"")+"|[a-zA-Z_][a-zA-Z0-9_$]*$)</td>
# Description fields below are for documentation purposes only and are not required in the manifest
263
+
# Description fields are for documentation purposes
137
264
- name: database_roles
138
265
props:
139
266
- name: database_name
@@ -144,24 +271,68 @@ SELECT
144
271
description: Required parameter for the database_roles resource.
145
272
- name: name
146
273
value: string
147
-
description: >-
148
-
Name of the database role (Required parameter for the database_roles
149
-
resource.)
274
+
description: >
275
+
Name of the database role
276
+
150
277
- name: comment
151
278
value: string
152
-
description: User comment associated to an object in the dictionary
279
+
description: >
280
+
User comment associated to an object in the dictionary
281
+
282
+
- name: createMode
283
+
value: string
284
+
description: Query parameter allowing support for different modes of resource creation. Possible values include: - `errorIfExists`: Throws an error if you try to create a resource that already exists. - `orReplace`: Automatically replaces the existing resource with the current one. - `ifNotExists`: Creates a new resource when an alter is requested for a non-existent resource. (enum: [errorIfExists, orReplace, ifNotExists], example: ifNotExists, default: errorIfExists)
0 commit comments