func (ps *ParameterStore) PutSecureParameterWithCMK(name, value string, overwrite bool, kmsID string) error {
	return ps.putSecureParameterWrapper(name, value, kmsID, overwrite)
}
PutSecureParameterWithCMK is the same as PutSecureParameter but with a passed in CMK (Customer Master Key)
For example a request with name as '/my-service/dev/param-1' and a `kmsID` of 'foo':
Will set the parameter value if exists or ErrParameterInvalidName if parameter already exists or is empty
and `overwrite` is false. The `ssm:PutParameter` permission is required to the
`arn:aws:ssm:aws-region:aws-account-id:/my-service/dev/param-1` resource
The `kms:Encrypt` permission is required to the `arn:aws:kms:us-east-1:710015040892:key/foo`
package awsssm
import (
	"errors"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/awserr"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/ssm"
)
var (
	ErrParameterNotFound = errors.New("parameter not found")
	ErrParameterInvalidName = errors.New("invalid parameter name")
)
type ssmClient interface {
	GetParametersByPathPages(input *ssm.GetParametersByPathInput, fn func(*ssm.GetParametersByPathOutput, bool) bool) error
	GetParameter(input *ssm.GetParameterInput) (*ssm.GetParameterOutput, error)
	PutParameter(input *ssm.PutParameterInput) (*ssm.PutParameterOutput, error)
}
type ParameterStore struct {
	ssm ssmClient
}
func (ps *ParameterStore) GetAllParametersByPath(path string, decrypt bool) (*Parameters, error) {
	var input = &ssm.GetParametersByPathInput{}
	input.SetWithDecryption(decrypt)
	input.SetPath(path)
	input.SetMaxResults(10)
	return ps.getParameters(input)
}
func (ps *ParameterStore) getParameters(input *ssm.GetParametersByPathInput) (*Parameters, error) {
	parameters := NewParameters(*input.Path, make(map[string]*Parameter))
	if err := ps.ssm.GetParametersByPathPages(input, func(result *ssm.GetParametersByPathOutput, b bool) bool {
		for _, v := range result.Parameters {
			if v.Name == nil {
				continue
			}
			parameters.parameters[*v.Name] = &Parameter{Value: v.Value}
		}
		return !b
	}); err != nil {
		return nil, err
	}
	return parameters, nil
}
func (ps *ParameterStore) GetParameter(name string, decrypted bool) (*Parameter, error) {
	if name == "" {
		return nil, ErrParameterInvalidName
	}
	input := &ssm.GetParameterInput{}
	input.SetName(name)
	input.SetWithDecryption(decrypted)
	return ps.getParameter(input)
}
func (ps *ParameterStore) getParameter(input *ssm.GetParameterInput) (*Parameter, error) {
	result, err := ps.ssm.GetParameter(input)
	if err != nil {
		if awsError, ok := err.(awserr.Error); ok && awsError.Code() == ssm.ErrCodeParameterNotFound {
			return nil, ErrParameterNotFound
		}
		return nil, err
	}
	return &Parameter{
		Value: result.Parameter.Value,
	}, nil
}
func (ps *ParameterStore) PutSecureParameter(name, value string, overwrite bool) error {
	return ps.putSecureParameterWrapper(name, value, "", overwrite)
}