Skip to main content

app_authorizations

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

Overview

Nameapp_authorizations
TypeResource
Idaws.appfabric.app_authorizations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
appstringThe name of the application.
app_authorization_arnstringThe Amazon Resource Name (ARN) of the app authorization. (pattern: <code>arn:.+</code>)
app_bundle_arnstringThe Amazon Resource Name (ARN) of the app bundle for the app authorization. (pattern: <code>arn:.+</code>)
auth_typestringThe authorization type. (oauth2, apiKey)
auth_urlstringThe application URL for the OAuth flow.
created_atstring (date-time)The timestamp of when the app authorization was created.
personastringThe user persona of the app authorization. This field should always be admin. (admin, endUser)
statusstringThe state of the app authorization. The following states are possible: PendingConnect: The initial state of the app authorization. The app authorization is created but not yet connected. Connected: The app authorization is connected to the application, and is ready to be used. ConnectionValidationFailed: The app authorization received a validation exception when trying to connect to the application. If the app authorization is in this state, you should verify the configured credentials and try to connect the app authorization again. TokenAutoRotationFailed: AppFabric failed to refresh the access token. If the app authorization is in this state, you should try to reconnect the app authorization. (PendingConnect, Connected, ConnectionValidationFailed, TokenAutoRotationFailed)
tenantobjectContains information about an application tenant.
updated_atstring (date-time)The timestamp of when the app authorization was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_app_authorizationselectapp_bundle_identifier, app_authorization_identifier, regionReturns information about an app authorization.
list_app_authorizationsselectapp_bundle_identifier, regionmaxResults, nextTokenReturns a list of all app authorizations configured for an app bundle.
create_app_authorizationinsertapp_bundle_identifier, region, app, credential, tenant, authTypeCreates an app authorization within an app bundle, which allows AppFabric to connect to an application.
update_app_authorizationupdateapp_bundle_identifier, app_authorization_identifier, regionUpdates an app authorization within an app bundle, which allows AppFabric to connect to an application. If the app authorization was in a connected state, updating the app authorization will set it back to a PendingConnect state.
delete_app_authorizationdeleteapp_bundle_identifier, app_authorization_identifier, regionDeletes an app authorization. You must delete the associated ingestion before you can delete an app authorization.
connect_app_authorizationexecapp_bundle_identifier, app_authorization_identifier, regionEstablishes a connection between Amazon Web Services AppFabric and an application, which allows AppFabric to call the APIs of the application.

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
app_authorization_identifierstringThe Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app authorization to use for the request.
app_bundle_identifierstringThe Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle that contains the app authorization to use for the request.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results that are returned per call. You can use nextToken to obtain further pages of results. This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.
nextTokenstringIf nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

SELECT examples

Returns information about an app authorization.

SELECT
app,
app_authorization_arn,
app_bundle_arn,
auth_type,
auth_url,
created_at,
persona,
status,
tenant,
updated_at
FROM aws.appfabric.app_authorizations
WHERE app_bundle_identifier = '{{ app_bundle_identifier }}' -- required
AND app_authorization_identifier = '{{ app_authorization_identifier }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates an app authorization within an app bundle, which allows AppFabric to connect to an application.

INSERT INTO aws.appfabric.app_authorizations (
app,
credential,
tenant,
authType,
clientToken,
tags,
app_bundle_identifier,
region
)
SELECT
'{{ app }}' /* required */,
'{{ credential }}' /* required */,
'{{ tenant }}' /* required */,
'{{ authType }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ app_bundle_identifier }}',
'{{ region }}'
RETURNING
app_authorization
;

UPDATE examples

Updates an app authorization within an app bundle, which allows AppFabric to connect to an application. If the app authorization was in a connected state, updating the app authorization will set it back to a PendingConnect state.

UPDATE aws.appfabric.app_authorizations
SET
credential = '{{ credential }}',
tenant = '{{ tenant }}'
WHERE
app_bundle_identifier = '{{ app_bundle_identifier }}' --required
AND app_authorization_identifier = '{{ app_authorization_identifier }}' --required
AND region = '{{ region }}' --required
RETURNING
app_authorization;

DELETE examples

Deletes an app authorization. You must delete the associated ingestion before you can delete an app authorization.

DELETE FROM aws.appfabric.app_authorizations
WHERE app_bundle_identifier = '{{ app_bundle_identifier }}' --required
AND app_authorization_identifier = '{{ app_authorization_identifier }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Establishes a connection between Amazon Web Services AppFabric and an application, which allows AppFabric to call the APIs of the application.

EXEC aws.appfabric.app_authorizations.connect_app_authorization
@app_bundle_identifier='{{ app_bundle_identifier }}' --required,
@app_authorization_identifier='{{ app_authorization_identifier }}' --required,
@region='{{ region }}' --required
@@json=
'{
"authRequest": "{{ authRequest }}"
}'
;