bluemix-go icon indicating copy to clipboard operation
bluemix-go copied to clipboard

CreateKey(CreateServiceKeyRequest) : Creates more than one service credential with the same name

Open desourav opened this issue 6 years ago • 0 comments

The method CreateKey(CreateServiceKeyRequest) has the ability to create multiple service credential with the same name for a cloud instance. This is not allowed in the IBM Cloud console UI as it gives a warning "Service Credential with the same name already exists". Can we have the same functionality in the SDK as well?

serviceKey, err = resourceSession.CreateKey(controller.CreateServiceKeyRequest{
			Name:      "ift-cloud-object-202002121943",
			SourceCRN: parseInstanceCRN,
			Parameters: map[string]interface{}{
				"HMAC": true,
			},
		})

When executed n times, the cloud instance has n "ift-cloud-object-202002121943" service credential.

desourav avatar Feb 14 '20 16:02 desourav