app_authorizations
Creates, updates, deletes, gets or lists an app_authorizations resource.
Overview
| Name | app_authorizations |
| Type | Resource |
| Id | aws.appfabric.app_authorizations |
Fields
The following fields are returned by SELECT queries:
- get_app_authorization
- list_app_authorizations
| Name | Datatype | Description |
|---|---|---|
app | string | The name of the application. |
app_authorization_arn | string | The Amazon Resource Name (ARN) of the app authorization. (pattern: <code>arn:.+</code>) |
app_bundle_arn | string | The Amazon Resource Name (ARN) of the app bundle for the app authorization. (pattern: <code>arn:.+</code>) |
auth_type | string | The authorization type. (oauth2, apiKey) |
auth_url | string | The application URL for the OAuth flow. |
created_at | string (date-time) | The timestamp of when the app authorization was created. |
persona | string | The user persona of the app authorization. This field should always be admin. (admin, endUser) |
status | string | The 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) |
tenant | object | Contains information about an application tenant. |
updated_at | string (date-time) | The timestamp of when the app authorization was last updated. |
| Name | Datatype | Description |
|---|---|---|
app | string | The name of the application. |
app_authorization_arn | string | The Amazon Resource Name (ARN) of the app authorization. (pattern: <code>arn:.+</code>) |
app_bundle_arn | string | The Amazon Resource Name (ARN) of the app bundle for the app authorization. (pattern: <code>arn:.+</code>) |
status | string | The 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) |
tenant | object | Contains information about an application tenant, such as the application display name and identifier. |
updated_at | string (date-time) | Timestamp for when the app authorization was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_app_authorization | select | app_bundle_identifier, app_authorization_identifier, region | Returns information about an app authorization. | |
list_app_authorizations | select | app_bundle_identifier, region | maxResults, nextToken | Returns a list of all app authorizations configured for an app bundle. |
create_app_authorization | insert | app_bundle_identifier, region, app, credential, tenant, authType | Creates an app authorization within an app bundle, which allows AppFabric to connect to an application. | |
update_app_authorization | update | app_bundle_identifier, app_authorization_identifier, region | 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. | |
delete_app_authorization | delete | app_bundle_identifier, app_authorization_identifier, region | Deletes an app authorization. You must delete the associated ingestion before you can delete an app authorization. | |
connect_app_authorization | exec | app_bundle_identifier, app_authorization_identifier, region | Establishes 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.
| Name | Datatype | Description |
|---|---|---|
app_authorization_identifier | string | The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app authorization to use for the request. |
app_bundle_identifier | string | The Amazon Resource Name (ARN) or Universal Unique Identifier (UUID) of the app bundle that contains the app authorization to use for the request. |
region | string | AWS region (default: us-east-1) |
maxResults | integer | The 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. |
nextToken | string | If 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
- get_app_authorization
- list_app_authorizations
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
;
Returns a list of all app authorizations configured for an app bundle.
SELECT
app,
app_authorization_arn,
app_bundle_arn,
status,
tenant,
updated_at
FROM aws.appfabric.app_authorizations
WHERE app_bundle_identifier = '{{ app_bundle_identifier }}' -- required
AND region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_app_authorization
- Manifest
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
;
# Description fields are for documentation purposes
- name: app_authorizations
props:
- name: app_bundle_identifier
value: "{{ app_bundle_identifier }}"
description: Required parameter for the app_authorizations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the app_authorizations resource.
- name: app
value: "{{ app }}"
- name: credential
description: |
Contains credential information for an application.
value:
oauth2Credential:
clientId: "{{ clientId }}"
clientSecret: "{{ clientSecret }}"
apiKeyCredential:
apiKey: "{{ apiKey }}"
- name: tenant
description: |
Contains information about an application tenant.
value:
tenantIdentifier: "{{ tenantIdentifier }}"
tenantDisplayName: "{{ tenantDisplayName }}"
- name: authType
value: "{{ authType }}"
valid_values: ['oauth2', 'apiKey']
- name: clientToken
value: "{{ clientToken }}"
- name: tags
value:
- key: "{{ key }}"
value: "{{ value }}"
UPDATE examples
- update_app_authorization
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
- delete_app_authorization
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
- connect_app_authorization
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 }}"
}'
;