Passer au contenu principal
POST
https://{tenantDomain}/api/v2
/
network-acls
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &management.CreateNetworkAclRequestContent{
        Description: "description",
        Active: true,
        Priority: 1.1,
        Rule: &management.NetworkAclRule{
            Action: &management.NetworkAclAction{},
            Scope: management.NetworkAclRuleScopeEnumManagement,
        },
    }
    client.NetworkAcls.Create(
        context.TODO(),
        request,
    )
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

description
string
requis
Maximum string length: 255
active
boolean
requis

Indicates whether or not this access control list is actively being used

rule
object
requis
priority
number
défaut:50

Indicates the order in which the ACL will be evaluated relative to other ACL rules.

Plage requise: 1 <= x <= 100

Réponse

Network ACL successfully created.