Skip to content
Docs

    Firewall Rules

    Create Firewall Rule
    client.Networking.FirewallRules.New(ctx, vpcID, body) (*Operation, error)
    POST/v1/networking/vpcs/{vpc_id}/firewall_rules
    Firewall Rule Details
    client.Networking.FirewallRules.Get(ctx, vpcID, firewallRuleID) (*FirewallRule, error)
    GET/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}
    Update Firewall Rule
    client.Networking.FirewallRules.Update(ctx, vpcID, firewallRuleID, body) (*Operation, error)
    PATCH/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}
    Delete Firewall Rule
    client.Networking.FirewallRules.Delete(ctx, vpcID, firewallRuleID) (*Operation, error)
    DELETE/v1/networking/vpcs/{vpc_id}/firewall_rules/{firewall_rule_id}
    List Firewall Rules
    client.Networking.FirewallRules.List(ctx, vpcID, query) (*Cursor[FirewallRule], error)
    GET/v1/networking/vpcs/{vpc_id}/firewall_rules
    ModelsExpand Collapse
    type FirewallRule struct{…}

    Firewall rule details.

    ID string

    Unique identifier for the Firewall Rule.

    CreatedAt Time

    When the Firewall Rule was created.

    formatdate-time
    DestinationAddress string

    Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC.

    DestinationPorts []string

    Destination ports of the Firewall Rule.

    Name string

    Name of the Firewall Rule.

    Protocol FirewallRuleProtocol

    Protocol of the Firewall Rule.

    One of the following:
    const FirewallRuleProtocolTcp FirewallRuleProtocol = "tcp"
    const FirewallRuleProtocolUdp FirewallRuleProtocol = "udp"
    SourceAddress string

    Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    Tags []string

    Tags to attach to the Firewall Rule.

    UpdatedAt Time

    When the Firewall Rule was updated.

    formatdate-time
    VPCID string

    ID of the VPC the Firewall Rule belongs to.

    type FirewallRuleList struct{…}
    Items []FirewallRule
    ID string

    Unique identifier for the Firewall Rule.

    CreatedAt Time

    When the Firewall Rule was created.

    formatdate-time
    DestinationAddress string

    Destination address of the Firewall Rule. Either VPC CIDR or VM in VPC.

    DestinationPorts []string

    Destination ports of the Firewall Rule.

    Name string

    Name of the Firewall Rule.

    Protocol FirewallRuleProtocol

    Protocol of the Firewall Rule.

    One of the following:
    const FirewallRuleProtocolTcp FirewallRuleProtocol = "tcp"
    const FirewallRuleProtocolUdp FirewallRuleProtocol = "udp"
    SourceAddress string

    Source address of the Firewall Rule. Address of 0.0.0.0 requires a CIDR mask of 0.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    Tags []string

    Tags to attach to the Firewall Rule.

    UpdatedAt Time

    When the Firewall Rule was updated.

    formatdate-time
    VPCID string

    ID of the VPC the Firewall Rule belongs to.