Tabnine Logo
Image.getImageOwnerId
Code IndexAdd Tabnine to your IDE (free)

How to use
getImageOwnerId
method
in
org.jclouds.ec2.domain.Image

Best Java code snippets using org.jclouds.ec2.domain.Image.getImageOwnerId (Showing top 10 results out of 315)

origin: jclouds/legacy-jclouds

  @Override
  public LoginCredentials apply(Object resourceToAuthenticate) {
   if (creds != null)
     return creds;
   Builder credentials = LoginCredentials.builder().user("root");
   if (resourceToAuthenticate != null) {
     String owner = null;
     if (resourceToAuthenticate instanceof Image) {
      owner = Image.class.cast(resourceToAuthenticate).getImageOwnerId();
     } else if (resourceToAuthenticate instanceof org.jclouds.compute.domain.Image) {
      owner = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("owner");
     }
     checkArgument(owner != null, "Resource must be an image (for EC2)");
     // canonical/alestic images use the ubuntu user to login
     if (owner.matches("063491364108|099720109477")) {
      credentials.user("ubuntu");
      // http://typepad.com/2010/09/introducing-amazon-linux-ami.html
     } else if (owner.equals("137112412989")) {
      credentials.user("ec2-user");
     }
   }
   return credentials.build();
  }
}
origin: com.amysta.jclouds.api/ec2

  @Override
  public LoginCredentials apply(Object resourceToAuthenticate) {
   if (creds != null)
     return creds;
   Builder credentials = LoginCredentials.builder().user("root");
   if (resourceToAuthenticate != null) {
     String owner = null;
     if (resourceToAuthenticate instanceof Image) {
      owner = Image.class.cast(resourceToAuthenticate).getImageOwnerId();
     } else if (resourceToAuthenticate instanceof org.jclouds.compute.domain.Image) {
      owner = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("owner");
     }
     checkArgument(owner != null, "Resource must be an image (for EC2)");
     // canonical/alestic images use the ubuntu user to login
     if (owner.matches("063491364108|099720109477")) {
      credentials.user("ubuntu");
      // http://typepad.com/2010/09/introducing-amazon-linux-ami.html
     } else if (owner.equals("137112412989")) {
      credentials.user("ec2-user");
     }
   }
   return credentials.build();
  }
}
origin: org.jclouds.api/ec2

  @Override
  public LoginCredentials apply(Object resourceToAuthenticate) {
   if (creds != null)
     return creds;
   Builder credentials = LoginCredentials.builder().user("root");
   if (resourceToAuthenticate != null) {
     String owner = null;
     if (resourceToAuthenticate instanceof Image) {
      owner = Image.class.cast(resourceToAuthenticate).getImageOwnerId();
     } else if (resourceToAuthenticate instanceof org.jclouds.compute.domain.Image) {
      owner = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("owner");
     }
     checkArgument(owner != null, "Resource must be an image (for EC2)");
     // canonical/alestic images use the ubuntu user to login
     if (owner.matches("063491364108|099720109477")) {
      credentials.user("ubuntu");
      // http://typepad.com/2010/09/introducing-amazon-linux-ami.html
     } else if (owner.equals("137112412989")) {
      credentials.user("ec2-user");
     }
   }
   return credentials.build();
  }
}
origin: apache/jclouds

  @Override
  public LoginCredentials apply(Object resourceToAuthenticate) {
   if (creds != null)
     return creds;
   Builder credentials = LoginCredentials.builder().user("root");
   if (resourceToAuthenticate != null) {
     String owner = null;
     String name = null;
     if (resourceToAuthenticate instanceof Image) {
      owner = Image.class.cast(resourceToAuthenticate).getImageOwnerId();
      name = Image.class.cast(resourceToAuthenticate).getName();
     } else if (resourceToAuthenticate instanceof org.jclouds.compute.domain.Image) {
      owner = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("owner");
      name = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("name");
     }
     checkArgument(owner != null, "Resource must be an image (for EC2)");
     // canonical/alestic images use the ubuntu user to login
     if (owner.matches("063491364108|099720109477")) {
      credentials.user("ubuntu");
      // http://typepad.com/2010/09/introducing-amazon-linux-ami.html
     } else if (owner.equals("137112412989")) {
      credentials.user("ec2-user");
     } else if (owner.equals("679593333241") && name != null && name.startsWith("CentOS")) {
      credentials.user("centos");
     }
   }
   return credentials.build();
  }
}
origin: org.apache.jclouds.api/ec2

  @Override
  public LoginCredentials apply(Object resourceToAuthenticate) {
   if (creds != null)
     return creds;
   Builder credentials = LoginCredentials.builder().user("root");
   if (resourceToAuthenticate != null) {
     String owner = null;
     String name = null;
     if (resourceToAuthenticate instanceof Image) {
      owner = Image.class.cast(resourceToAuthenticate).getImageOwnerId();
      name = Image.class.cast(resourceToAuthenticate).getName();
     } else if (resourceToAuthenticate instanceof org.jclouds.compute.domain.Image) {
      owner = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("owner");
      name = org.jclouds.compute.domain.Image.class.cast(resourceToAuthenticate).getUserMetadata().get("name");
     }
     checkArgument(owner != null, "Resource must be an image (for EC2)");
     // canonical/alestic images use the ubuntu user to login
     if (owner.matches("063491364108|099720109477")) {
      credentials.user("ubuntu");
      // http://typepad.com/2010/09/introducing-amazon-linux-ami.html
     } else if (owner.equals("137112412989")) {
      credentials.user("ec2-user");
     } else if (owner.equals("679593333241") && name != null && name.startsWith("CentOS")) {
      credentials.user("centos");
     }
   }
   return credentials.build();
  }
}
origin: jclouds/legacy-jclouds

builder.name(from.getName());
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
     "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
     from.getVirtualizationType().value()).put("hypervisor", from.getHypervisor().value()).build());
origin: com.amysta.jclouds.api/ec2

builder.name(from.getName());
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
     "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
     from.getVirtualizationType().value()).put("hypervisor", from.getHypervisor().value()).build());
origin: org.jclouds.api/ec2

builder.name(from.getName());
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
     "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
     from.getVirtualizationType().value()).put("hypervisor", from.getHypervisor().value()).build());
origin: org.apache.jclouds.api/ec2

builder.name(from.getName());
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
     "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
     from.getVirtualizationType().value()).put("hypervisor", from.getHypervisor().value()).build());
origin: apache/jclouds

builder.name(from.getName());
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
     "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
     from.getVirtualizationType().value()).put("hypervisor", from.getHypervisor().value()).build());
org.jclouds.ec2.domainImagegetImageOwnerId

Javadoc

AWS Access Key ID of the image owner.

Popular methods of Image

  • getId
    The ID of the AMI.
  • getImageType
    The type of image (machine, kernel, or ramdisk).
  • getName
  • <init>
  • getImageLocation
    The location of the AMI.
  • getDescription
  • getImageState
    Current state of the AMI. If the operation returns available, the image is successfully registered a
  • getRawState
    raw form of #getImageState() as taken directly from the api response xml document/
  • getRegion
    To be removed in jclouds 1.6 WARNING Especially on EC2 clones that may not support regions, this val
  • getRootDeviceType
  • getArchitecture
    The architecture of the image (i386 or x86_64).
  • getHypervisor
  • getArchitecture,
  • getHypervisor,
  • getPlatform,
  • getVirtualizationType,
  • getEbsBlockDevices,
  • getKernelId,
  • getRamdiskId,
  • getRootDeviceName,
  • getTags

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JCheckBox (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now