Skip to main content

account_federation_policy

Creates, updates, deletes, gets or lists an account_federation_policy resource.

Overview

Nameaccount_federation_policy
TypeResource
Iddatabricks_account.oauth2.account_federation_policy

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringResource name for the federation policy. Example values include `accounts/<account-id>/federationPolicies/my-federation-policy` for Account Federation Policies, and `accounts/<account-id>/servicePrincipals/<service-principal-id>/federationPolicies/my-federation-policy` for Service Principal Federation Policies. Typically an output parameter, which does not need to be specified in create or update requests. If specified in a request, must match the value in the request URL.
policy_idstringThe ID of the federation policy. Output only.
service_principal_idintegerThe service principal ID that this federation policy applies to. Output only. Only set for service principal federation policies.
create_timestring
descriptionstringDescription of the federation policy.
oidc_policyobjectSpecifies the policy to use for validating OIDC claims in your federated tokens.
uidstringUnique, immutable id of the federation policy.
update_timestringLast update time of the federation policy.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
account_federation_policy_getselectaccount_id, policy_idGet account federation policy.
account_federation_policy_listselectaccount_idpage_size, page_tokenList account federation policies.
account_federation_policy_createinsertaccount_id, policypolicy_idCreate account federation policy.
account_federation_policy_updateupdateaccount_id, policy_id, policyupdate_maskUpdate account federation policy.
account_federation_policy_deletedeleteaccount_id, policy_idDelete account federation policy.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstring
policy_idstringThe identifier for the federation policy.
page_sizeinteger
page_tokenstring
policy_idstringThe identifier for the federation policy. The identifier must contain only lowercase alphanumeric characters, numbers, hyphens, and slashes. If unspecified, the id will be assigned by Databricks.
update_maskstringThe field mask specifies which fields of the policy to update. To specify multiple fields in the field mask, use comma as the separator (no space). The special value '*' indicates that all fields should be updated (full replacement). If unspecified, all fields that are set in the policy provided in the update request will overwrite the corresponding fields in the existing policy. Example value: 'description,oidc_policy.audiences'.

SELECT examples

Get account federation policy.

SELECT
name,
policy_id,
service_principal_id,
create_time,
description,
oidc_policy,
uid,
update_time
FROM databricks_account.oauth2.account_federation_policy
WHERE account_id = '{{ account_id }}' -- required
AND policy_id = '{{ policy_id }}' -- required
;

INSERT examples

Create account federation policy.

INSERT INTO databricks_account.oauth2.account_federation_policy (
policy,
account_id,
policy_id
)
SELECT
'{{ policy }}' /* required */,
'{{ account_id }}',
'{{ policy_id }}'
RETURNING
name,
policy_id,
service_principal_id,
create_time,
description,
oidc_policy,
uid,
update_time
;

UPDATE examples

Update account federation policy.

UPDATE databricks_account.oauth2.account_federation_policy
SET
policy = '{{ policy }}'
WHERE
account_id = '{{ account_id }}' --required
AND policy_id = '{{ policy_id }}' --required
AND policy = '{{ policy }}' --required
AND update_mask = '{{ update_mask}}'
RETURNING
name,
policy_id,
service_principal_id,
create_time,
description,
oidc_policy,
uid,
update_time;

DELETE examples

Delete account federation policy.

DELETE FROM databricks_account.oauth2.account_federation_policy
WHERE account_id = '{{ account_id }}' --required
AND policy_id = '{{ policy_id }}' --required
;