Cloud¶
This documentation provides details about the data that can be faked for Cloud infrastructure.
To retrieve data about Cloud infrastructure you can do the following:
from socfaker import SocFaker
sc = SocFaker()
print(sc.cloud.id)
print(sc.cloud.zone)
print(sc.cloud.instance_id)
print(sc.cloud.name)
print(sc.cloud.size)
print(sc.cloud.provider)
print(sc.cloud.region)
Cloud Class¶
-
class
socfaker.cloud.
Cloud
¶ The Cloud class contains properties related to cloud resources. The initial properties of this object are based on Elastics ECS properties.
- Returns:
- Cloud: Returns a Cloud object containing common cloud properties
-
id
¶ A cloud instance ID
- Returns:
- str: A random GUID for a cloud instance ID
-
instance_id
¶ A random hex instance ID
- Returns:
- str: A random HEX character instance ID
-
name
¶ The name of a cloud VM/container instance
- Returns:
- str: A random generated name of a cloud VM or container instance
-
provider
¶ The cloud provider
- Returns:
- str: A random cloud provider of either aws, azure, gcp, or digitalocean
-
region
¶ The region of a cloud instance
- Returns:
- str: The region of a cloud instance
-
size
¶ The size of a instance (based on AWS naming convention)
- Returns:
- str: A random size of an instance based on AWS naming convention
-
zone
¶ A random generated availability zone in common cloud platforms like AWS & Azure
- Returns:
- str: A string representing a cloud availability zone