java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.internal.security.EcsSecurityUtils

public class EcsSecurityUtils extends Object
  • 字段详细资料

    • OPENSTACK_METADATA_ROOT

      private static final String OPENSTACK_METADATA_ROOT
      Default root url for the openstack metadata apis.
      另请参阅:
    • ECS_METADATA_SERVICE_URL

      private static final String ECS_METADATA_SERVICE_URL
      Default endpoint for the ECS Instance Metadata Service.
    • EC2_METADATA_SERVICE_OVERRIDE_URL

      private static final String EC2_METADATA_SERVICE_OVERRIDE_URL
      另请参阅:
    • HTTP_CONNECT_TIMEOUT_VALUE

      private static final long HTTP_CONNECT_TIMEOUT_VALUE
      另请参阅:
    • httpClient

      private static okhttp3.OkHttpClient httpClient
  • 构造器详细资料

    • EcsSecurityUtils

      public EcsSecurityUtils()
  • 方法详细资料

    • getSecurityKeyInfoWithDetail

      public static String getSecurityKeyInfoWithDetail() throws IOException
      Returns the temporary security credentials (access, secret, securitytoken, and expires_at) associated with the IAM roles on the instance.
      抛出:
      IOException
    • getEndpointForECSMetadataService

      public static String getEndpointForECSMetadataService()
      Returns the host address of the ECS Instance Metadata Service.
    • getResourceWithDetail

      private static String getResourceWithDetail(String endpoint) throws IOException
      Get resource and return contents from metadata service with the specify path.
      抛出:
      IOException