Skip to content

Commit

Permalink
Purged 'master' from Go code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug-AWS committed Apr 6, 2021
1 parent 1e58259 commit 6c32a40
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions go/example_code/kms/kms_create_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go/example_code/kms/kms_re_encrypt_data.go
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion go/kms/DecryptData/DecryptData.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go/kms/EncryptData/EncryptData.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions go/kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`

Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions go/kms/ReEncryptData/ReEncryptData.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go/kms/metadata.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/CreateKey/CreateKeyv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/CreateKey/README.md
Original file line number Diff line number Diff line change
@@ -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`
2 changes: 1 addition & 1 deletion gov2/kms/DecryptData/DecryptDatav2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/DecryptData/README.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/EncryptData/EncryptDatav2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/EncryptData/README.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
8 changes: 4 additions & 4 deletions gov2/kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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`

Expand All @@ -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`

Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/ReEncryptData/README.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
2 changes: 1 addition & 1 deletion gov2/kms/ReEncryptData/ReEncryptDatav2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 6c32a40

Please sign in to comment.