discoverers
Creates, updates, deletes or gets a discoverer resource or lists discoverers in a region
Overview
| Name | discoverers |
| Type | Resource |
| Description | Resource Type definition for AWS::EventSchemas::Discoverer |
| Id | awscc.eventschemas.discoverers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
discoverer_arn | string | The ARN of the discoverer. |
discoverer_id | string | The Id of the discoverer. |
description | string | A description for the discoverer. |
source_arn | string | The ARN of the event bus. |
cross_account | boolean | Defines whether event schemas from other accounts are discovered. Default is True. |
state | string | Defines the current state of the discoverer. |
tags | array | Tags associated with the resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
discoverer_arn | string | The ARN of the discoverer. |
region | string | AWS region. |
For more information, see AWS::EventSchemas::Discoverer.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | discoverers | INSERT | SourceArn, region |
delete_resource | discoverers | DELETE | Identifier, region |
update_resource | discoverers | UPDATE | Identifier, PatchDocument, region |
list_resources | discoverers_list_only | SELECT | region |
get_resource | discoverers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual discoverer.
SELECT
region,
discoverer_arn,
discoverer_id,
description,
source_arn,
cross_account,
state,
tags
FROM awscc.eventschemas.discoverers
WHERE
region = 'us-east-1' AND
Identifier = '{{ discoverer_arn }}';
Lists all discoverers in a region.
SELECT
region,
discoverer_arn
FROM awscc.eventschemas.discoverers_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new discoverer resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.eventschemas.discoverers (
SourceArn,
region
)
SELECT
'{{ source_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.eventschemas.discoverers (
Description,
SourceArn,
CrossAccount,
Tags,
region
)
SELECT
'{{ description }}',
'{{ source_arn }}',
'{{ cross_account }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: discoverer
props:
- name: description
value: '{{ description }}'
- name: source_arn
value: '{{ source_arn }}'
- name: cross_account
value: '{{ cross_account }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a discoverer resource, using stack-deploy.
/*+ update */
UPDATE awscc.eventschemas.discoverers
SET PatchDocument = string('{{ {
"Description": description,
"CrossAccount": cross_account,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ discoverer_arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.eventschemas.discoverers
WHERE
Identifier = '{{ discoverer_arn }}' AND
region = 'us-east-1';
Permissions
To operate on the discoverers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
schemas:CreateDiscoverer,
schemas:DescribeDiscoverer,
schemas:TagResource,
events:PutRule,
events:PutTargets,
events:EnableRule,
events:ListTargetsByRule,
iam:CreateServiceLinkedRole
schemas:DescribeDiscoverer
schemas:DescribeDiscoverer,
schemas:UpdateDiscoverer,
schemas:TagResource,
schemas:UntagResource,
schemas:ListTagsForResource,
events:PutTargets,
events:PutRule
schemas:DescribeDiscoverer,
schemas:DeleteDiscoverer,
events:DeleteRule,
events:DisableRule,
events:RemoveTargets
schemas:ListDiscoverers