Cloud Account APIs for AWS Cloud Native Protection
The Rubrik GraphQL API provides queries and mutations to manage cloud accounts.
For all the GQL queries and mutations mentioned below, reference the API documentation.
Adding an AWS cloud account
To add a cloud account using APIs, do the following:
- Use the
finalizeAwsCloudAccountProtection
mutation to initiate cloud account addition. - Use the
awsTrustPolicy
query to get trust policies. - Use the
allAwsPermissionPolicies
query to get the permission policies. - Using these trust and permission policies, create an IAM cross-account role in AWS.
- If you are adding Exocompute feature, create and attach an instance profile to the Exocompute worker node role.
- Use the
registerAwsFeatureArtifacts
mutation to register these artificats you have created on AWS. - Go to the RSC UI and verify the new cloud account.
Deleting an AWS cloud account
To delete a cloud account using APIs, do the following:
- Use the
awsArtifactsToDelete
query to get a list of artifacts to be deleted from your AWS account. - Delete those artifacts from AWS.
- In RSC UI, from the Settings page, disable the cloud account to be deleted.
- Use the
bulkDeleteAwsCloudAccountWithoutCft
mutation to delete the account.