Interface CloudPlatform
-
- All Known Implementing Classes:
AwsCloudPlatform
,AzureCloudPlatform
,GoogleCloudPlatform
public interface CloudPlatform
Provides cloud platform-specific information like type and metadata urls- Since:
- 6.12.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getInstanceTypeMetadataEndpoint()
default Map<String,String>
getMetadataHeaders()
CloudPlatformType
getPlatformType()
default String
parseInstanceType(String responseBody)
By default, assumes that the response body contains just the instance type and returns it unparsed.
-
-
-
Method Detail
-
getInstanceTypeMetadataEndpoint
String getInstanceTypeMetadataEndpoint()
- Returns:
- url string for fetching the platform instance type via the platform metadata service
-
getPlatformType
CloudPlatformType getPlatformType()
- Returns:
- the type of cloud platform, i.e. AWS or Azure
-
getMetadataHeaders
default Map<String,String> getMetadataHeaders()
- Returns:
- any specific request headers required to reach the platform metadata service as a map of header-value entries
-
parseInstanceType
default String parseInstanceType(String responseBody)
By default, assumes that the response body contains just the instance type and returns it unparsed. Implementing classes for which this is not the case should override this metho as needed.- Parameters:
responseBody
- the response body returned by the instance type metadata endpoint- Returns:
- the cloud platform-specific instance type parsed from the response body
-
-