Struct: kms.InvalidKeyUsageException

import "../ibm-cos-sdk-go/service/kms"

Overview

The request was rejected for one of the following reasons:

  • The KeyUsage value of the CMK is incompatible with the API operation.

  • The encryption algorithm or signing algorithm specified for the operation is incompatible with the type of key material in the CMK (CustomerMasterKeySpec).

For encrypting, decrypting, re-encrypting, and generating data keys, the KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage must be SIGN_VERIFY. To find the KeyUsage of a CMK, use the DescribeKey operation.

To find the encryption or signing algorithms supported for a particular CMK, use the DescribeKey operation.

Implemented Interfaces

s3crypto.Cipher, awserr.Error, s3manager.ReadSeekerWriteTo, awserr.RequestFailure, s3manager.WriterReadFrom

Structure Field Summary collapse

Service Operations collapse

Structure Field Details

Message_ *string `locationName:"message" type:"string"`

RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

_ struct{} `type:"structure"`

Method Details

func (s *InvalidKeyUsageException) Code() string

Code returns the exception type name.



13927
13928
13929
// File 'service/kms/api.go', line 13927

func (s *InvalidKeyUsageException) Error() string



13944
13945
13946
// File 'service/kms/api.go', line 13944

func (s *InvalidKeyUsageException) Error() string { return fmt.Sprintf("%s: %s", s.Code(), s.Message()) }

func (s InvalidKeyUsageException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



13916
13917
13918
// File 'service/kms/api.go', line 13916

func (s InvalidKeyUsageException) GoString() string { return s.String() }

func (s *InvalidKeyUsageException) Message() string

Message returns the exception's message.



13932
13933
13934
13935
13936
13937
// File 'service/kms/api.go', line 13932

func (s *InvalidKeyUsageException) Message() string { if s.Message_ != nil { return *s.Message_ } return "" }

func (s *InvalidKeyUsageException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.



13940
13941
13942
// File 'service/kms/api.go', line 13940

func (s *InvalidKeyUsageException) OrigErr() error { return nil }

func (s *InvalidKeyUsageException) RequestID() string

RequestID returns the service's response RequestID for request.



13954
13955
13956
// File 'service/kms/api.go', line 13954

func (s *InvalidKeyUsageException) RequestID() string { return s.RespMetadata.RequestID }

func (s *InvalidKeyUsageException) StatusCode() int

Status code returns the HTTP status code for the request's response error.



13949
13950
13951
// File 'service/kms/api.go', line 13949

func (s *InvalidKeyUsageException) StatusCode() int { return s.RespMetadata.StatusCode }

func (s InvalidKeyUsageException) String() string

String returns the string representation.

API parameter values that are decorated as “sensitive” in the API will not be included in the string output. The member name will be present, but the value will be replaced with “sensitive”.



13907
13908
13909
// File 'service/kms/api.go', line 13907

func (s InvalidKeyUsageException) String() string { return awsutil.Prettify(s) }