ALTER APPLICATION SET SPECIFICATIONS¶
Cria ou atualiza uma especificação de aplicativo para um Snowflake Native App.
Nota
Este comando só pode ser usado por um Snowflake Native App.
- Consulte também:
ALTER APPLICATION, ALTER APPLICATION … { APPROVE | DECLINE} SPECIFICATION, ALTER APPLICATION DROP SPECIFICATION
Sintaxe¶
Integração de acesso externo¶
ALTER APPLICATION SET SPECIFICATION <app_spec_name>
TYPE = EXTERNAL_ACCESS
LABEL = '<label>'
DESCRIPTION = '<description>'
{ HOST_PORTS | PRIVATE_HOST_PORTS } = ( '<value>' [, '<value>', ... ] )
Integração de segurança (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>' ... ] );
Integração de segurança (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>' ]
Parâmetros gerais¶
app_spec_nameIdentificador da especificação de aplicativo.
TYPE = {EXTERNAL_ACCESS | SECURITY_INTEGRATION | LISTING}Especifica o tipo de especificação de aplicativo. Os valores suportados são:
LABEL = 'label'Especifica um rótulo para a especificação de aplicativo. Este rótulo é o nome da especificação de aplicativo que fica visível para o consumidor. Cada especificação de aplicativo deve ter um rótulo exclusivo.
DESCRIPTION = 'description'Especifica uma descrição da especificação de aplicativo. O Snowflake recomenda incluir informações sobre o tipo de especificação de aplicativo e por que ela é exigida pelo aplicativo.
Parâmetros de integração de acesso externo¶
HOST_PORTS | PRIVATE_HOST_PORTS = ( 'value' [ , 'value', ... ] )Especifica uma lista de portas de host ou portas de host privadas às quais o aplicativo pode se conectar. Essas portas são usadas por integrações de acesso externo.
Parâmetros de integração de segurança - CLIENT_CREDENTIALS¶
OAUTH_TYPE = 'CLIENT_CREDENTIALS'Especifica o tipo de integração de segurança para Autenticação de API externa. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_TOKEN_ENDPOINT = 'string_literal'Especifica o ponto de extremidade do token usado pelo cliente para obter um token de acesso apresentando sua concessão de autorização ou token de atualização. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_ALLOWED_SCOPES = ( 'scope' [ , 'scope' ... ] )Especifica uma lista de escopos separada por vírgulas, com aspas simples em torno de cada escopo, a ser usada ao fazer uma solicitação do OAuth por uma função com USAGE na integração durante o fluxo de credenciais do cliente OAuth. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_ACCESS_TOKEN_VALIDITY = integerEspecifica a vida útil padrão do token de acesso OAuth (em segundos) emitido por um servidor OAuth. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
Parâmetros de integração de segurança - JWT_BEARER¶
OAUTH_TYPE = 'JWT_BEARER'Especifica o tipo de integração de segurança para Autenticação de API externa. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_TOKEN_ENDPOINT = 'string_literal'Especifica o ponto de extremidade do token usado pelo cliente para obter um token de acesso apresentando sua concessão de autorização ou token de atualização. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_AUTHORIZATION_ENDPOINT = 'string_literal'Especifica o URL para autenticação ao serviço externo. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
OAUTH_REFRESH_TOKEN_VALIDITY = integerEspecifica a vida útil padrão do token de atualização OAuth (em segundos) emitido por um servidor OAuth. Consulte CREATE SECURITY INTEGRATION (Autenticação de API externa) para obter mais informações.
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.
Notas de uso¶
Para usar este comando, os provedores devem garantir que o arquivo de manifesto do aplicativo use
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';