NAME

Webservice::OVH::Cloud::Project::Network::Private::Subnet

SYNOPSIS

    use Webservice::OVH;
    
    my $ovh = Webservice::OVH->new_from_json("credentials.json");
    
    my $projects = $ovh->cloud->projects;
    my $example_project = $projects->[0];
    
    my $networks = $example_project->network->privates;
    
    foreach my $network (@$networks) {
        
        my $subnets = $network->subnets;
        
        foreach my $subnet (@$subnets) {
            
            print $subnet->name;
        }
    }

DESCRIPTION

Gives access to subnet methods.

METHODS

_new_existing

Internal Method to create the Subnet object. This method is not ment to be called directly.

_new_existing

Internal Method to create the Subnet object. This method is not ment to be called directly.

project

Root Project.

project

Root Network.

is_valid

When this object is deleted on the api side, this method returns 0.

  • Return: VALUE

  • Synopsis: print "Valid" if $subnet->is_valid;

_is_valid

Intern method to check validity. Difference is that this method carps an error.

  • Return: VALUE

  • Synopsis: $subnet->_is_valid;

id

Returns the api id

  • Return: VALUE

  • Synopsis: my $id = $subnet->id;

gateway_ip

Exposed property value.

  • Return: VALUE

  • Synopsis: my $gateway_ip = $subnet->gateway_ip;

cidr

Exposed property value.

  • Return: VALUE

  • Synopsis: my $cidr = $subnet->cidr;

ip_pools

Exposed property value.

  • Return: ARRAY

  • Synopsis: my $ip_pools = $subnet->ip_pools;

delete

Deletes the object api sided and sets it invalid.

  • Synopsis: $subnet->delete;