memberships
Creates, updates, deletes, gets or lists a memberships resource.
Overview
| Name | memberships |
| Type | Resource |
| Id | aws.security_ir.memberships |
Fields
The following fields are returned by SELECT queries:
- get_membership
- list_memberships
| Name | Datatype | Description |
|---|---|---|
account_id | string | Response element for GetMembership that provides the account configured to manage the membership. (pattern: <code>[0-9]{12}</code>) |
customer_type | string | Response element for GetMembership that provides the configured membership type. Options include Standalone | Organizations. (Standalone, Organization) |
incident_response_team | array | Response element for GetMembership that provides the configured membership incident response team members. |
membership_accounts_configurations | object | The membershipAccountsConfigurations field contains the configuration details for member accounts within the Amazon Web Services Organizations membership structure. This field returns a structure containing information about: Account configurations for member accounts Membership settings and preferences Account-level permissions and roles |
membership_activation_timestamp | string (date-time) | Response element for GetMembership that provides the configured membership activation timestamp. |
membership_arn | string | Response element for GetMembership that provides the membership ARN. (pattern: <code>arn:aws:security-ir:\w+?-\w+?-\d+:[0-9]{12}:membership/m-[a-z0-9]{10,32}</code>) |
membership_deactivation_timestamp | string (date-time) | Response element for GetMembership that provides the configured membership name deactivation timestamp. |
membership_id | string | Response element for GetMembership that provides the queried membership ID. (pattern: <code>m-[a-z0-9]{10,32}</code>) |
membership_name | string | Response element for GetMembership that provides the configured membership name. |
membership_status | string | Response element for GetMembership that provides the current membership status. (Active, Cancelled, Terminated) |
number_of_accounts_covered | integer (int64) | Response element for GetMembership that provides the number of accounts in the membership. |
opt_in_features | array | Response element for GetMembership that provides the if opt-in features have been enabled. |
region | string | Response element for GetMembership that provides the region configured to manage the membership. (af-south-1, ap-east-1, ap-east-2, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ap-southeast-6, ap-southeast-7, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, mx-central-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2) |
| Name | Datatype | Description |
|---|---|---|
account_id | string | (pattern: <code>[0-9]{12}</code>) |
membership_arn | string | (pattern: <code>arn:aws:security-ir:\w+?-\w+?-\d+:[0-9]{12}:membership/m-[a-z0-9]{10,32}</code>) |
membership_id | string | (pattern: <code>m-[a-z0-9]{10,32}</code>) |
membership_status | string | (Active, Cancelled, Terminated) |
region | string | (af-south-1, ap-east-1, ap-east-2, ap-northeast-1, ap-northeast-2, ap-northeast-3, ap-south-1, ap-south-2, ap-southeast-1, ap-southeast-2, ap-southeast-3, ap-southeast-4, ap-southeast-5, ap-southeast-6, ap-southeast-7, ca-central-1, ca-west-1, cn-north-1, cn-northwest-1, eu-central-1, eu-central-2, eu-north-1, eu-south-1, eu-south-2, eu-west-1, eu-west-2, eu-west-3, il-central-1, me-central-1, me-south-1, mx-central-1, sa-east-1, us-east-1, us-east-2, us-west-1, us-west-2) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_membership | select | membership_id, region | Returns the attributes of a membership. | |
list_memberships | select | region | Returns the memberships that the calling principal can access. | |
create_membership | insert | region, membershipName, incidentResponseTeam | Creates a new membership. | |
update_membership | update | membership_id, region | Updates membership configuration. | |
cancel_membership | exec | membership_id, region | Cancels an existing membership. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
membership_id | string | Required element used in combination with CancelMembershipRequest to identify the membership ID to cancel. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_membership
- list_memberships
Returns the attributes of a membership.
SELECT
account_id,
customer_type,
incident_response_team,
membership_accounts_configurations,
membership_activation_timestamp,
membership_arn,
membership_deactivation_timestamp,
membership_id,
membership_name,
membership_status,
number_of_accounts_covered,
opt_in_features,
region
FROM aws.security_ir.memberships
WHERE membership_id = '{{ membership_id }}' -- required
AND region = '{{ region }}' -- required
;
Returns the memberships that the calling principal can access.
SELECT
account_id,
membership_arn,
membership_id,
membership_status,
region
FROM aws.security_ir.memberships
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_membership
- Manifest
Creates a new membership.
INSERT INTO aws.security_ir.memberships (
clientToken,
membershipName,
incidentResponseTeam,
optInFeatures,
tags,
coverEntireOrganization,
region
)
SELECT
'{{ clientToken }}',
'{{ membershipName }}' /* required */,
'{{ incidentResponseTeam }}' /* required */,
'{{ optInFeatures }}',
'{{ tags }}',
{{ coverEntireOrganization }},
'{{ region }}'
RETURNING
membership_id
;
# Description fields are for documentation purposes
- name: memberships
props:
- name: region
value: "{{ region }}"
description: Required parameter for the memberships resource.
- name: clientToken
value: "{{ clientToken }}"
- name: membershipName
value: "{{ membershipName }}"
- name: incidentResponseTeam
value:
- name: "{{ name }}"
jobTitle: "{{ jobTitle }}"
email: "{{ email }}"
communicationPreferences: "{{ communicationPreferences }}"
- name: optInFeatures
value:
- featureName: "{{ featureName }}"
isEnabled: {{ isEnabled }}
- name: tags
value: "{{ tags }}"
- name: coverEntireOrganization
value: {{ coverEntireOrganization }}
UPDATE examples
- update_membership
Updates membership configuration.
UPDATE aws.security_ir.memberships
SET
membershipName = '{{ membershipName }}',
incidentResponseTeam = '{{ incidentResponseTeam }}',
optInFeatures = '{{ optInFeatures }}',
membershipAccountsConfigurationsUpdate = '{{ membershipAccountsConfigurationsUpdate }}',
undoMembershipCancellation = {{ undoMembershipCancellation }}
WHERE
membership_id = '{{ membership_id }}' --required
AND region = '{{ region }}' --required;
Lifecycle Methods
- cancel_membership
Cancels an existing membership.
EXEC aws.security_ir.memberships.cancel_membership
@membership_id='{{ membership_id }}' --required,
@region='{{ region }}' --required
;