JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.internal

Class EC2MetadataClient

    • Field Detail

      • SECURITY_CREDENTIALS_RESOURCE

        public static final String SECURITY_CREDENTIALS_RESOURCE
        Deprecated.
        Default resource path for credentials in the Amazon EC2 Instance Metadata Service.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EC2MetadataClient

        public EC2MetadataClient()
        Deprecated.
    • Method Detail

      • getDefaultCredentials

        public String getDefaultCredentials()
         throws IOException 
        Deprecated.
        Connects to the Amazon EC2 Instance Metadata Service to retrieve the default credential information (if any).
        Returns:
        The response from the Amazon EC2 Instance Metadata Service, or null if no credential information was available.
        Throws:
        IOException - If any problems are encountered while connecting to the Amazon EC2 Instance Metadata Service.
      • readResource

        public String readResource(String resourcePath)
         throws IOException,
         SdkClientException 
        Deprecated.
        Connects to the metadata service to read the specified resource and returns the text contents.
        Parameters:
        resourcePath - The resource
        Returns:
        The text payload returned from the Amazon EC2 Instance Metadata service for the specified resource path.
        Throws:
        IOException - If any problems were encountered while connecting to metadata service for the requested resource path.
        SdkClientException - If the requested metadata service is not found.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /