Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tuts/001-lightsail-gs/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>lightsail-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>lightsail</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.lightsail;

import software.amazon.awssdk.services.lightsail.LightsailClient;

public class GettingStartedScenario {
public static void main(String[] args) {
try (LightsailClient client = LightsailClient.builder().build()) {
LightsailWrapper wrapper = new LightsailWrapper(client);
System.out.println("Running Lightsail getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.lightsail;

import software.amazon.awssdk.services.lightsail.LightsailClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class LightsailWrapper {
private static final Logger logger = LoggerFactory.getLogger(LightsailWrapper.class);
private final LightsailClient client;

public LightsailWrapper(LightsailClient client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.lightsail;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import software.amazon.awssdk.services.lightsail.LightsailClient;
import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class LightsailWrapperTest {
@Mock private LightsailClient mockClient;

@Test
void wrapperCreates() {
LightsailWrapper wrapper = new LightsailWrapper(mockClient);
assertNotNull(wrapper);
}
}
7 changes: 7 additions & 0 deletions tuts/002-vpc-gs/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>ec2-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>ec2</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
19 changes: 19 additions & 0 deletions tuts/002-vpc-gs/java/src/main/java/com/example/ec2/Ec2Wrapper.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.ec2;

import software.amazon.awssdk.services.ec2.Ec2Client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Ec2Wrapper {
private static final Logger logger = LoggerFactory.getLogger(Ec2Wrapper.class);
private final Ec2Client client;

public Ec2Wrapper(Ec2Client client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.ec2;

import software.amazon.awssdk.services.ec2.Ec2Client;

public class GettingStartedScenario {
public static void main(String[] args) {
try (Ec2Client client = Ec2Client.builder().build()) {
Ec2Wrapper wrapper = new Ec2Wrapper(client);
System.out.println("Running Ec2 getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.ec2;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import software.amazon.awssdk.services.ec2.Ec2Client;
import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class Ec2WrapperTest {
@Mock private Ec2Client mockClient;

@Test
void wrapperCreates() {
Ec2Wrapper wrapper = new Ec2Wrapper(mockClient);
assertNotNull(wrapper);
}
}
7 changes: 7 additions & 0 deletions tuts/003-s3-gettingstarted/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>s3-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>s3</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.s3;

import software.amazon.awssdk.services.s3.S3Client;

public class GettingStartedScenario {
public static void main(String[] args) {
try (S3Client client = S3Client.builder().build()) {
S3Wrapper wrapper = new S3Wrapper(client);
System.out.println("Running S3 getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.s3;

import software.amazon.awssdk.services.s3.S3Client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class S3Wrapper {
private static final Logger logger = LoggerFactory.getLogger(S3Wrapper.class);
private final S3Client client;

public S3Wrapper(S3Client client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.s3;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import software.amazon.awssdk.services.s3.S3Client;
import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class S3WrapperTest {
@Mock private S3Client mockClient;

@Test
void wrapperCreates() {
S3Wrapper wrapper = new S3Wrapper(mockClient);
assertNotNull(wrapper);
}
}
7 changes: 7 additions & 0 deletions tuts/004-cloudmap-custom-attributes/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>servicediscovery-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>servicediscovery</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.servicediscovery;

import software.amazon.awssdk.services.servicediscovery.CloudMapClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CloudMapWrapper {
private static final Logger logger = LoggerFactory.getLogger(CloudMapWrapper.class);
private final CloudMapClient client;

public CloudMapWrapper(CloudMapClient client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.servicediscovery;

import software.amazon.awssdk.services.servicediscovery.CloudMapClient;

public class GettingStartedScenario {
public static void main(String[] args) {
try (CloudMapClient client = CloudMapClient.builder().build()) {
CloudMapWrapper wrapper = new CloudMapWrapper(client);
System.out.println("Running CloudMap getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.servicediscovery;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import software.amazon.awssdk.services.servicediscovery.CloudMapClient;
import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class CloudMapWrapperTest {
@Mock private CloudMapClient mockClient;

@Test
void wrapperCreates() {
CloudMapWrapper wrapper = new CloudMapWrapper(mockClient);
assertNotNull(wrapper);
}
}
7 changes: 7 additions & 0 deletions tuts/005-cloudfront-gettingstarted/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>cloudfront-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>cloudfront</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.cloudfront;

import software.amazon.awssdk.services.cloudfront.CloudFrontClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CloudFrontWrapper {
private static final Logger logger = LoggerFactory.getLogger(CloudFrontWrapper.class);
private final CloudFrontClient client;

public CloudFrontWrapper(CloudFrontClient client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.cloudfront;

import software.amazon.awssdk.services.cloudfront.CloudFrontClient;

public class GettingStartedScenario {
public static void main(String[] args) {
try (CloudFrontClient client = CloudFrontClient.builder().build()) {
CloudFrontWrapper wrapper = new CloudFrontWrapper(client);
System.out.println("Running CloudFront getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.cloudfront;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import software.amazon.awssdk.services.cloudfront.CloudFrontClient;
import static org.junit.jupiter.api.Assertions.*;

@ExtendWith(MockitoExtension.class)
class CloudFrontWrapperTest {
@Mock private CloudFrontClient mockClient;

@Test
void wrapperCreates() {
CloudFrontWrapper wrapper = new CloudFrontWrapper(mockClient);
assertNotNull(wrapper);
}
}
7 changes: 7 additions & 0 deletions tuts/008-vpc-private-servers-gs/java/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<project><modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId><artifactId>ec2-tutorial</artifactId><version>1.0</version>
<properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target></properties>
<dependencyManagement><dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>bom</artifactId><version>2.25.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement>
<dependencies><dependency><groupId>software.amazon.awssdk</groupId><artifactId>ec2</artifactId></dependency>
<dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter</artifactId><version>5.10.0</version><scope>test</scope></dependency>
<dependency><groupId>org.mockito</groupId><artifactId>mockito-junit-jupiter</artifactId><version>5.8.0</version><scope>test</scope></dependency></dependencies></project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.ec2;

import software.amazon.awssdk.services.ec2.Ec2Client;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Ec2Wrapper {
private static final Logger logger = LoggerFactory.getLogger(Ec2Wrapper.class);
private final Ec2Client client;

public Ec2Wrapper(Ec2Client client) {
this.client = client;
}

// TODO: Add wrapper methods matching CLI tutorial actions
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

package com.example.ec2;

import software.amazon.awssdk.services.ec2.Ec2Client;

public class GettingStartedScenario {
public static void main(String[] args) {
try (Ec2Client client = Ec2Client.builder().build()) {
Ec2Wrapper wrapper = new Ec2Wrapper(client);
System.out.println("Running Ec2 getting started scenario...");
// TODO: setup, interact, teardown
System.out.println("Scenario complete.");
}
}
}
Loading
Loading