ALTER APPLICATION SET SPECIFICATIONS¶
Crée ou met à jour une spécification d’application pour une Snowflake Native App.
Note
Cette commande ne peut être utilisée que par une Snowflake Native App.
- Voir aussi :
ALTER APPLICATION, ALTER APPLICATION … { APPROVE | DECLINE} SPECIFICATION, ALTER APPLICATION DROP SPECIFICATION
Syntaxe¶
Intégration de l’accès externe¶
ALTER APPLICATION SET SPECIFICATION <app_spec_name>
TYPE = EXTERNAL_ACCESS
LABEL = '<label>'
DESCRIPTION = '<description>'
{ HOST_PORTS | PRIVATE_HOST_PORTS } = ( '<value>' [, '<value>', ... ] )
Intégration de sécurité (CLIENT_CREDENTIALS)¶
ALTER APPLICATION SET SPECIFICATION <app_spec_name>
TYPE = SECURITY_INTEGRATION
LABEL = '<string_literal>'
DESCRIPTION = '<string_literal>'
OAUTH_TYPE = 'CLIENT_CREDENTIALS'
OAUTH_TOKEN_ENDPOINT = '<string_literal>'
OAUTH_ALLOWED_SCOPES = ( '<scope>' [ , '<scope>' ... ] );
Intégration de sécurité (JWT_BEARER)¶
ALTER APPLICATION SET SPECIFICATION <app_spec_name>
TYPE = SECURITY_INTEGRATION
LABEL = '<string_literal>'
DESCRIPTION = '<string_literal>'
OAUTH_TYPE = 'JWT_BEARER'
OAUTH_TOKEN_ENDPOINT = '<string_literal>'
[ OAUTH_AUTHORIZATION_ENDPOINT = '<string_literal>' ]
[ OAUTH_ALLOWED_SCOPES = ( '<scope>' [ , '<scope>' ... ] ) ];
Listing¶
ALTER APPLICATION SET SPECIFICATION <app_spec_name>
TYPE = LISTING
LABEL = '<string_literal>'
DESCRIPTION = '<string_literal>'
TARGET_ACCOUNTS = '<account_list>'
LISTING = <listing_name>
[ AUTO_FULFILLMENT_REFRESH_SCHEDULE = '<schedule>' ]
Paramètres généraux¶
app_spec_nameIdentificateur pour la spécification d’application.
TYPE = {EXTERNAL_ACCESS | SECURITY_INTEGRATION | LISTING}Spécifie le type de spécification d’application. Valeurs prises en charge :
LABEL = 'label'Spécifie une étiquette pour la spécification d’application. Cette balise est le nom de la spécification d’application visible par le consommateur. Chaque spécification d’application doit avoir une étiquette unique.
DESCRIPTION = 'description'Spécifie une description de la spécification d’application. Snowflake recommande d’inclure des informations sur le type de spécification d’application et la raison pour laquelle l’application l’exige.
Paramètres d’intégration d’accès externe¶
HOST_PORTS | PRIVATE_HOST_PORTS = ( 'value' [ , 'value', ... ] )Spécifie une liste de ports hôtes ou de ports hôtes privés auxquels l’application peut se connecter. Ces ports sont utilisés par des intégrations d’accès externes.
Paramètres d’intégration de sécurité - CLIENT_CREDENTIALS¶
OAUTH_TYPE = 'CLIENT_CREDENTIALS'Spécifie le type d’intégration de sécurité pour l’authentification d’API externe. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_TOKEN_ENDPOINT = 'string_literal'Spécifie le point de terminaison du jeton utilisé par le client pour obtenir un jeton d’accès en présentant son jeton d’attribution ou d’actualisation d’autorisation. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_ALLOWED_SCOPES = ( 'scope' [ , 'scope' ... ] )Spécifie une liste de champs d’application séparés par des virgules, avec des guillemets simples entourant chaque champ d’application, à utiliser lors de la conception d’une requête à partir de OAuth par un rôle avec USAGE sur l’intégration pendant le flux d’identifiants de connexion client OAuth. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_ACCESS_TOKEN_VALIDITY = integerSpécifie la durée de vie par défaut du jeton d’accès OAuth (en secondes) émis par un serveur OAuth. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
Paramètres d’intégration de sécurité - JWT_BEARER¶
OAUTH_TYPE = 'JWT_BEARER'Spécifie le type d’intégration de sécurité pour l’authentification d’API externe. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_TOKEN_ENDPOINT = 'string_literal'Spécifie le point de terminaison du jeton utilisé par le client pour obtenir un jeton d’accès en présentant son jeton d’attribution ou d’actualisation d’autorisation. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_AUTHORIZATION_ENDPOINT = 'string_literal'Spécifie l’URL pour l’authentification auprès du service externe. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
OAUTH_REFRESH_TOKEN_VALIDITY = integerSpécifie la durée de vie par défaut du jeton d’actualisation OAuth (en secondes) émis par un serveur OAuth. Pour plus d’informations, voir CREATE SECURITY INTEGRATION (authentification API externe).
Listing parameters¶
TARGET_ACCOUNTS = 'account_list'Specifies a single-quoted string of target accounts, separated by commas, with no spaces. Each account must be specified in the format
OrgName.AccountName; for example:'ProviderOrg.ProviderAccount,PartnerOrg.PartnerAccount'. When the specification is approved, these accounts are added to the listing. When declined, all accounts are removed from the listing.LISTING = listing_nameSpecifies the identifier of the external listing created by the app. The listing must already exist and must have been created by the app with a share attached. After the listing is set in an app specification, the listing name cannot be changed.
AUTO_FULFILLMENT_REFRESH_SCHEDULE = 'schedule'Optional. Specifies the refresh schedule for cross-region data sharing. This parameter is required when sharing data across regions. The value can be specified in two formats:
num MINUTE: Number of minutes, with a minimum of 10 minutes and a maximum of 11,520 minutes (eight days).USING CRON expression time_zone: Cron expression with time zone for the refresh.
Notes sur l’utilisation¶
Pour utiliser cette commande, les fournisseurs doivent s’assurer que le fichier manifeste de l’application utilise
manifest_version = 2.
Examples¶
Create an app specification for external access:
ALTER APPLICATION SET SPECIFICATION eai_spec
TYPE = EXTERNAL_ACCESS
LABEL = 'External API Access'
DESCRIPTION = 'Connect to external weather API'
HOST_PORTS = ('api.weather.com:443', 'api.openweather.org:443');
Create an app specification for OAuth security integration:
ALTER APPLICATION SET SPECIFICATION oauth_spec
TYPE = SECURITY_INTEGRATION
LABEL = 'OAuth Integration'
DESCRIPTION = 'Connect to Microsoft Graph API'
OAUTH_TYPE = 'CLIENT_CREDENTIALS'
OAUTH_TOKEN_ENDPOINT = 'https://login.microsoftonline.com/YOUR_TENANT_ID/oauth2/v2.0/token'
OAUTH_ALLOWED_SCOPES = ('https://graph.microsoft.com/.default');
Create an app specification for data sharing through a listing:
ALTER APPLICATION SET SPECIFICATION shareback_spec
TYPE = LISTING
LABEL = 'Telemetry Data Sharing'
DESCRIPTION = 'Share telemetry and usage data with provider'
TARGET_ACCOUNTS = 'ProviderOrg.ProviderAccount,PartnerOrg.PartnerAccount'
LISTING = telemetry_listing
AUTO_FULFILLMENT_REFRESH_SCHEDULE = '720 MINUTE';