cloudflare.ByoIpPrefix
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleByoIpPrefix = new cloudflare.ByoIpPrefix("example_byo_ip_prefix", {
accountId: "258def64c72dae45f3e4c8516e2111f2",
asn: 209242,
cidr: "192.0.2.0/24",
loaDocumentId: "d933b1530bc56c9953cf8ce166da8004",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_byo_ip_prefix = cloudflare.ByoIpPrefix("example_byo_ip_prefix",
account_id="258def64c72dae45f3e4c8516e2111f2",
asn=209242,
cidr="192.0.2.0/24",
loa_document_id="d933b1530bc56c9953cf8ce166da8004")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewByoIpPrefix(ctx, "example_byo_ip_prefix", &cloudflare.ByoIpPrefixArgs{
AccountId: pulumi.String("258def64c72dae45f3e4c8516e2111f2"),
Asn: pulumi.Int(209242),
Cidr: pulumi.String("192.0.2.0/24"),
LoaDocumentId: pulumi.String("d933b1530bc56c9953cf8ce166da8004"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleByoIpPrefix = new Cloudflare.ByoIpPrefix("example_byo_ip_prefix", new()
{
AccountId = "258def64c72dae45f3e4c8516e2111f2",
Asn = 209242,
Cidr = "192.0.2.0/24",
LoaDocumentId = "d933b1530bc56c9953cf8ce166da8004",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ByoIpPrefix;
import com.pulumi.cloudflare.ByoIpPrefixArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleByoIpPrefix = new ByoIpPrefix("exampleByoIpPrefix", ByoIpPrefixArgs.builder()
.accountId("258def64c72dae45f3e4c8516e2111f2")
.asn(209242)
.cidr("192.0.2.0/24")
.loaDocumentId("d933b1530bc56c9953cf8ce166da8004")
.build());
}
}
resources:
exampleByoIpPrefix:
type: cloudflare:ByoIpPrefix
name: example_byo_ip_prefix
properties:
accountId: 258def64c72dae45f3e4c8516e2111f2
asn: 209242
cidr: 192.0.2.0/24
loaDocumentId: d933b1530bc56c9953cf8ce166da8004
Create ByoIpPrefix Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ByoIpPrefix(name: string, args: ByoIpPrefixArgs, opts?: CustomResourceOptions);
@overload
def ByoIpPrefix(resource_name: str,
args: ByoIpPrefixArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ByoIpPrefix(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
asn: Optional[int] = None,
cidr: Optional[str] = None,
loa_document_id: Optional[str] = None,
description: Optional[str] = None)
func NewByoIpPrefix(ctx *Context, name string, args ByoIpPrefixArgs, opts ...ResourceOption) (*ByoIpPrefix, error)
public ByoIpPrefix(string name, ByoIpPrefixArgs args, CustomResourceOptions? opts = null)
public ByoIpPrefix(String name, ByoIpPrefixArgs args)
public ByoIpPrefix(String name, ByoIpPrefixArgs args, CustomResourceOptions options)
type: cloudflare:ByoIpPrefix
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ByoIpPrefixArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ByoIpPrefixArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ByoIpPrefixArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ByoIpPrefixArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ByoIpPrefixArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var byoIpPrefixResource = new Cloudflare.ByoIpPrefix("byoIpPrefixResource", new()
{
AccountId = "string",
Asn = 0,
Cidr = "string",
LoaDocumentId = "string",
Description = "string",
});
example, err := cloudflare.NewByoIpPrefix(ctx, "byoIpPrefixResource", &cloudflare.ByoIpPrefixArgs{
AccountId: pulumi.String("string"),
Asn: pulumi.Int(0),
Cidr: pulumi.String("string"),
LoaDocumentId: pulumi.String("string"),
Description: pulumi.String("string"),
})
var byoIpPrefixResource = new ByoIpPrefix("byoIpPrefixResource", ByoIpPrefixArgs.builder()
.accountId("string")
.asn(0)
.cidr("string")
.loaDocumentId("string")
.description("string")
.build());
byo_ip_prefix_resource = cloudflare.ByoIpPrefix("byoIpPrefixResource",
account_id="string",
asn=0,
cidr="string",
loa_document_id="string",
description="string")
const byoIpPrefixResource = new cloudflare.ByoIpPrefix("byoIpPrefixResource", {
accountId: "string",
asn: 0,
cidr: "string",
loaDocumentId: "string",
description: "string",
});
type: cloudflare:ByoIpPrefix
properties:
accountId: string
asn: 0
cidr: string
description: string
loaDocumentId: string
ByoIpPrefix Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ByoIpPrefix resource accepts the following input properties:
- Account
Id string - Identifier of a Cloudflare account.
- Asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- Cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- Loa
Document stringId - Identifier for the uploaded LOA document.
- Description string
- Description of the prefix.
- Account
Id string - Identifier of a Cloudflare account.
- Asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- Cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- Loa
Document stringId - Identifier for the uploaded LOA document.
- Description string
- Description of the prefix.
- account
Id String - Identifier of a Cloudflare account.
- asn Integer
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr String
- IP Prefix in Classless Inter-Domain Routing format.
- loa
Document StringId - Identifier for the uploaded LOA document.
- description String
- Description of the prefix.
- account
Id string - Identifier of a Cloudflare account.
- asn number
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- loa
Document stringId - Identifier for the uploaded LOA document.
- description string
- Description of the prefix.
- account_
id str - Identifier of a Cloudflare account.
- asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr str
- IP Prefix in Classless Inter-Domain Routing format.
- loa_
document_ strid - Identifier for the uploaded LOA document.
- description str
- Description of the prefix.
- account
Id String - Identifier of a Cloudflare account.
- asn Number
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr String
- IP Prefix in Classless Inter-Domain Routing format.
- loa
Document StringId - Identifier for the uploaded LOA document.
- description String
- Description of the prefix.
Outputs
All input properties are implicitly available as output properties. Additionally, the ByoIpPrefix resource produces the following output properties:
- Advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- Advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- Approved string
- Approval state of the prefix (P = pending, V = active).
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - On
Demand boolEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- On
Demand boolLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- Advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- Advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- Approved string
- Approval state of the prefix (P = pending, V = active).
- Created
At string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
At string - On
Demand boolEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- On
Demand boolLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- advertised Boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified StringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved String
- Approval state of the prefix (P = pending, V = active).
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - on
Demand BooleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand BooleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- advertised boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved string
- Approval state of the prefix (P = pending, V = active).
- created
At string - id string
- The provider-assigned unique ID for this managed resource.
- modified
At string - on
Demand booleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand booleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised_
modified_ strat - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved str
- Approval state of the prefix (P = pending, V = active).
- created_
at str - id str
- The provider-assigned unique ID for this managed resource.
- modified_
at str - on_
demand_ boolenabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on_
demand_ boollocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- advertised Boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified StringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved String
- Approval state of the prefix (P = pending, V = active).
- created
At String - id String
- The provider-assigned unique ID for this managed resource.
- modified
At String - on
Demand BooleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand BooleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
Look up Existing ByoIpPrefix Resource
Get an existing ByoIpPrefix resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ByoIpPrefixState, opts?: CustomResourceOptions): ByoIpPrefix
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
advertised: Optional[bool] = None,
advertised_modified_at: Optional[str] = None,
approved: Optional[str] = None,
asn: Optional[int] = None,
cidr: Optional[str] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
loa_document_id: Optional[str] = None,
modified_at: Optional[str] = None,
on_demand_enabled: Optional[bool] = None,
on_demand_locked: Optional[bool] = None) -> ByoIpPrefix
func GetByoIpPrefix(ctx *Context, name string, id IDInput, state *ByoIpPrefixState, opts ...ResourceOption) (*ByoIpPrefix, error)
public static ByoIpPrefix Get(string name, Input<string> id, ByoIpPrefixState? state, CustomResourceOptions? opts = null)
public static ByoIpPrefix get(String name, Output<String> id, ByoIpPrefixState state, CustomResourceOptions options)
resources: _: type: cloudflare:ByoIpPrefix get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Account
Id string - Identifier of a Cloudflare account.
- Advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- Advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- Approved string
- Approval state of the prefix (P = pending, V = active).
- Asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- Cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- Created
At string - Description string
- Description of the prefix.
- Loa
Document stringId - Identifier for the uploaded LOA document.
- Modified
At string - On
Demand boolEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- On
Demand boolLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- Account
Id string - Identifier of a Cloudflare account.
- Advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- Advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- Approved string
- Approval state of the prefix (P = pending, V = active).
- Asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- Cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- Created
At string - Description string
- Description of the prefix.
- Loa
Document stringId - Identifier for the uploaded LOA document.
- Modified
At string - On
Demand boolEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- On
Demand boolLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- account
Id String - Identifier of a Cloudflare account.
- advertised Boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified StringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved String
- Approval state of the prefix (P = pending, V = active).
- asn Integer
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr String
- IP Prefix in Classless Inter-Domain Routing format.
- created
At String - description String
- Description of the prefix.
- loa
Document StringId - Identifier for the uploaded LOA document.
- modified
At String - on
Demand BooleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand BooleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- account
Id string - Identifier of a Cloudflare account.
- advertised boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified stringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved string
- Approval state of the prefix (P = pending, V = active).
- asn number
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr string
- IP Prefix in Classless Inter-Domain Routing format.
- created
At string - description string
- Description of the prefix.
- loa
Document stringId - Identifier for the uploaded LOA document.
- modified
At string - on
Demand booleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand booleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- account_
id str - Identifier of a Cloudflare account.
- advertised bool
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised_
modified_ strat - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved str
- Approval state of the prefix (P = pending, V = active).
- asn int
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr str
- IP Prefix in Classless Inter-Domain Routing format.
- created_
at str - description str
- Description of the prefix.
- loa_
document_ strid - Identifier for the uploaded LOA document.
- modified_
at str - on_
demand_ boolenabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on_
demand_ boollocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
- account
Id String - Identifier of a Cloudflare account.
- advertised Boolean
- Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
- advertised
Modified StringAt - Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
- approved String
- Approval state of the prefix (P = pending, V = active).
- asn Number
- Autonomous System Number (ASN) the prefix will be advertised under.
- cidr String
- IP Prefix in Classless Inter-Domain Routing format.
- created
At String - description String
- Description of the prefix.
- loa
Document StringId - Identifier for the uploaded LOA document.
- modified
At String - on
Demand BooleanEnabled - Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
- on
Demand BooleanLocked - Whether advertisement status of the prefix is locked, meaning it cannot be changed.
Import
$ pulumi import cloudflare:index/byoIpPrefix:ByoIpPrefix example '<account_id>/<prefix_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.