Amazon AWS SDK Guia do Utilizador Página 42

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 73
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 41
// Get IP Address
ipAddr = addr.getHostAddress()+"/10";
} catch (UnknownHostException e) {
35 }
// Create a range that you would like to populate.
ArrayList<String> ipRanges = new ArrayList<String>();
ipRanges.add(ipAddr);
40
// Open up port 22 for TCP traffic to the associated IP
// from above (e.g. ssh traffic).
ArrayList<IpPermission> ipPermissions = new ArrayList<IpPermission> ();
IpPermission ipPermission = new IpPermission();
45 ipPermission.setIpProtocol("tcp");
ipPermission.setFromPort(new Integer(22));
ipPermission.setToPort(new Integer(22));
ipPermission.setIpRanges(ipRanges);
ipPermissions.add(ipPermission);
50
try {
// Authorize the ports to the used.
AuthorizeSecurityGroupIngressRequest ingressRequest =
new AuthorizeSecurityGroupIngressRequest("GettingStartedGroup",ip
Permissions);
55 ec2.authorizeSecurityGroupIngress(ingressRequest);
} catch (AmazonServiceException ase) {
// Ignore because this likely means the zone has
// already been authorized.
System.out.println(ase.getMessage());
60 }
You can view this entire code sample in the CreateSecurityGroupApp.java code sample. Note you
only need to run this application once to create a new security group.
You can also create the security group using the AWS Toolkit for Eclipse. Go to the toolkit documentation
for more information.
Step 3: Submitting Your Spot Request
To submit a Spot request, you first need to determine the instance type, Amazon Machine Image (AMI),
and maximum bid price you want to use.You must also include the security group we configured previously,
so that you can log into the instance if desired.
There are several instance types to choose from; go to Amazon EC2 Instance Types for a complete list.
For this tutorial, we will use t1.micro, the cheapest instance type available. Next, we will determine the
type of AMI we would like to use.We'll use ami-8c1fece5, the most up-to-date Amazon Linux AMI available
when we wrote this tutorial. The latest AMI may change over time, but you can always determine the
latest version AMI by following these steps:
1. Log into the AWS Management Console, click the EC2 tab, and, from the EC2 Console Dashboard,
attempt to launch an instance.
Version v1.0.0
39
AWS SDK for Java Developer Guide
Tutorial: Amazon EC2 Spot Instances
Vista de página 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 72 73

Comentários a estes Manuais

Sem comentários

LG LW2412HR manuales

Manuales del propietario y guías del usuario para Accesorios de refrigeración de hardware LG LW2412HR.
Ofrecemos 1 manuales en pdf LG LW2412HR para descargar gratis por tipos de documentos: Hoja de especificaciones


Tabla de contenidos





Más productos y manuales para Accesorios de refrigeración de hardware LG

Modelos Tipo de documento
LW2511ER Hoja de especificaciones   LG LW2511ER Specification Sheet, 2 paginas
LW1814ER Hoja de especificaciones   LG LW1814ER Specification Sheet, 2 paginas
LP1414SHR Manual   LG LP1414SHR Product manual, 2 paginas
LW1013ER Hoja de especificaciones   LG LW1013ER Specification Sheet, 2 paginas
LW1812ER Hoja de especificaciones   LG LW1812ER Specification Sheet, 2 paginas
LW1210HR Hoja de especificaciones   LG LW1210HR Specification Sheet, 2 paginas
LW1213HR Hoja de especificaciones   LG LW1213HR Specification Sheet, 2 paginas
LW1011CR Hoja de especificaciones   LG LW1011CR Specification Sheet, 2 paginas
LT1034HNR Especificaciones   LG LT1034HNR Specifications, 2 paginas
LW2512ER Guia Energética   LG LW2512ER Energy Guide, 2 paginas
LW1512ER Hoja de especificaciones   LG LW1512ER Specification Sheet, 2 paginas
LT0814CNR Especificaciones   LG LT0814CNR Specifications, 2 paginas
LW1810HR Hoja de especificaciones   LG LW1810HR Specification Sheet, 2 paginas
LW1012CR Hoja de especificaciones   LG LW1012CR Specification Sheet, 2 paginas
LW2414HR Hoja de especificaciones   LG LW2414HR Specification Sheet, 2 paginas
LW1514ER Hoja de especificaciones   LG LW1514ER Specification Sheet, 2 paginas
LW1813ER Hoja de especificaciones   LG LW1813ER Specification Sheet, 2 paginas
LW2513ER Hoja de especificaciones   LG LW2513ER Specification Sheet, 2 paginas
LW5013 Hoja de especificaciones   LG LW5013 Specification Sheet, 2 paginas
ESA-PUAC10 Ficha de datos   LG ESA-FAN50 hardware cooling accessory, 2 paginas