partnerships
Creates, updates, deletes or gets a partnership resource or lists partnerships in a region
Overview
| Name | partnerships |
| Type | Resource |
| Description | Definition of AWS::B2BI::Partnership Resource Type |
| Id | awscc.b2bi.partnerships |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
capabilities | array | |
capability_options | object | |
created_at | string | |
email | string | |
modified_at | string | |
name | string | |
partnership_arn | string | |
partnership_id | string | |
phone | string | |
profile_id | string | |
tags | array | |
trading_partner_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
partnership_id | string | |
region | string | AWS region. |
For more information, see AWS::B2BI::Partnership.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | partnerships | INSERT | Capabilities, Email, Name, ProfileId, region |
delete_resource | partnerships | DELETE | Identifier, region |
update_resource | partnerships | UPDATE | Identifier, PatchDocument, region |
list_resources | partnerships_list_only | SELECT | region |
get_resource | partnerships | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual partnership.
SELECT
region,
capabilities,
capability_options,
created_at,
email,
modified_at,
name,
partnership_arn,
partnership_id,
phone,
profile_id,
tags,
trading_partner_id
FROM awscc.b2bi.partnerships
WHERE
region = '{{ region }}' AND
Identifier = '{{ partnership_id }}';
Lists all partnerships in a region.
SELECT
region,
partnership_id
FROM awscc.b2bi.partnerships_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new partnership resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.b2bi.partnerships (
Capabilities,
Email,
Name,
ProfileId,
region
)
SELECT
'{{ capabilities }}',
'{{ email }}',
'{{ name }}',
'{{ profile_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.b2bi.partnerships (
Capabilities,
CapabilityOptions,
Email,
Name,
Phone,
ProfileId,
Tags,
region
)
SELECT
'{{ capabilities }}',
'{{ capability_options }}',
'{{ email }}',
'{{ name }}',
'{{ phone }}',
'{{ profile_id }}',
'{{ 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: partnership
props:
- name: capabilities
value:
- '{{ capabilities[0] }}'
- name: capability_options
value:
outbound_edi: null
inbound_edi:
x12:
acknowledgment_options:
functional_acknowledgment: '{{ functional_acknowledgment }}'
technical_acknowledgment: '{{ technical_acknowledgment }}'
- name: email
value: '{{ email }}'
- name: name
value: '{{ name }}'
- name: phone
value: '{{ phone }}'
- name: profile_id
value: '{{ profile_id }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a partnership resource, using stack-deploy.
/*+ update */
UPDATE awscc.b2bi.partnerships
SET PatchDocument = string('{{ {
"Capabilities": capabilities,
"CapabilityOptions": capability_options,
"Name": name,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ partnership_id }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.b2bi.partnerships
WHERE
Identifier = '{{ partnership_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 partnerships resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
b2bi:CreatePartnership,
b2bi:TagResource,
s3:PutObject
b2bi:GetPartnership,
b2bi:ListTagsForResource
b2bi:TagResource,
b2bi:UntagResource,
b2bi:UpdatePartnership
b2bi:DeletePartnership
b2bi:ListPartnerships