From 6c32a40ea1296532332522c14686b5290e2b9a14 Mon Sep 17 00:00:00 2001 From: Doug Schwartz Date: Tue, 6 Apr 2021 06:43:38 -0700 Subject: [PATCH] Purged 'master' from Go code examples --- go/example_code/kms/kms_create_key.go | 6 +++--- go/example_code/kms/kms_re_encrypt_data.go | 2 +- .../CreateCMK.go => CreateKey/CreateKey.go} | 2 +- .../CreateKey_test.go} | 0 go/kms/DecryptData/DecryptData.go | 2 +- go/kms/EncryptData/EncryptData.go | 4 ++-- go/kms/README.md | 16 ++++++++-------- go/kms/ReEncryptData/ReEncryptData.go | 4 ++-- go/kms/metadata.yaml | 4 ++-- gov2/kms/CreateKey/CreateKeyv2.go | 2 +- gov2/kms/CreateKey/README.md | 2 +- gov2/kms/DecryptData/DecryptDatav2.go | 2 +- gov2/kms/DecryptData/README.md | 2 +- gov2/kms/EncryptData/EncryptDatav2.go | 2 +- gov2/kms/EncryptData/README.md | 2 +- gov2/kms/README.md | 8 ++++---- gov2/kms/ReEncryptData/README.md | 2 +- gov2/kms/ReEncryptData/ReEncryptDatav2.go | 2 +- 18 files changed, 32 insertions(+), 32 deletions(-) rename go/kms/{CreateCMK/CreateCMK.go => CreateKey/CreateKey.go} (96%) rename go/kms/{CreateCMK/CreateCMK_test.go => CreateKey/CreateKey_test.go} (100%) diff --git a/go/example_code/kms/kms_create_key.go b/go/example_code/kms/kms_create_key.go index 41c0ba375cf..18e9fb47921 100644 --- a/go/example_code/kms/kms_create_key.go +++ b/go/example_code/kms/kms_create_key.go @@ -34,11 +34,11 @@ import ( "os" ) -// Create a customer master key (CMK) +// Create an AWS KMS key (KMS key) // Since we are only encrypting small amounts of data (4 KiB or less) directly, -// a CMK is fine for our purposes. +// a KMS key is fine for our purposes. // For larger amounts of data, -// use the CMK to encrypt a data encryption key (DEK). +// use the KMS key to encrypt a data encryption key (DEK). func main() { // Initialize a session in us-west-2 that the SDK will use to load diff --git a/go/example_code/kms/kms_re_encrypt_data.go b/go/example_code/kms/kms_re_encrypt_data.go index da54fe119cb..73b44f52bce 100644 --- a/go/example_code/kms/kms_re_encrypt_data.go +++ b/go/example_code/kms/kms_re_encrypt_data.go @@ -1,6 +1,6 @@ // snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] // snippet-sourceauthor:[Doug-AWS] -// snippet-sourcedescription:[Decrypts encrypted data and then immediately re-encrypts data under a new customer master key (CMK).] +// snippet-sourcedescription:[Decrypts encrypted data and then immediately re-encrypts data under a new AWS KSM key (KMS key).] // snippet-keyword:[AWS Key Management Service] // snippet-keyword:[ReEncrypt function] // snippet-keyword:[Go] diff --git a/go/kms/CreateCMK/CreateCMK.go b/go/kms/CreateKey/CreateKey.go similarity index 96% rename from go/kms/CreateCMK/CreateCMK.go rename to go/kms/CreateKey/CreateKey.go index 8209fb899d9..d575757af30 100644 --- a/go/kms/CreateCMK/CreateCMK.go +++ b/go/kms/CreateKey/CreateKey.go @@ -14,7 +14,7 @@ import ( ) // snippet-end:[kms.go.create_key.imports] -// MakeKey creates an AWS Key Management Service (AWS KMS) customer master key (CMK). +// MakeKey creates an AWS Key Management Service (AWS KMS) key. // Inputs: // svc is an AWS KMS service client // key is the name of the key diff --git a/go/kms/CreateCMK/CreateCMK_test.go b/go/kms/CreateKey/CreateKey_test.go similarity index 100% rename from go/kms/CreateCMK/CreateCMK_test.go rename to go/kms/CreateKey/CreateKey_test.go diff --git a/go/kms/DecryptData/DecryptData.go b/go/kms/DecryptData/DecryptData.go index b931c335f4f..95ffdc47ff7 100644 --- a/go/kms/DecryptData/DecryptData.go +++ b/go/kms/DecryptData/DecryptData.go @@ -14,7 +14,7 @@ import ( ) // snippet-end:[kms.go.decrypt_data.imports] -// DecodeData decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) customer master key (CMK). +// DecodeData decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // svc is an AWS KMS service client // blob is an array of bytes containing the text to decrypt diff --git a/go/kms/EncryptData/EncryptData.go b/go/kms/EncryptData/EncryptData.go index 934a1106779..30293069479 100644 --- a/go/kms/EncryptData/EncryptData.go +++ b/go/kms/EncryptData/EncryptData.go @@ -14,10 +14,10 @@ import ( ) // snippet-end:[kms.go.encrypt_data.imports] -// EncryptText encrypts some text using an AWS Key Management Service (AWS KMS) customer master key (CMK). +// EncryptText encrypts some text using an AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // svc is an AWS KMS service client -// keyID is the ID of a CMK +// keyID is the ID of a KMS key // Output: // If success, information about the encrypted text and nil // Otherwise, nil and an error from the call to Encrypt diff --git a/go/kms/README.md b/go/kms/README.md index 89562feccea..6539a7c3bfc 100644 --- a/go/kms/README.md +++ b/go/kms/README.md @@ -13,11 +13,11 @@ in the AWS SDK for Go Developer Guide. ## Running the code -### CreateCMK/CreateCMK.go +### CreateKey/CreateKey.go -This example creates an AWS KMS customer master key (CMK). +This example creates an AWS KMS key. -`go run CreateCMK.go -k KEY-NAME -v KEY-VALUE` +`go run CreateKey.go -k KEY-NAME -v KEY-VALUE` - _KEY-NAME_ is the name of the key. - _KEY-VALUE_ is the value of the key. @@ -26,7 +26,7 @@ The unit test mocks the service client and the `CreateKey` function. ### DecryptData/DecryptData.go -This example decrypts some text that was encrypted with an AWS KMS customer master key (CMK). +This example decrypts some text that was encrypted with an AWS KMS key. `go run DecryptData.go -d DATA` @@ -36,22 +36,22 @@ The unit test mocks the service client and the `Decrypt` function. ### EncryptData/EncryptData.go -This example encrypts some text using an AWS KMS customer master key (CMK). +This example encrypts some text using an AWS KMS key. `go run EncryptData.go -k KEY-ID -t "text"` -- _KEY-ID_ is the ID of a CMK. +- _KEY-ID_ is the ID of a KMS key. - _text_ is the text to encrypt. The unit test mocks the service client and the `Encrypt` function. ### ReEncryptData/ReEncryptData.go -This example reencrypts some text using a new AWS KMS customer master key (CMK). +This example reencrypts some text using a new AWS KMS key. `go run ReEncryptData.go -k KEY-ID -d DATA` -- _KEY-ID_ is the ID of a CMK. +- _KEY-ID_ is the ID of a KMS key. - _DATA_ is the data to reencrypt, as a string. The unit test mocks the service client and the `ReEncrypt` function. diff --git a/go/kms/ReEncryptData/ReEncryptData.go b/go/kms/ReEncryptData/ReEncryptData.go index 4e1b1a8ebd0..f0ea245d358 100644 --- a/go/kms/ReEncryptData/ReEncryptData.go +++ b/go/kms/ReEncryptData/ReEncryptData.go @@ -14,10 +14,10 @@ import ( ) // snippet-end:[kms.go.reencrypt_data.imports] -// ReEncryptText reencrypts some text using a new AWS Key Management Service (AWS KMS) customer master key (CMK). +// ReEncryptText reencrypts some text using a new AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // svc is an AWS KMS service client -// keyID is the ID of a different CMK +// keyID is the ID of a different KMS key // Output: // If success, information about the reencrypted text and nil // Otherwise, nil and an error from the call to ReEncrypt diff --git a/go/kms/metadata.yaml b/go/kms/metadata.yaml index 929b2e601a4..2b947914102 100644 --- a/go/kms/metadata.yaml +++ b/go/kms/metadata.yaml @@ -1,8 +1,8 @@ files: - - path: CreateCMK/CreateCMK.go + - path: CreateKey/CreateKey.go services: - kms - - path: CreateCMK/CreateCMK_test.go + - path: CreateKey/CreateKey_test.go services: - kms - path: DecryptData/DecryptData.go diff --git a/gov2/kms/CreateKey/CreateKeyv2.go b/gov2/kms/CreateKey/CreateKeyv2.go index d3d2238cdec..cc9332f65d3 100644 --- a/gov2/kms/CreateKey/CreateKeyv2.go +++ b/gov2/kms/CreateKey/CreateKeyv2.go @@ -19,7 +19,7 @@ type KMSCreateKeyAPI interface { optFns ...func(*kms.Options)) (*kms.CreateKeyOutput, error) } -// MakeKey creates an AWS Key Management Service (AWS KMS) customer master key (CMK). +// MakeKey creates an AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // c is the context of the method call, which includes the AWS Region. // api is the interface that defines the method call. diff --git a/gov2/kms/CreateKey/README.md b/gov2/kms/CreateKey/README.md index d681895477e..6cc227c03a8 100644 --- a/gov2/kms/CreateKey/README.md +++ b/gov2/kms/CreateKey/README.md @@ -1,5 +1,5 @@ ### CreateKeyv2.go -This example creates an AWS Key Management Service (AWS KMS) customer master key (CMK). +This example creates an AWS Key Management Service (AWS KMS) key (KMS key). `go run CreateKeyv2.go` diff --git a/gov2/kms/DecryptData/DecryptDatav2.go b/gov2/kms/DecryptData/DecryptDatav2.go index f3dbbf8adb5..c886a138b10 100644 --- a/gov2/kms/DecryptData/DecryptDatav2.go +++ b/gov2/kms/DecryptData/DecryptDatav2.go @@ -21,7 +21,7 @@ type KMSDecryptAPI interface { optFns ...func(*kms.Options)) (*kms.DecryptOutput, error) } -// DecodeData decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) customer master key (CMK). +// DecodeData decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // c is the context of the method call, which includes the AWS Region. // api is the interface that defines the method call. diff --git a/gov2/kms/DecryptData/README.md b/gov2/kms/DecryptData/README.md index 048d969316a..49e92b1ffb3 100644 --- a/gov2/kms/DecryptData/README.md +++ b/gov2/kms/DecryptData/README.md @@ -1,6 +1,6 @@ ### DecryptDatav2.go -This example decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) customer master key (CMK). +This example decrypts some text that was encrypted with an AWS Key Management Service (AWS KMS) key (KMS key). `go run DecryptDatav2.go -d DATA` diff --git a/gov2/kms/EncryptData/EncryptDatav2.go b/gov2/kms/EncryptData/EncryptDatav2.go index 8b1a98b6718..ecd522d673c 100644 --- a/gov2/kms/EncryptData/EncryptDatav2.go +++ b/gov2/kms/EncryptData/EncryptDatav2.go @@ -21,7 +21,7 @@ type KMSEncryptAPI interface { optFns ...func(*kms.Options)) (*kms.EncryptOutput, error) } -// EncryptText encrypts some text using an AWS Key Management Service (AWS KMS) customer master key (CMK). +// EncryptText encrypts some text using an AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // c is the context of the method call, which includes the AWS Region. // api is the interface that defines the method call. diff --git a/gov2/kms/EncryptData/README.md b/gov2/kms/EncryptData/README.md index d8ba7031cc3..fb8719e6797 100644 --- a/gov2/kms/EncryptData/README.md +++ b/gov2/kms/EncryptData/README.md @@ -1,6 +1,6 @@ ### EncryptDatav2.go -This example encrypts some text using an AWS Key Management Service (AWS KMS) customer master key (CMK). +This example encrypts some text using an AWS Key Management Service (AWS KMS) key (KMS key). `go run EncryptDatav2.go -k KEYID -t TEXT` diff --git a/gov2/kms/README.md b/gov2/kms/README.md index 4761c20cd7b..8a37a70bbb8 100644 --- a/gov2/kms/README.md +++ b/gov2/kms/README.md @@ -16,13 +16,13 @@ in the AWS SDK for Go Developer Guide. ### CreateKey/CreateKeyv2.go -This example creates an AWS KMS customer master key (CMK). +This example creates an AWS KMS key (KMS key). `go run CreateKeyv2.go` ### DecryptData/DecryptDatav2.go -This example decrypts some text that was encrypted with an AWS KMS customer master key (CMK). +This example decrypts some text that was encrypted with an AWS KMS key (KMS key). `go run DecryptDatav2.go -d DATA` @@ -32,7 +32,7 @@ The unit test accepts a similar value in _config.json_. ### EncryptData/EncryptDatav2.go -This example encrypts some text using an AWS KMS customer master key (CMK). +This example encrypts some text using an AWS KMS key (KMS key). `go run EncryptDatav2.go -k KEYID -t TEXT` @@ -43,7 +43,7 @@ The unit test accepts similar values in _config.json_. ### ReEncryptData/ReEncryptDatav2.go -This example reencrypts some text using an AWS KMS customer master key (CMK). +This example reencrypts some text using an AWS KMS key (KMS key). `go run ReEncryptDatav2.go -k KeyID -d DATA` diff --git a/gov2/kms/ReEncryptData/README.md b/gov2/kms/ReEncryptData/README.md index 263d6a10aaa..6161475bdeb 100644 --- a/gov2/kms/ReEncryptData/README.md +++ b/gov2/kms/ReEncryptData/README.md @@ -1,6 +1,6 @@ ### ReEncryptDatav2.go -This example reencrypts some text using an AWS Key Management Service (AWS KMS) customer master key (CMK). +This example reencrypts some text using an AWS Key Management Service (AWS KMS) key (KMS key). `go run ReEncryptDatav2.go -k KeyID -d DATA` diff --git a/gov2/kms/ReEncryptData/ReEncryptDatav2.go b/gov2/kms/ReEncryptData/ReEncryptDatav2.go index 1af94c7082a..fb5223edc1f 100644 --- a/gov2/kms/ReEncryptData/ReEncryptDatav2.go +++ b/gov2/kms/ReEncryptData/ReEncryptDatav2.go @@ -20,7 +20,7 @@ type KMSReEncryptAPI interface { optFns ...func(*kms.Options)) (*kms.ReEncryptOutput, error) } -// ReEncryptText reencrypts some text using a new AWS Key Management Service (AWS KMS) customer master key (CMK). +// ReEncryptText reencrypts some text using a new AWS Key Management Service (AWS KMS) key (KMS key). // Inputs: // c is the context of the method call, which includes the AWS Region. // api is the interface that defines the method call.