netbox.Aggregate
Explore with Pulumi AI
From the official documentation:
NetBox allows us to specify the portions of IP space that are interesting to us by defining aggregates. Typically, an aggregate will correspond to either an allocation of public (globally routable) IP space granted by a regional authority, or a private (internally-routable) designation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const testRir = new netbox.Rir("testRir", {});
const testAggregate = new netbox.Aggregate("testAggregate", {
prefix: "1.1.1.0/25",
description: "my description",
rirId: testRir.rirId,
});
import pulumi
import pulumi_netbox as netbox
test_rir = netbox.Rir("testRir")
test_aggregate = netbox.Aggregate("testAggregate",
prefix="1.1.1.0/25",
description="my description",
rir_id=test_rir.rir_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
testRir, err := netbox.NewRir(ctx, "testRir", nil)
if err != nil {
return err
}
_, err = netbox.NewAggregate(ctx, "testAggregate", &netbox.AggregateArgs{
Prefix: pulumi.String("1.1.1.0/25"),
Description: pulumi.String("my description"),
RirId: testRir.RirId,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var testRir = new Netbox.Rir("testRir");
var testAggregate = new Netbox.Aggregate("testAggregate", new()
{
Prefix = "1.1.1.0/25",
Description = "my description",
RirId = testRir.RirId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.Rir;
import com.pulumi.netbox.Aggregate;
import com.pulumi.netbox.AggregateArgs;
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 testRir = new Rir("testRir");
var testAggregate = new Aggregate("testAggregate", AggregateArgs.builder()
.prefix("1.1.1.0/25")
.description("my description")
.rirId(testRir.rirId())
.build());
}
}
resources:
testRir:
type: netbox:Rir
testAggregate:
type: netbox:Aggregate
properties:
prefix: 1.1.1.0/25
description: my description
rirId: ${testRir.rirId}
Create Aggregate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Aggregate(name: string, args: AggregateArgs, opts?: CustomResourceOptions);
@overload
def Aggregate(resource_name: str,
args: AggregateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Aggregate(resource_name: str,
opts: Optional[ResourceOptions] = None,
prefix: Optional[str] = None,
aggregate_id: Optional[str] = None,
description: Optional[str] = None,
rir_id: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None)
func NewAggregate(ctx *Context, name string, args AggregateArgs, opts ...ResourceOption) (*Aggregate, error)
public Aggregate(string name, AggregateArgs args, CustomResourceOptions? opts = null)
public Aggregate(String name, AggregateArgs args)
public Aggregate(String name, AggregateArgs args, CustomResourceOptions options)
type: netbox:Aggregate
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 AggregateArgs
- 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 AggregateArgs
- 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 AggregateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AggregateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AggregateArgs
- 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 aggregateResource = new Netbox.Aggregate("aggregateResource", new()
{
Prefix = "string",
AggregateId = "string",
Description = "string",
RirId = 0,
Tags = new[]
{
"string",
},
TenantId = 0,
});
example, err := netbox.NewAggregate(ctx, "aggregateResource", &netbox.AggregateArgs{
Prefix: pulumi.String("string"),
AggregateId: pulumi.String("string"),
Description: pulumi.String("string"),
RirId: pulumi.Float64(0),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
TenantId: pulumi.Float64(0),
})
var aggregateResource = new Aggregate("aggregateResource", AggregateArgs.builder()
.prefix("string")
.aggregateId("string")
.description("string")
.rirId(0)
.tags("string")
.tenantId(0)
.build());
aggregate_resource = netbox.Aggregate("aggregateResource",
prefix="string",
aggregate_id="string",
description="string",
rir_id=0,
tags=["string"],
tenant_id=0)
const aggregateResource = new netbox.Aggregate("aggregateResource", {
prefix: "string",
aggregateId: "string",
description: "string",
rirId: 0,
tags: ["string"],
tenantId: 0,
});
type: netbox:Aggregate
properties:
aggregateId: string
description: string
prefix: string
rirId: 0
tags:
- string
tenantId: 0
Aggregate 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 Aggregate resource accepts the following input properties:
- Prefix string
- Aggregate
Id string - The ID of this resource.
- Description string
- Rir
Id double - List<string>
- Tenant
Id double
- Prefix string
- Aggregate
Id string - The ID of this resource.
- Description string
- Rir
Id float64 - []string
- Tenant
Id float64
- prefix String
- aggregate
Id String - The ID of this resource.
- description String
- rir
Id Double - List<String>
- tenant
Id Double
- prefix string
- aggregate
Id string - The ID of this resource.
- description string
- rir
Id number - string[]
- tenant
Id number
- prefix str
- aggregate_
id str - The ID of this resource.
- description str
- rir_
id float - Sequence[str]
- tenant_
id float
- prefix String
- aggregate
Id String - The ID of this resource.
- description String
- rir
Id Number - List<String>
- tenant
Id Number
Outputs
All input properties are implicitly available as output properties. Additionally, the Aggregate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Aggregate Resource
Get an existing Aggregate 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?: AggregateState, opts?: CustomResourceOptions): Aggregate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
aggregate_id: Optional[str] = None,
description: Optional[str] = None,
prefix: Optional[str] = None,
rir_id: Optional[float] = None,
tags: Optional[Sequence[str]] = None,
tenant_id: Optional[float] = None) -> Aggregate
func GetAggregate(ctx *Context, name string, id IDInput, state *AggregateState, opts ...ResourceOption) (*Aggregate, error)
public static Aggregate Get(string name, Input<string> id, AggregateState? state, CustomResourceOptions? opts = null)
public static Aggregate get(String name, Output<String> id, AggregateState state, CustomResourceOptions options)
resources: _: type: netbox:Aggregate 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.
- Aggregate
Id string - The ID of this resource.
- Description string
- Prefix string
- Rir
Id double - List<string>
- Tenant
Id double
- Aggregate
Id string - The ID of this resource.
- Description string
- Prefix string
- Rir
Id float64 - []string
- Tenant
Id float64
- aggregate
Id String - The ID of this resource.
- description String
- prefix String
- rir
Id Double - List<String>
- tenant
Id Double
- aggregate
Id string - The ID of this resource.
- description string
- prefix string
- rir
Id number - string[]
- tenant
Id number
- aggregate_
id str - The ID of this resource.
- description str
- prefix str
- rir_
id float - Sequence[str]
- tenant_
id float
- aggregate
Id String - The ID of this resource.
- description String
- prefix String
- rir
Id Number - List<String>
- tenant
Id Number
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.