security_configs
Creates, updates, deletes or gets a security_config resource or lists security_configs in a region
Overview
| Name | security_configs |
| Type | Resource |
| Description | Amazon OpenSearchServerless security config resource |
| Id | awscc.opensearchserverless.security_configs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
description | string | Security config description |
id | string | The identifier of the security config |
name | string | The friendly name of the security config |
saml_options | object | Describes saml options in form of key value map |
iam_identity_center_options | object | Describes IAM Identity Center options for an OpenSearch Serverless security configuration in the form of a key-value map |
type | string | Config type for security config |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier of the security config |
region | string | AWS region. |
For more information, see AWS::OpenSearchServerless::SecurityConfig.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | security_configs | INSERT | region |
delete_resource | security_configs | DELETE | Identifier, region |
update_resource | security_configs | UPDATE | Identifier, PatchDocument, region |
list_resources | security_configs_list_only | SELECT | region |
get_resource | security_configs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual security_config.
SELECT
region,
description,
id,
name,
saml_options,
iam_identity_center_options,
type
FROM awscc.opensearchserverless.security_configs
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all security_configs in a region.
SELECT
region,
id
FROM awscc.opensearchserverless.security_configs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new security_config resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.opensearchserverless.security_configs (
Description,
Name,
SamlOptions,
IamIdentityCenterOptions,
Type,
region
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ saml_options }}',
'{{ iam_identity_center_options }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.opensearchserverless.security_configs (
Description,
Name,
SamlOptions,
IamIdentityCenterOptions,
Type,
region
)
SELECT
'{{ description }}',
'{{ name }}',
'{{ saml_options }}',
'{{ iam_identity_center_options }}',
'{{ type }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: security_config
props:
- name: description
value: '{{ description }}'
- name: name
value: '{{ name }}'
- name: saml_options
value:
metadata: '{{ metadata }}'
user_attribute: '{{ user_attribute }}'
group_attribute: '{{ group_attribute }}'
open_search_serverless_entity_id: '{{ open_search_serverless_entity_id }}'
session_timeout: '{{ session_timeout }}'
- name: iam_identity_center_options
value:
instance_arn: '{{ instance_arn }}'
application_arn: '{{ application_arn }}'
application_name: '{{ application_name }}'
application_description: '{{ application_description }}'
user_attribute: '{{ user_attribute }}'
group_attribute: '{{ group_attribute }}'
- name: type
value: '{{ type }}'
UPDATE example
Use the following StackQL query and manifest file to update a security_config resource, using stack-deploy.
/*+ update */
UPDATE awscc.opensearchserverless.security_configs
SET PatchDocument = string('{{ {
"Description": description,
"SamlOptions": saml_options
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.opensearchserverless.security_configs
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the security_configs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
aoss:CreateSecurityConfig,
sso:CreateApplication,
sso:ListApplications,
sso:DeleteApplication,
sso:PutApplicationAssignmentConfiguration,
sso:PutApplicationAuthenticationMethod,
sso:PutApplicationGrant
aoss:GetSecurityConfig
aoss:GetSecurityConfig,
aoss:UpdateSecurityConfig
aoss:DeleteSecurityConfig,
sso:ListApplicationAssignments,
sso:DeleteApplicationAssignment,
sso:DeleteApplication
aoss:ListSecurityConfigs