Skip to main content

memberships

Creates, updates, deletes, gets or lists a memberships resource.

Overview

Namememberships
TypeResource
Idaws.security_ir.memberships

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringResponse element for GetMembership that provides the account configured to manage the membership. (pattern: <code>[0-9]{12}</code>)
customer_typestringResponse element for GetMembership that provides the configured membership type. Options include Standalone | Organizations. (Standalone, Organization)
incident_response_teamarrayResponse element for GetMembership that provides the configured membership incident response team members.
membership_accounts_configurationsobjectThe 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_timestampstring (date-time)Response element for GetMembership that provides the configured membership activation timestamp.
membership_arnstringResponse 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_timestampstring (date-time)Response element for GetMembership that provides the configured membership name deactivation timestamp.
membership_idstringResponse element for GetMembership that provides the queried membership ID. (pattern: <code>m-[a-z0-9]{10,32}</code>)
membership_namestringResponse element for GetMembership that provides the configured membership name.
membership_statusstringResponse element for GetMembership that provides the current membership status. (Active, Cancelled, Terminated)
number_of_accounts_coveredinteger (int64)Response element for GetMembership that provides the number of accounts in the membership.
opt_in_featuresarrayResponse element for GetMembership that provides the if opt-in features have been enabled.
regionstringResponse 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)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_membershipselectmembership_id, regionReturns the attributes of a membership.
list_membershipsselectregionReturns the memberships that the calling principal can access.
create_membershipinsertregion, membershipName, incidentResponseTeamCreates a new membership.
update_membershipupdatemembership_id, regionUpdates membership configuration.
cancel_membershipexecmembership_id, regionCancels 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.

NameDatatypeDescription
membership_idstringRequired element used in combination with CancelMembershipRequest to identify the membership ID to cancel.
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

Cancels an existing membership.

EXEC aws.security_ir.memberships.cancel_membership
@membership_id='{{ membership_id }}' --required,
@region='{{ region }}' --required
;