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.
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.
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.
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.