diff --git a/storage/storage_transfer/README.md b/storage/storage_transfer/README.md index 2c3f7762ff3..0dab787d303 100644 --- a/storage/storage_transfer/README.md +++ b/storage/storage_transfer/README.md @@ -8,7 +8,7 @@ This app creates two types of transfers using the Transfer Service tool. 1. Go to the [Developers Console](https://cloud.google.com/console) and create or select your project. You will need the project ID later. 1. Within Developers Console, select APIs & auth > Credentials. - 1. Add a new JSON key credential for a service account. + 1. Select Add credentials > Service account > JSON key. 1. Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to your JSON key. 1. Add the Storage Transfer service account, cloud-mobility@system.gserviceaccount.com as an editor of your project. diff --git a/storage/storage_transfer/aws_request.py b/storage/storage_transfer/aws_request.py index 84714de4793..40274175335 100644 --- a/storage/storage_transfer/aws_request.py +++ b/storage/storage_transfer/aws_request.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -66,3 +67,4 @@ def main(): if __name__ == '__main__': main() +# [END all] diff --git a/storage/storage_transfer/create_client.py b/storage/storage_transfer/create_client.py index c5708950918..c5e0a16434d 100644 --- a/storage/storage_transfer/create_client.py +++ b/storage/storage_transfer/create_client.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import logging from apiclient import discovery @@ -25,3 +26,4 @@ def create_transfer_client(): logging.getLogger().setLevel(logging.DEBUG) credentials = GoogleCredentials.get_application_default() return discovery.build('storagetransfer', 'v1', credentials=credentials) +# [END all] diff --git a/storage/storage_transfer/nearline_request.py b/storage/storage_transfer/nearline_request.py index 2e16b52252e..d31bc190720 100644 --- a/storage/storage_transfer/nearline_request.py +++ b/storage/storage_transfer/nearline_request.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -62,3 +63,4 @@ def main(): if __name__ == '__main__': main() +# [END all] diff --git a/storage/storage_transfer/transfer_check.py b/storage/storage_transfer/transfer_check.py index 5b1029819bb..7e9055fe49b 100644 --- a/storage/storage_transfer/transfer_check.py +++ b/storage/storage_transfer/transfer_check.py @@ -11,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# [START all] import json import logging @@ -42,3 +43,4 @@ def main(): if __name__ == '__main__': main() +# [END all]