Skip to content

Commit

Permalink
Merge pull request #1343 from aws/staging/ab818737-a9a2-4d6f-932e-5c7…
Browse files Browse the repository at this point in the history
…0362e09e0

Pull request: release <- staging/ab818737-a9a2-4d6f-932e-5c70362e09e0
  • Loading branch information
aws-sdk-java-automation authored Apr 28, 2021
2 parents 4a6a4d9 + cbcae41 commit 64a2536
Show file tree
Hide file tree
Showing 344 changed files with 7,845 additions and 330 deletions.
36 changes: 36 additions & 0 deletions .changes/2.16.50.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "2.16.50",
"date": "2021-04-28",
"entries": [
{
"type": "feature",
"category": "AWS IoT SiteWise",
"contributor": "",
"description": "AWS IoT SiteWise interpolation API will get interpolated values for an asset property per specified time interval during a period of time."
},
{
"type": "feature",
"category": "Amazon Connect Service",
"contributor": "",
"description": "Updated max number of tags that can be attached from 200 to 50. MaxContacts is now an optional parameter for the UpdateQueueMaxContact API."
},
{
"type": "feature",
"category": "AmazonNimbleStudio",
"contributor": "",
"description": "Amazon Nimble Studio is a virtual studio service that empowers visual effects, animation, and interactive content teams to create content securely within a scalable, private cloud service."
},
{
"type": "feature",
"category": "AWS Elemental MediaPackage VOD",
"contributor": "",
"description": "MediaPackage now offers the option to place your Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) encoder metadata in every video segment instead of in the init fragment for DASH and CMAF endpoints."
},
{
"type": "feature",
"category": "AWS CloudFormation",
"contributor": "",
"description": "Add CallAs parameter to GetTemplateSummary to enable use with StackSets delegated administrator integration"
}
]
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# __2.16.50__ __2021-04-28__
## __AWS CloudFormation__
- ### Features
- Add CallAs parameter to GetTemplateSummary to enable use with StackSets delegated administrator integration

## __AWS Elemental MediaPackage VOD__
- ### Features
- MediaPackage now offers the option to place your Sequence Parameter Set (SPS), Picture Parameter Set (PPS), and Video Parameter Set (VPS) encoder metadata in every video segment instead of in the init fragment for DASH and CMAF endpoints.

## __AWS IoT SiteWise__
- ### Features
- AWS IoT SiteWise interpolation API will get interpolated values for an asset property per specified time interval during a period of time.

## __Amazon Connect Service__
- ### Features
- Updated max number of tags that can be attached from 200 to 50. MaxContacts is now an optional parameter for the UpdateQueueMaxContact API.

## __AmazonNimbleStudio__
- ### Features
- Amazon Nimble Studio is a virtual studio service that empowers visual effects, animation, and interactive content teams to create content securely within a scalable, private cloud service.

# __2.16.49__ __2021-04-27__
## __AWS Audit Manager__
- ### Features
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To automatically manage module versions (currently all modules have the same ver
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -86,12 +86,12 @@ Alternatively you can add dependencies for the specific services you use only:
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>ec2</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</dependency>
```

Expand All @@ -103,7 +103,7 @@ You can import the whole SDK into your project (includes *ALL* services). Please
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-app-quickstart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-lambda/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetype-lambda</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/archetype-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>archetypes</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archetypes</artifactId>
Expand Down
7 changes: 6 additions & 1 deletion aws-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>aws-sdk-java</artifactId>
Expand Down Expand Up @@ -1323,6 +1323,11 @@ Amazon AutoScaling, etc).</description>
<artifactId>lookoutequipment</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>nimble</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
Expand Down
2 changes: 1 addition & 1 deletion bom-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>aws-sdk-java-pom</artifactId>
<groupId>software.amazon.awssdk</groupId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
7 changes: 6 additions & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>bom</artifactId>
Expand Down Expand Up @@ -1453,6 +1453,11 @@
<artifactId>lookoutequipment</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>nimble</artifactId>
<version>${awsjavasdk.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<artifactId>bundle</artifactId>
<packaging>jar</packaging>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-lite-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen-lite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<artifactId>codegen-lite</artifactId>
<name>AWS Java SDK :: Code Generator Lite</name>
Expand Down
2 changes: 1 addition & 1 deletion codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>codegen-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.16.49</version>
<version>2.16.50</version>
</parent>
<artifactId>codegen</artifactId>
<name>AWS Java SDK :: Code Generator</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ public class CustomizationConfig {
*/
private UnderscoresInNameBehavior underscoresInNameBehavior;

private String userAgent;

private CustomizationConfig() {
}

Expand Down Expand Up @@ -470,4 +472,17 @@ public CustomizationConfig withUnderscoresInShapeNameBehavior(UnderscoresInNameB
this.underscoresInNameBehavior = behavior;
return this;
}

public String getUserAgent() {
return userAgent;
}

public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}

public CustomizationConfig withUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ public TypeSpec poetSpec() {
builder.addMethod(serviceEndpointPrefixMethod());
builder.addMethod(serviceNameMethod());
builder.addMethod(mergeServiceDefaultsMethod());

if (model.getCustomizationConfig().getUserAgent() != null) {
builder.addMethod(mergeInternalDefaultsMethod());
}

builder.addMethod(finalizeServiceConfigurationMethod());
builder.addMethod(defaultSignerMethod());
builder.addMethod(signingNameMethod());
Expand Down Expand Up @@ -170,6 +175,21 @@ private MethodSpec mergeServiceDefaultsMethod() {
return builder.build();
}

private MethodSpec mergeInternalDefaultsMethod() {
String userAgent = model.getCustomizationConfig().getUserAgent();

MethodSpec.Builder builder = MethodSpec.methodBuilder("mergeInternalDefaults")
.addAnnotation(Override.class)
.addModifiers(PROTECTED, FINAL)
.returns(SdkClientConfiguration.class)
.addParameter(SdkClientConfiguration.class, "config")
.addCode("return config.merge(c -> c.option($T.INTERNAL_USER_AGENT, $S)\n",
SdkClientOption.class, userAgent);

builder.addCode(");");
return builder.build();
}

private MethodSpec finalizeServiceConfigurationMethod() {
String requestHandlerDirectory = Utils.packageToDirectory(model.getMetadata().getFullClientPackageName());
String requestHandlerPath = String.format("%s/execution.interceptors", requestHandlerDirectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import java.util.stream.Stream;
import javax.lang.model.element.Modifier;
import org.reactivestreams.Publisher;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.codegen.docs.ClientType;
import software.amazon.awssdk.codegen.docs.DocConfiguration;
Expand Down Expand Up @@ -76,6 +78,8 @@ public TypeSpec poetSpec() {
TypeSpec.Builder result = PoetUtils.createInterfaceBuilder(className);

result.addSuperinterface(SdkClient.class)
.addAnnotation(SdkPublicApi.class)
.addAnnotation(ThreadSafe.class)
.addField(FieldSpec.builder(String.class, "SERVICE_NAME")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$S", model.getMetadata().getSigningName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import java.util.List;
import java.util.function.Consumer;
import javax.lang.model.element.Modifier;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
import software.amazon.awssdk.codegen.docs.ClientType;
Expand Down Expand Up @@ -75,7 +77,10 @@ public SyncClientInterface(IntermediateModel model) {
public TypeSpec poetSpec() {
TypeSpec.Builder result = PoetUtils.createInterfaceBuilder(className);


result.addSuperinterface(SdkClient.class)
.addAnnotation(SdkPublicApi.class)
.addAnnotation(ThreadSafe.class)
.addField(FieldSpec.builder(String.class, "SERVICE_NAME")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC, Modifier.FINAL)
.initializer("$S", model.getMetadata().getSigningName())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class ClientTestModels {
private ClientTestModels() {}

public static IntermediateModel jsonServiceModels() {
File serviceModel = new File(ClientTestModels.class.getResource("client/c2j/json/service-2.json").getFile());
File customizationModel = new File(ClientTestModels.class.getResource("client/c2j/json/customization.config").getFile());
File paginatorsModel = new File(ClientTestModels.class.getResource("client/c2j/json/paginators.json").getFile());
File serviceModel = new File(ClientTestModels.class.getResource("client/c2j/rest-json/service-2.json").getFile());
File customizationModel = new File(ClientTestModels.class.getResource("client/c2j/rest-json/customization.config").getFile());
File paginatorsModel = new File(ClientTestModels.class.getResource("client/c2j/rest-json/paginators.json").getFile());
C2jModels models = C2jModels.builder()
.serviceModel(getServiceModel(serviceModel))
.customizationConfig(getCustomizationConfig(customizationModel))
Expand Down Expand Up @@ -85,6 +85,18 @@ public static IntermediateModel endpointDiscoveryModels() {
return new IntermediateModelBuilder(models).build();
}

public static IntermediateModel internalConfigModels() {
File serviceModel = new File(ClientTestModels.class.getResource("client/c2j/internalconfig/service-2.json").getFile());
File customizationModel = new File(ClientTestModels.class.getResource("client/c2j/internalconfig/customization.config").getFile());

C2jModels models = C2jModels.builder()
.serviceModel(getServiceModel(serviceModel))
.customizationConfig(getCustomizationConfig(customizationModel))
.build();

return new IntermediateModelBuilder(models).build();
}

private static ServiceModel getServiceModel(File file) {
return ModelLoaderUtils.loadModel(ServiceModel.class, file);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public void baseClientBuilderClass() throws Exception {
validateGeneration(BaseClientBuilderClass::new, "test-client-builder-class.java");
}

@Test
public void baseClientBuilderClassWithInternalUserAgent() throws Exception {
assertThat(new BaseClientBuilderClass(ClientTestModels.internalConfigModels()), generatesTo("test-client-builder-internal-user-agent-class.java"));
}

@Test
public void baseQueryClientBuilderClass() throws Exception {
validateQueryGeneration(BaseClientBuilderClass::new, "test-query-client-builder-class.java");
Expand Down
Loading

0 comments on commit 64a2536

Please sign in to comment.