partner_accounts
Creates, updates, deletes or gets a partner_account resource or lists partner_accounts in a region
Overview
| Name | partner_accounts |
| Type | Resource |
| Description | Create and manage partner account |
| Id | awscc.iotwireless.partner_accounts |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
sidewalk | object | The Sidewalk account credentials. |
partner_account_id | string | The partner account ID to disassociate from the AWS account |
partner_type | string | The partner type |
sidewalk_response | object | The Sidewalk account credentials. |
account_linked | boolean | Whether the partner account is linked to the AWS account. |
sidewalk_update | object | The Sidewalk account credentials. |
fingerprint | string | The fingerprint of the Sidewalk application server private key. |
arn | string | PartnerAccount arn. Returned after successful create. |
tags | array | A list of key-value pairs that contain metadata for the destination. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
partner_account_id | string | The partner account ID to disassociate from the AWS account |
region | string | AWS region. |
For more information, see AWS::IoTWireless::PartnerAccount.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | partner_accounts | INSERT | region |
delete_resource | partner_accounts | DELETE | Identifier, region |
update_resource | partner_accounts | UPDATE | Identifier, PatchDocument, region |
list_resources | partner_accounts_list_only | SELECT | region |
get_resource | partner_accounts | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual partner_account.
SELECT
region,
sidewalk,
partner_account_id,
partner_type,
sidewalk_response,
account_linked,
sidewalk_update,
fingerprint,
arn,
tags
FROM awscc.iotwireless.partner_accounts
WHERE
region = '{{ region }}' AND
Identifier = '{{ partner_account_id }}';
Lists all partner_accounts in a region.
SELECT
region,
partner_account_id
FROM awscc.iotwireless.partner_accounts_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new partner_account resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iotwireless.partner_accounts (
Sidewalk,
PartnerAccountId,
PartnerType,
SidewalkResponse,
AccountLinked,
SidewalkUpdate,
Tags,
region
)
SELECT
'{{ sidewalk }}',
'{{ partner_account_id }}',
'{{ partner_type }}',
'{{ sidewalk_response }}',
'{{ account_linked }}',
'{{ sidewalk_update }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iotwireless.partner_accounts (
Sidewalk,
PartnerAccountId,
PartnerType,
SidewalkResponse,
AccountLinked,
SidewalkUpdate,
Tags,
region
)
SELECT
'{{ sidewalk }}',
'{{ partner_account_id }}',
'{{ partner_type }}',
'{{ sidewalk_response }}',
'{{ account_linked }}',
'{{ sidewalk_update }}',
'{{ tags }}',
'{{ 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: partner_account
props:
- name: sidewalk
value:
app_server_private_key: '{{ app_server_private_key }}'
- name: partner_account_id
value: '{{ partner_account_id }}'
- name: partner_type
value: '{{ partner_type }}'
- name: sidewalk_response
value:
amazon_id: '{{ amazon_id }}'
fingerprint: '{{ fingerprint }}'
arn: '{{ arn }}'
- name: account_linked
value: '{{ account_linked }}'
- name: sidewalk_update
value:
app_server_private_key: '{{ app_server_private_key }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a partner_account resource, using stack-deploy.
/*+ update */
UPDATE awscc.iotwireless.partner_accounts
SET PatchDocument = string('{{ {
"Sidewalk": sidewalk,
"PartnerType": partner_type,
"SidewalkResponse": sidewalk_response,
"AccountLinked": account_linked,
"SidewalkUpdate": sidewalk_update,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ partner_account_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iotwireless.partner_accounts
WHERE
Identifier = '{{ partner_account_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 partner_accounts resource, the following permissions are required:
- Create
- Read
- List
- Update
- Delete
iotwireless:AssociateAwsAccountWithPartnerAccount,
iotwireless:TagResource,
iotwireless:GetPartnerAccount
iotwireless:GetPartnerAccount,
iotwireless:ListTagsForResource
iotwireless:ListPartnerAccounts,
iotwireless:ListTagsForResource
iotwireless:GetPartnerAccount,
iotwireless:AssociateAwsAccountWithPartnerAccount,
iotwireless:UpdatePartnerAccount,
iotwireless:ListTagsForResource,
iotwireless:TagResource,
iotwireless:UntagResource
iotwireless:DisassociateAwsAccountFromPartnerAccount