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 = 'us-east-1' AND
Identifier = '{{ partnership_id }}';
Lists all partnerships in a region.
SELECT
region,
partnership_id
FROM awscc.b2bi.partnerships_list_only
WHERE
region = 'us-east-1';
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 }}';
/*+ 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 }}';
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.b2bi.partnerships
WHERE
Identifier = '{{ partnership_id }}' AND
region = 'us-east-1';
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