managed_accounts
Creates, updates, deletes, gets or lists a managed_accounts
resource.
Overview
Name | managed_accounts |
Type | Resource |
Id | snowflake.managed_account.managed_accounts |
Fields
Name | Datatype | Description |
---|---|---|
name | string | A Snowflake object identifier. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive. |
account_locator_url | string | Account URL that is used to connect to the account, in the legacy account locator format. |
account_type | string | Type of the account. |
admin_name | string | Name of the account administrator. |
admin_password | string | Password for the account administrator. |
cloud | string | Cloud in which the managed account is located. For reader accounts, this is always the same as the cloud for the provider account. |
comment | string | Optional comment in which to store information related to the account. |
created_on | string | Date and time the account was created. |
locator | string | Legacy identifier for the account. |
region | string | Region in which the managed account is located. For reader accounts, this is always the same as the region for the provider account. |
url | string | Account URL that is used to connect to the account, in the account name format. The account identifier in this format follows the pattern {orgname}-{account_name}. |
Methods
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list_managed_accounts | SELECT | endpoint | like | Lists the accessible managed accounts. |
create_managed_account | INSERT | data__account_type, data__admin_name, data__admin_password, data__name, endpoint | - | Creates a managed account. You must provide the full managed account definition when creating a managed account. |
delete_managed_account | DELETE | name, endpoint | - | Removes a managed account, including all objects created in the account, and immediately restricts access to the account. Currently used by data providers to create reader accounts for their consumers. For more details, see Manage reader accounts. |
Optional Parameter Details
Name | Description | Type | Default |
---|---|---|---|
like | Query parameter to filter the command output by resource name. Uses case-insensitive pattern matching, with support for SQL wildcard characters. | string | - |
SELECT
examples
Lists the accessible managed accounts.
SELECT
name,
account_locator_url,
account_type,
admin_name,
admin_password,
cloud,
comment,
created_on,
locator,
region,
url
FROM snowflake.managed_account.managed_accounts
WHERE endpoint = '{{ endpoint }}';
INSERT
example
Creates a managed account. You must provide the full managed account definition when creating a managed account.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO snowflake.managed_account.managed_accounts (
data__name,
data__comment,
data__admin_name,
data__admin_password,
data__account_type,
endpoint
)
SELECT
'{{ name }}',
'{{ comment }}',
'{{ admin_name }}',
'{{ admin_password }}',
'{{ account_type }}',
'{{ endpoint }}'
;
/*+ create */
INSERT INTO snowflake.managed_account.managed_accounts (
data__name,
data__admin_name,
data__admin_password,
data__account_type,
endpoint
)
SELECT
'{{ name }}',
'{{ admin_name }}',
'{{ admin_password }}',
'{{ account_type }}',
'{{ endpoint }}'
;
# Description fields below are for documentation purposes only and are not required in the manifest
- name: managed_accounts
props:
- name: endpoint
value: string
description: Required parameter for the managed_accounts resource.
- name: name
value: string
description: >-
A Snowflake object identifier. If the identifier contains spaces or
special characters, the entire string must be enclosed in double quotes.
Identifiers enclosed in double quotes are also case-sensitive. (Required
parameter for the managed_accounts resource.)
- name: comment
value: string
description: Optional comment in which to store information related to the account.
- name: admin_name
value: string
description: >-
Name of the account administrator. (Required parameter for the
managed_accounts resource.)
- name: admin_password
value: string
description: >-
Password for the account administrator. (Required parameter for the
managed_accounts resource.)
- name: account_type
value: string
description: >-
Type of the account. (valid values: 'READER') (Required parameter for
the managed_accounts resource.)
default: READER
DELETE
example
Removes a managed account, including all objects created in the account, and immediately restricts access to the account. Currently used by data providers to create reader accounts for their consumers. For more details, see Manage reader accounts.
/*+ delete */
DELETE FROM snowflake.managed_account.managed_accounts
WHERE name = '{{ name }}'
AND endpoint = '{{ endpoint }}';