public CreateCanaryRequest withExecutionRoleArn(String executionRoleArn) {
        setExecutionRoleArn(executionRoleArn);
        return this;
    }
<p>
The ARN of the IAM role to be used to run the canary. This role must already exist, and must include
<code>lambda.amazonaws.com</code> as a principal in the trust policy. The role must also have the following
permissions:
</p>
<ul>
<li>
<p>
<code>s3:PutObject</code>
</p>
</li>
<li>
<p>
<code>s3:GetBucketLocation</code>
</p>
</li>
<li>
<p>
<code>s3:ListAllMyBuckets</code>
</p>
</li>
<li>
<p>
<code>cloudwatch:PutMetricData</code>
</p>
</li>
<li>
<p>
<code>logs:CreateLogGroup</code>
</p>
</li>
<li>
<p>
<code>logs:CreateLogStream</code>
</p>
</li>
<li>
<p>
<code>logs:PutLogEvents</code>
</p>
</li>
</ul>

@param executionRoleArn
       The ARN of the IAM role to be used to run the canary. This role must already exist, and must include
       <code>lambda.amazonaws.com</code> as a principal in the trust policy. The role must also have the
       following permissions:</p>
       <ul>
       <li>
       <p>
       <code>s3:PutObject</code>
       </p>
       </li>
       <li>
       <p>
       <code>s3:GetBucketLocation</code>
       </p>
       </li>
       <li>
       <p>
       <code>s3:ListAllMyBuckets</code>
       </p>
       </li>
       <li>
       <p>
       <code>cloudwatch:PutMetricData</code>
       </p>
       </li>
       <li>
       <p>
       <code>logs:CreateLogGroup</code>
       </p>
       </li>
       <li>
       <p>
       <code>logs:CreateLogStream</code>
       </p>
       </li>
       <li>
       <p>
       <code>logs:PutLogEvents</code>
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-synthetics/src/main/java/com/amazonaws/services/synthetics/model/CreateCanaryRequest.java