Skip to content

ObjectStorage: Delete of a CredentialsGroup including all keys #7437

@hkujath

Description

@hkujath

Problem description

I want to delete a CredentialsGroup in my ObjectStorage-Instance. I become an error, that the ObjectStorage cant be deleted, when it still has access keys.

Proposed solution

Option 1: Provide a new "Delete"-function where i can enforce to delete all access keys as well.

cgID := "my-credentials-group-ID1"
enforceAKdeletion := true
objClient.DeleteCredentialsGroupExecute(ctx, projectIDPRODID, Region, cgID, enforceAKdeletion)

Option2: Include all access key ids in the CredentialsGroup object. With this list of IDs i could delete all access keys by myself before deleting the credentials group.

credentialGroups, _ := o.client.ListCredentialsGroupsExecute(ctx, projectId, region)
	
	for _, cg := credentialGroups.GetCredentialsGroups(){
		for _, akId := range cg.GetAccessKeys(){
			response, err := o.client.DeleteAccessKeyExecute(ctx, projectId, region, keyId)
			if err != nil {
				return err
			}	
		}
	}

there is no way of deleting a credentials group without knowing the access keys. And the GO SDK doesnt provide a solution to find out what access keys are configured inside a credentials group.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions