[ 
https://issues.apache.org/jira/browse/BEAM-3986?focusedWorklogId=96794&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-96794
 ]

ASF GitHub Bot logged work on BEAM-3986:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Apr/18 17:59
            Start Date: 30/Apr/18 17:59
    Worklog Time Spent: 10m 
      Work Description: lukecwik closed pull request #5248: [BEAM-3986] Enhance 
awsCredentialsProvider option description
URL: https://github.com/apache/beam/pull/5248
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
 
b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
index ce55792f61e..2c3ce07d8a8 100644
--- 
a/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
+++ 
b/sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsOptions.java
@@ -47,14 +47,28 @@
   void setAwsServiceEndpoint(String value);
 
   /**
-   * The credential instance that should be used to authenticate against AWS 
services. Refer to
-   * {@link DefaultAWSCredentialsProviderChain} Javadoc for usage help.
+   * The credential instance that should be used to authenticate against AWS 
services.
+   * The option value must contain a "@type" field and an AWS Credentials 
Provider class
+   * as the field value. Refer to {@link DefaultAWSCredentialsProviderChain} 
Javadoc for
+   * usage help.
+   * <p>
+   * For example, to specify the AWS key ID and secret, specify the following:
+   * <code>
+   * {"@type" : "AWSStaticCredentialsProvider", "awsAccessKeyId" : 
"key_id_value",
+   * "awsSecretKey" : "secret_value"}
+   * </code>
+   * </p>
    */
-  @Description("The credential instance that should be used to authenticate 
against AWS services. "
-      + "Refer to DefaultAWSCredentialsProviderChain Javadoc for usage help.")
-  @Default.InstanceFactory(AwsUserCredentialsFactory.class)
-  AWSCredentialsProvider getAwsCredentialsProvider();
-  void setAwsCredentialsProvider(AWSCredentialsProvider value);
+   @Description("The credential instance that should be used to authenticate "
+           + "against AWS services. The option value must contain \"@type\" 
field "
+           + "and an AWS Credentials Provider class name as the field value. "
+           + "Refer to DefaultAWSCredentialsProviderChain Javadoc for usage 
help. "
+           + "For example, to specify the AWS key ID and secret, specify the 
following: "
+           + "{\"@type\": \"AWSStaticCredentialsProvider\", "
+           + "\"awsAccessKeyId\":\"<key_id>\", 
\"awsSecretKey\":\"<secret_key>\"}")
+   @Default.InstanceFactory(AwsUserCredentialsFactory.class)
+   AWSCredentialsProvider getAwsCredentialsProvider();
+   void setAwsCredentialsProvider(AWSCredentialsProvider value);
 
   /**
    * Attempts to load AWS credentials.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 96794)
    Time Spent: 20m  (was: 10m)

> Improve setAwsCredentialsProvider documentation
> -----------------------------------------------
>
>                 Key: BEAM-3986
>                 URL: https://issues.apache.org/jira/browse/BEAM-3986
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws
>    Affects Versions: 2.4.0
>            Reporter: Paul Gerver
>            Assignee: Paul Gerver
>            Priority: Trivial
>             Fix For: 2.5.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> I tried using --awsCredentialsProvider with a JSON string (i.e., 
> --awsCredentialsProvider='\{"awsAccessKeyId" : "<keyid>", "awsSecretKey" : 
> "<secret>"}') and it was not clear from documentation that "@type" and an AWS 
> credentials class was required.
> We should improve the javadoc and PipelineOptions to include the following 
> description/example:
> @Description("The credential instance that should be used to authenticate 
> against AWS services. " + "The option value must contain \"@type\" field and 
> an AWS Credentials Provider class name as a value. " + "Refer to 
> DefaultAWSCredentialsProviderChain Javadoc for usage help. " + "For example, 
> to specify the AWS key ID and secret on the command line, specify the 
> following: \{\"@type\": \"AWSStaticCredentialsProvider\", 
> \"awsAccessKeyId\":\"<key_id>\", \"awsSecretKey\":\"<secret_key>\"}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to