rule_groups_namespaces
Creates, updates, deletes, gets or lists a rule_groups_namespaces resource.
Overview
| Name | rule_groups_namespaces |
| Type | Resource |
| Id | aws.amp.rule_groups_namespaces |
Fields
The following fields are returned by SELECT queries:
- describe_rule_groups_namespace
- list_rule_groups_namespaces
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the namespace that the rule group belong to. (pattern: <code>.[0-9A-Za-z][-.0-9A-Z_a-z].*</code>) |
arn | string | The ARN of the rule groups namespace. For example, arn:aws:aps:<region>:123456789012:rulegroupsnamespace/ws-example1-1234-abcd-5678-ef90abcd1234/rulesfile1. |
created_at | string (date-time) | The date and time that the rule groups namespace was created. |
data | string (byte) | The rule groups namespace data. |
modified_at | string (date-time) | The date and time that the rule groups namespace was most recently changed. |
status | object | The current status of the rule groups namespace. |
tags | object | The list of tag keys and values that are associated with the rule groups namespace. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the namespace that the rule group belong to. (pattern: <code>.[0-9A-Za-z][-.0-9A-Z_a-z].*</code>) |
arn | string | The ARN of the rule groups namespace. |
created_at | string (date-time) | The date and time that the rule groups namespace was created. |
modified_at | string (date-time) | The date and time that the rule groups namespace was most recently changed. |
status | object | A structure that displays the current status of the rule groups namespace. |
tags | object | The list of tag keys and values that are associated with the rule groups namespace. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_rule_groups_namespace | select | workspace_id, name, region | Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use ListRuleGroupsNamespaces. | |
list_rule_groups_namespaces | select | workspace_id, region | name, nextToken, maxResults | Returns a list of rule groups namespaces in a workspace. |
create_rule_groups_namespace | insert | workspace_id, region, name, data | The CreateRuleGroupsNamespace operation creates a rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes. Use this operation only to create new rule groups namespaces. To update an existing rule groups namespace, use PutRuleGroupsNamespace. | |
put_rule_groups_namespace | replace | workspace_id, name, region, data | Updates an existing rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes. Use this operation only to update existing rule groups namespaces. To create a new rule groups namespace, use CreateRuleGroupsNamespace. You can't use this operation to add tags to an existing rule groups namespace. Instead, use TagResource. | |
delete_rule_groups_namespace | delete | workspace_id, name, region | clientToken | Deletes one rule groups namespace and its associated rule groups definition. |
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 |
|---|---|---|
name | string | The name of the rule groups namespace to delete. |
region | string | AWS region (default: us-east-1) |
workspace_id | string | The ID of the workspace containing the rule groups namespace and definition to delete. |
clientToken | string | A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive. |
maxResults | integer | The maximum number of results to return. The default is 100. |
name | string | Use this parameter to filter the rule groups namespaces that are returned. Only the namespaces with names that begin with the value that you specify are returned. |
nextToken | string | The token for the next set of items to return. You receive this token from a previous call, and use it to get the next page of results. The other parameters must be the same as the initial call. For example, if your initial request has maxResults of 10, and there are 12 rule groups namespaces to return, then your initial request will return 10 and a nextToken. Using the next token in a subsequent call will return the remaining 2 namespaces. |
SELECT examples
- describe_rule_groups_namespace
- list_rule_groups_namespaces
Returns complete information about one rule groups namespace. To retrieve a list of rule groups namespaces, use ListRuleGroupsNamespaces.
SELECT
name,
arn,
created_at,
data,
modified_at,
status,
tags
FROM aws.amp.rule_groups_namespaces
WHERE workspace_id = '{{ workspace_id }}' -- required
AND name = '{{ name }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of rule groups namespaces in a workspace.
SELECT
name,
arn,
created_at,
modified_at,
status,
tags
FROM aws.amp.rule_groups_namespaces
WHERE workspace_id = '{{ workspace_id }}' -- required
AND region = '{{ region }}' -- required
AND name = '{{ name }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;
INSERT examples
- create_rule_groups_namespace
- Manifest
The CreateRuleGroupsNamespace operation creates a rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes. Use this operation only to create new rule groups namespaces. To update an existing rule groups namespace, use PutRuleGroupsNamespace.
INSERT INTO aws.amp.rule_groups_namespaces (
name,
data,
clientToken,
tags,
workspace_id,
region
)
SELECT
'{{ name }}' /* required */,
'{{ data }}' /* required */,
'{{ clientToken }}',
'{{ tags }}',
'{{ workspace_id }}',
'{{ region }}'
RETURNING
name,
arn,
status,
tags
;
# Description fields are for documentation purposes
- name: rule_groups_namespaces
props:
- name: workspace_id
value: "{{ workspace_id }}"
description: Required parameter for the rule_groups_namespaces resource.
- name: region
value: "{{ region }}"
description: Required parameter for the rule_groups_namespaces resource.
- name: name
value: "{{ name }}"
description: |
The name of the namespace that the rule group belong to.
- name: data
value: "{{ data }}"
description: |
The rule groups namespace data.
- name: clientToken
value: "{{ clientToken }}"
description: |
An identifier used to ensure the idempotency of a write request.
- name: tags
value: "{{ tags }}"
description: |
A tag associated with a resource.
REPLACE examples
- put_rule_groups_namespace
Updates an existing rule groups namespace within a workspace. A rule groups namespace is associated with exactly one rules file. A workspace can have multiple rule groups namespaces. The combined length of a rule group namespace and a rule group name cannot exceed 721 UTF-8 bytes. Use this operation only to update existing rule groups namespaces. To create a new rule groups namespace, use CreateRuleGroupsNamespace. You can't use this operation to add tags to an existing rule groups namespace. Instead, use TagResource.
REPLACE aws.amp.rule_groups_namespaces
SET
data = '{{ data }}',
clientToken = '{{ clientToken }}'
WHERE
workspace_id = '{{ workspace_id }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND data = '{{ data }}' --required
RETURNING
name,
arn,
status,
tags;
DELETE examples
- delete_rule_groups_namespace
Deletes one rule groups namespace and its associated rule groups definition.
DELETE FROM aws.amp.rule_groups_namespaces
WHERE workspace_id = '{{ workspace_id }}' --required
AND name = '{{ name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;