IBM-Cloud / bluemix-go

Go library for accessing the Bluemix API
Apache License 2.0
37 stars 89 forks source link

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

Open desourav opened 4 years ago

desourav commented 4 years ago

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.