virtual_clusters
Creates, updates, deletes or gets a virtual_cluster resource or lists virtual_clusters in a region
Overview
| Name | virtual_clusters |
| Type | Resource |
| Description | Resource Schema of AWS::EMRContainers::VirtualCluster Type |
| Id | awscc.emrcontainers.virtual_clusters |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | |
container_provider | object | Container provider of the virtual cluster. |
id | string | Id of the virtual cluster. |
name | string | Name of the virtual cluster. |
tags | array | An array of key-value pairs to apply to this virtual cluster. |
security_configuration_id | string | The ID of the security configuration. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | Id of the virtual cluster. |
region | string | AWS region. |
For more information, see AWS::EMRContainers::VirtualCluster.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | virtual_clusters | INSERT | Name, ContainerProvider, region |
delete_resource | virtual_clusters | DELETE | Identifier, region |
update_resource | virtual_clusters | UPDATE | Identifier, PatchDocument, region |
list_resources | virtual_clusters_list_only | SELECT | region |
get_resource | virtual_clusters | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual virtual_cluster.
SELECT
region,
arn,
container_provider,
id,
name,
tags,
security_configuration_id
FROM awscc.emrcontainers.virtual_clusters
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
Lists all virtual_clusters in a region.
SELECT
region,
id
FROM awscc.emrcontainers.virtual_clusters_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new virtual_cluster resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.emrcontainers.virtual_clusters (
ContainerProvider,
Name,
region
)
SELECT
'{{ container_provider }}',
'{{ name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.emrcontainers.virtual_clusters (
ContainerProvider,
Name,
Tags,
SecurityConfigurationId,
region
)
SELECT
'{{ container_provider }}',
'{{ name }}',
'{{ tags }}',
'{{ security_configuration_id }}',
'{{ 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: virtual_cluster
props:
- name: container_provider
value:
type: '{{ type }}'
id: '{{ id }}'
info:
eks_info:
namespace: '{{ namespace }}'
- name: name
value: '{{ name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: security_configuration_id
value: '{{ security_configuration_id }}'
UPDATE example
Use the following StackQL query and manifest file to update a virtual_cluster resource, using stack-deploy.
/*+ update */
UPDATE awscc.emrcontainers.virtual_clusters
SET PatchDocument = string('{{ {
"Tags": tags,
"SecurityConfigurationId": security_configuration_id
} | 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.emrcontainers.virtual_clusters
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 virtual_clusters resource, the following permissions are required:
- Create
- Read
- Delete
- List
- Update
emr-containers:CreateVirtualCluster,
emr-containers:TagResource,
iam:CreateServiceLinkedRole
emr-containers:DescribeVirtualCluster
emr-containers:DeleteVirtualCluster,
emr-containers:DescribeVirtualCluster
emr-containers:ListVirtualClusters
emr-containers:DescribeVirtualCluster,
emr-containers:ListTagsForResource,
emr-containers:TagResource,
emr-containers:UntagResource