1. Packages
  2. Packages
  3. Megaport Provider
  4. API Docs
  5. ServiceKey
Viewing docs for megaport 1.7.0
published on Thursday, Apr 30, 2026 by megaport
Viewing docs for megaport 1.7.0
published on Thursday, Apr 30, 2026 by megaport

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as megaport from "@pulumi/megaport";
    
    // Multi-use service key
    const multiUse = new megaport.ServiceKey("multi_use", {
        productUid: example.productUid,
        description: "Multi-use service key for partner",
        maxSpeed: 500,
        singleUse: false,
        active: true,
    });
    // Single-use service key with VLAN
    const singleUse = new megaport.ServiceKey("single_use", {
        productUid: example.productUid,
        description: "Single-use key for specific connection",
        maxSpeed: 100,
        singleUse: true,
        active: true,
        vlan: 100,
    });
    // Service key with validity period
    const timeLimited = new megaport.ServiceKey("time_limited", {
        productUid: example.productUid,
        description: "Time-limited service key",
        maxSpeed: 1000,
        singleUse: false,
        active: true,
        preApproved: true,
        validFor: {
            startTime: "2025-01-01T00:00:00Z",
            endTime: "2025-12-31T23:59:59Z",
        },
    });
    
    import pulumi
    import pulumi_megaport as megaport
    
    # Multi-use service key
    multi_use = megaport.ServiceKey("multi_use",
        product_uid=example["productUid"],
        description="Multi-use service key for partner",
        max_speed=500,
        single_use=False,
        active=True)
    # Single-use service key with VLAN
    single_use = megaport.ServiceKey("single_use",
        product_uid=example["productUid"],
        description="Single-use key for specific connection",
        max_speed=100,
        single_use=True,
        active=True,
        vlan=100)
    # Service key with validity period
    time_limited = megaport.ServiceKey("time_limited",
        product_uid=example["productUid"],
        description="Time-limited service key",
        max_speed=1000,
        single_use=False,
        active=True,
        pre_approved=True,
        valid_for={
            "start_time": "2025-01-01T00:00:00Z",
            "end_time": "2025-12-31T23:59:59Z",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/megaport/megaport"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Multi-use service key
    		_, err := megaport.NewServiceKey(ctx, "multi_use", &megaport.ServiceKeyArgs{
    			ProductUid:  pulumi.Any(example.ProductUid),
    			Description: pulumi.String("Multi-use service key for partner"),
    			MaxSpeed:    pulumi.Float64(500),
    			SingleUse:   pulumi.Bool(false),
    			Active:      pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		// Single-use service key with VLAN
    		_, err = megaport.NewServiceKey(ctx, "single_use", &megaport.ServiceKeyArgs{
    			ProductUid:  pulumi.Any(example.ProductUid),
    			Description: pulumi.String("Single-use key for specific connection"),
    			MaxSpeed:    pulumi.Float64(100),
    			SingleUse:   pulumi.Bool(true),
    			Active:      pulumi.Bool(true),
    			Vlan:        pulumi.Float64(100),
    		})
    		if err != nil {
    			return err
    		}
    		// Service key with validity period
    		_, err = megaport.NewServiceKey(ctx, "time_limited", &megaport.ServiceKeyArgs{
    			ProductUid:  pulumi.Any(example.ProductUid),
    			Description: pulumi.String("Time-limited service key"),
    			MaxSpeed:    pulumi.Float64(1000),
    			SingleUse:   pulumi.Bool(false),
    			Active:      pulumi.Bool(true),
    			PreApproved: pulumi.Bool(true),
    			ValidFor: &megaport.ServiceKeyValidForArgs{
    				StartTime: pulumi.String("2025-01-01T00:00:00Z"),
    				EndTime:   pulumi.String("2025-12-31T23:59:59Z"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Megaport = Pulumi.Megaport;
    
    return await Deployment.RunAsync(() => 
    {
        // Multi-use service key
        var multiUse = new Megaport.ServiceKey("multi_use", new()
        {
            ProductUid = example.ProductUid,
            Description = "Multi-use service key for partner",
            MaxSpeed = 500,
            SingleUse = false,
            Active = true,
        });
    
        // Single-use service key with VLAN
        var singleUse = new Megaport.ServiceKey("single_use", new()
        {
            ProductUid = example.ProductUid,
            Description = "Single-use key for specific connection",
            MaxSpeed = 100,
            SingleUse = true,
            Active = true,
            Vlan = 100,
        });
    
        // Service key with validity period
        var timeLimited = new Megaport.ServiceKey("time_limited", new()
        {
            ProductUid = example.ProductUid,
            Description = "Time-limited service key",
            MaxSpeed = 1000,
            SingleUse = false,
            Active = true,
            PreApproved = true,
            ValidFor = new Megaport.Inputs.ServiceKeyValidForArgs
            {
                StartTime = "2025-01-01T00:00:00Z",
                EndTime = "2025-12-31T23:59:59Z",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.megaport.ServiceKey;
    import com.pulumi.megaport.ServiceKeyArgs;
    import com.pulumi.megaport.inputs.ServiceKeyValidForArgs;
    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) {
            // Multi-use service key
            var multiUse = new ServiceKey("multiUse", ServiceKeyArgs.builder()
                .productUid(example.productUid())
                .description("Multi-use service key for partner")
                .maxSpeed(500.0)
                .singleUse(false)
                .active(true)
                .build());
    
            // Single-use service key with VLAN
            var singleUse = new ServiceKey("singleUse", ServiceKeyArgs.builder()
                .productUid(example.productUid())
                .description("Single-use key for specific connection")
                .maxSpeed(100.0)
                .singleUse(true)
                .active(true)
                .vlan(100.0)
                .build());
    
            // Service key with validity period
            var timeLimited = new ServiceKey("timeLimited", ServiceKeyArgs.builder()
                .productUid(example.productUid())
                .description("Time-limited service key")
                .maxSpeed(1000.0)
                .singleUse(false)
                .active(true)
                .preApproved(true)
                .validFor(ServiceKeyValidForArgs.builder()
                    .startTime("2025-01-01T00:00:00Z")
                    .endTime("2025-12-31T23:59:59Z")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Multi-use service key
      multiUse:
        type: megaport:ServiceKey
        name: multi_use
        properties:
          productUid: ${example.productUid}
          description: Multi-use service key for partner
          maxSpeed: 500
          singleUse: false
          active: true
      # Single-use service key with VLAN
      singleUse:
        type: megaport:ServiceKey
        name: single_use
        properties:
          productUid: ${example.productUid}
          description: Single-use key for specific connection
          maxSpeed: 100
          singleUse: true
          active: true
          vlan: 100
      # Service key with validity period
      timeLimited:
        type: megaport:ServiceKey
        name: time_limited
        properties:
          productUid: ${example.productUid}
          description: Time-limited service key
          maxSpeed: 1000
          singleUse: false
          active: true
          preApproved: true
          validFor:
            startTime: 2025-01-01T00:00:00Z
            endTime: 2025-12-31T23:59:59Z
    

    Create ServiceKey Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceKey(name: string, args: ServiceKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceKey(resource_name: str,
                   args: ServiceKeyArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceKey(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   active: Optional[bool] = None,
                   max_speed: Optional[float] = None,
                   product_uid: Optional[str] = None,
                   single_use: Optional[bool] = None,
                   description: Optional[str] = None,
                   pre_approved: Optional[bool] = None,
                   valid_for: Optional[ServiceKeyValidForArgs] = None,
                   vlan: Optional[float] = None)
    func NewServiceKey(ctx *Context, name string, args ServiceKeyArgs, opts ...ResourceOption) (*ServiceKey, error)
    public ServiceKey(string name, ServiceKeyArgs args, CustomResourceOptions? opts = null)
    public ServiceKey(String name, ServiceKeyArgs args)
    public ServiceKey(String name, ServiceKeyArgs args, CustomResourceOptions options)
    
    type: megaport:ServiceKey
    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 ServiceKeyArgs
    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 ServiceKeyArgs
    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 ServiceKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceKeyArgs
    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 serviceKeyResource = new Megaport.ServiceKey("serviceKeyResource", new()
    {
        Active = false,
        MaxSpeed = 0,
        ProductUid = "string",
        SingleUse = false,
        Description = "string",
        PreApproved = false,
        ValidFor = new Megaport.Inputs.ServiceKeyValidForArgs
        {
            EndTime = "string",
            StartTime = "string",
        },
        Vlan = 0,
    });
    
    example, err := megaport.NewServiceKey(ctx, "serviceKeyResource", &megaport.ServiceKeyArgs{
    	Active:      pulumi.Bool(false),
    	MaxSpeed:    pulumi.Float64(0),
    	ProductUid:  pulumi.String("string"),
    	SingleUse:   pulumi.Bool(false),
    	Description: pulumi.String("string"),
    	PreApproved: pulumi.Bool(false),
    	ValidFor: &megaport.ServiceKeyValidForArgs{
    		EndTime:   pulumi.String("string"),
    		StartTime: pulumi.String("string"),
    	},
    	Vlan: pulumi.Float64(0),
    })
    
    var serviceKeyResource = new ServiceKey("serviceKeyResource", ServiceKeyArgs.builder()
        .active(false)
        .maxSpeed(0.0)
        .productUid("string")
        .singleUse(false)
        .description("string")
        .preApproved(false)
        .validFor(ServiceKeyValidForArgs.builder()
            .endTime("string")
            .startTime("string")
            .build())
        .vlan(0.0)
        .build());
    
    service_key_resource = megaport.ServiceKey("serviceKeyResource",
        active=False,
        max_speed=float(0),
        product_uid="string",
        single_use=False,
        description="string",
        pre_approved=False,
        valid_for={
            "end_time": "string",
            "start_time": "string",
        },
        vlan=float(0))
    
    const serviceKeyResource = new megaport.ServiceKey("serviceKeyResource", {
        active: false,
        maxSpeed: 0,
        productUid: "string",
        singleUse: false,
        description: "string",
        preApproved: false,
        validFor: {
            endTime: "string",
            startTime: "string",
        },
        vlan: 0,
    });
    
    type: megaport:ServiceKey
    properties:
        active: false
        description: string
        maxSpeed: 0
        preApproved: false
        productUid: string
        singleUse: false
        validFor:
            endTime: string
            startTime: string
        vlan: 0
    

    ServiceKey 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 ServiceKey resource accepts the following input properties:

    Active bool
    Whether the service key is currently active and available for use.
    MaxSpeed double
    The maximum speed in Mbps that the service key allows.
    ProductUid string
    The UID of the port that this service key is associated with.
    SingleUse bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    Description string
    A description for the service key.
    PreApproved bool
    Whether the service key is pre-approved for use.
    ValidFor ServiceKeyValidFor
    The date range for which the service key is valid.
    Vlan double
    The VLAN ID for the service key. Required when single_use is true.
    Active bool
    Whether the service key is currently active and available for use.
    MaxSpeed float64
    The maximum speed in Mbps that the service key allows.
    ProductUid string
    The UID of the port that this service key is associated with.
    SingleUse bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    Description string
    A description for the service key.
    PreApproved bool
    Whether the service key is pre-approved for use.
    ValidFor ServiceKeyValidForArgs
    The date range for which the service key is valid.
    Vlan float64
    The VLAN ID for the service key. Required when single_use is true.
    active Boolean
    Whether the service key is currently active and available for use.
    maxSpeed Double
    The maximum speed in Mbps that the service key allows.
    productUid String
    The UID of the port that this service key is associated with.
    singleUse Boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    description String
    A description for the service key.
    preApproved Boolean
    Whether the service key is pre-approved for use.
    validFor ServiceKeyValidFor
    The date range for which the service key is valid.
    vlan Double
    The VLAN ID for the service key. Required when single_use is true.
    active boolean
    Whether the service key is currently active and available for use.
    maxSpeed number
    The maximum speed in Mbps that the service key allows.
    productUid string
    The UID of the port that this service key is associated with.
    singleUse boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    description string
    A description for the service key.
    preApproved boolean
    Whether the service key is pre-approved for use.
    validFor ServiceKeyValidFor
    The date range for which the service key is valid.
    vlan number
    The VLAN ID for the service key. Required when single_use is true.
    active bool
    Whether the service key is currently active and available for use.
    max_speed float
    The maximum speed in Mbps that the service key allows.
    product_uid str
    The UID of the port that this service key is associated with.
    single_use bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    description str
    A description for the service key.
    pre_approved bool
    Whether the service key is pre-approved for use.
    valid_for ServiceKeyValidForArgs
    The date range for which the service key is valid.
    vlan float
    The VLAN ID for the service key. Required when single_use is true.
    active Boolean
    Whether the service key is currently active and available for use.
    maxSpeed Number
    The maximum speed in Mbps that the service key allows.
    productUid String
    The UID of the port that this service key is associated with.
    singleUse Boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    description String
    A description for the service key.
    preApproved Boolean
    Whether the service key is pre-approved for use.
    validFor Property Map
    The date range for which the service key is valid.
    vlan Number
    The VLAN ID for the service key. Required when single_use is true.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceKey resource produces the following output properties:

    CompanyId double
    The numeric company ID of the service key owner.
    CompanyUid string
    The UID of the company that owns the service key.
    CreateDate string
    The date and time when the service key was created.
    Expired bool
    Whether the service key has expired.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The service key value. This is the secret key that is shared with the other party.
    LastUpdated string
    LastUsed string
    The date and time when the service key was last used.
    Valid bool
    Whether the service key is currently valid.
    CompanyId float64
    The numeric company ID of the service key owner.
    CompanyUid string
    The UID of the company that owns the service key.
    CreateDate string
    The date and time when the service key was created.
    Expired bool
    Whether the service key has expired.
    Id string
    The provider-assigned unique ID for this managed resource.
    Key string
    The service key value. This is the secret key that is shared with the other party.
    LastUpdated string
    LastUsed string
    The date and time when the service key was last used.
    Valid bool
    Whether the service key is currently valid.
    companyId Double
    The numeric company ID of the service key owner.
    companyUid String
    The UID of the company that owns the service key.
    createDate String
    The date and time when the service key was created.
    expired Boolean
    Whether the service key has expired.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated String
    lastUsed String
    The date and time when the service key was last used.
    valid Boolean
    Whether the service key is currently valid.
    companyId number
    The numeric company ID of the service key owner.
    companyUid string
    The UID of the company that owns the service key.
    createDate string
    The date and time when the service key was created.
    expired boolean
    Whether the service key has expired.
    id string
    The provider-assigned unique ID for this managed resource.
    key string
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated string
    lastUsed string
    The date and time when the service key was last used.
    valid boolean
    Whether the service key is currently valid.
    company_id float
    The numeric company ID of the service key owner.
    company_uid str
    The UID of the company that owns the service key.
    create_date str
    The date and time when the service key was created.
    expired bool
    Whether the service key has expired.
    id str
    The provider-assigned unique ID for this managed resource.
    key str
    The service key value. This is the secret key that is shared with the other party.
    last_updated str
    last_used str
    The date and time when the service key was last used.
    valid bool
    Whether the service key is currently valid.
    companyId Number
    The numeric company ID of the service key owner.
    companyUid String
    The UID of the company that owns the service key.
    createDate String
    The date and time when the service key was created.
    expired Boolean
    Whether the service key has expired.
    id String
    The provider-assigned unique ID for this managed resource.
    key String
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated String
    lastUsed String
    The date and time when the service key was last used.
    valid Boolean
    Whether the service key is currently valid.

    Look up Existing ServiceKey Resource

    Get an existing ServiceKey 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?: ServiceKeyState, opts?: CustomResourceOptions): ServiceKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            active: Optional[bool] = None,
            company_id: Optional[float] = None,
            company_uid: Optional[str] = None,
            create_date: Optional[str] = None,
            description: Optional[str] = None,
            expired: Optional[bool] = None,
            key: Optional[str] = None,
            last_updated: Optional[str] = None,
            last_used: Optional[str] = None,
            max_speed: Optional[float] = None,
            pre_approved: Optional[bool] = None,
            product_uid: Optional[str] = None,
            single_use: Optional[bool] = None,
            valid: Optional[bool] = None,
            valid_for: Optional[ServiceKeyValidForArgs] = None,
            vlan: Optional[float] = None) -> ServiceKey
    func GetServiceKey(ctx *Context, name string, id IDInput, state *ServiceKeyState, opts ...ResourceOption) (*ServiceKey, error)
    public static ServiceKey Get(string name, Input<string> id, ServiceKeyState? state, CustomResourceOptions? opts = null)
    public static ServiceKey get(String name, Output<String> id, ServiceKeyState state, CustomResourceOptions options)
    resources:  _:    type: megaport:ServiceKey    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.
    The following state arguments are supported:
    Active bool
    Whether the service key is currently active and available for use.
    CompanyId double
    The numeric company ID of the service key owner.
    CompanyUid string
    The UID of the company that owns the service key.
    CreateDate string
    The date and time when the service key was created.
    Description string
    A description for the service key.
    Expired bool
    Whether the service key has expired.
    Key string
    The service key value. This is the secret key that is shared with the other party.
    LastUpdated string
    LastUsed string
    The date and time when the service key was last used.
    MaxSpeed double
    The maximum speed in Mbps that the service key allows.
    PreApproved bool
    Whether the service key is pre-approved for use.
    ProductUid string
    The UID of the port that this service key is associated with.
    SingleUse bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    Valid bool
    Whether the service key is currently valid.
    ValidFor ServiceKeyValidFor
    The date range for which the service key is valid.
    Vlan double
    The VLAN ID for the service key. Required when single_use is true.
    Active bool
    Whether the service key is currently active and available for use.
    CompanyId float64
    The numeric company ID of the service key owner.
    CompanyUid string
    The UID of the company that owns the service key.
    CreateDate string
    The date and time when the service key was created.
    Description string
    A description for the service key.
    Expired bool
    Whether the service key has expired.
    Key string
    The service key value. This is the secret key that is shared with the other party.
    LastUpdated string
    LastUsed string
    The date and time when the service key was last used.
    MaxSpeed float64
    The maximum speed in Mbps that the service key allows.
    PreApproved bool
    Whether the service key is pre-approved for use.
    ProductUid string
    The UID of the port that this service key is associated with.
    SingleUse bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    Valid bool
    Whether the service key is currently valid.
    ValidFor ServiceKeyValidForArgs
    The date range for which the service key is valid.
    Vlan float64
    The VLAN ID for the service key. Required when single_use is true.
    active Boolean
    Whether the service key is currently active and available for use.
    companyId Double
    The numeric company ID of the service key owner.
    companyUid String
    The UID of the company that owns the service key.
    createDate String
    The date and time when the service key was created.
    description String
    A description for the service key.
    expired Boolean
    Whether the service key has expired.
    key String
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated String
    lastUsed String
    The date and time when the service key was last used.
    maxSpeed Double
    The maximum speed in Mbps that the service key allows.
    preApproved Boolean
    Whether the service key is pre-approved for use.
    productUid String
    The UID of the port that this service key is associated with.
    singleUse Boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    valid Boolean
    Whether the service key is currently valid.
    validFor ServiceKeyValidFor
    The date range for which the service key is valid.
    vlan Double
    The VLAN ID for the service key. Required when single_use is true.
    active boolean
    Whether the service key is currently active and available for use.
    companyId number
    The numeric company ID of the service key owner.
    companyUid string
    The UID of the company that owns the service key.
    createDate string
    The date and time when the service key was created.
    description string
    A description for the service key.
    expired boolean
    Whether the service key has expired.
    key string
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated string
    lastUsed string
    The date and time when the service key was last used.
    maxSpeed number
    The maximum speed in Mbps that the service key allows.
    preApproved boolean
    Whether the service key is pre-approved for use.
    productUid string
    The UID of the port that this service key is associated with.
    singleUse boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    valid boolean
    Whether the service key is currently valid.
    validFor ServiceKeyValidFor
    The date range for which the service key is valid.
    vlan number
    The VLAN ID for the service key. Required when single_use is true.
    active bool
    Whether the service key is currently active and available for use.
    company_id float
    The numeric company ID of the service key owner.
    company_uid str
    The UID of the company that owns the service key.
    create_date str
    The date and time when the service key was created.
    description str
    A description for the service key.
    expired bool
    Whether the service key has expired.
    key str
    The service key value. This is the secret key that is shared with the other party.
    last_updated str
    last_used str
    The date and time when the service key was last used.
    max_speed float
    The maximum speed in Mbps that the service key allows.
    pre_approved bool
    Whether the service key is pre-approved for use.
    product_uid str
    The UID of the port that this service key is associated with.
    single_use bool
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    valid bool
    Whether the service key is currently valid.
    valid_for ServiceKeyValidForArgs
    The date range for which the service key is valid.
    vlan float
    The VLAN ID for the service key. Required when single_use is true.
    active Boolean
    Whether the service key is currently active and available for use.
    companyId Number
    The numeric company ID of the service key owner.
    companyUid String
    The UID of the company that owns the service key.
    createDate String
    The date and time when the service key was created.
    description String
    A description for the service key.
    expired Boolean
    Whether the service key has expired.
    key String
    The service key value. This is the secret key that is shared with the other party.
    lastUpdated String
    lastUsed String
    The date and time when the service key was last used.
    maxSpeed Number
    The maximum speed in Mbps that the service key allows.
    preApproved Boolean
    Whether the service key is pre-approved for use.
    productUid String
    The UID of the port that this service key is associated with.
    singleUse Boolean
    Whether the service key is single-use (true) or multi-use (false). With a multi-use key, the other party can request multiple connections using the key.
    valid Boolean
    Whether the service key is currently valid.
    validFor Property Map
    The date range for which the service key is valid.
    vlan Number
    The VLAN ID for the service key. Required when single_use is true.

    Supporting Types

    ServiceKeyValidFor, ServiceKeyValidForArgs

    EndTime string
    The end time for the service key validity in RFC3339 format.
    StartTime string
    The start time for the service key validity in RFC3339 format.
    EndTime string
    The end time for the service key validity in RFC3339 format.
    StartTime string
    The start time for the service key validity in RFC3339 format.
    endTime String
    The end time for the service key validity in RFC3339 format.
    startTime String
    The start time for the service key validity in RFC3339 format.
    endTime string
    The end time for the service key validity in RFC3339 format.
    startTime string
    The start time for the service key validity in RFC3339 format.
    end_time str
    The end time for the service key validity in RFC3339 format.
    start_time str
    The start time for the service key validity in RFC3339 format.
    endTime String
    The end time for the service key validity in RFC3339 format.
    startTime String
    The start time for the service key validity in RFC3339 format.

    Import

    The pulumi import command can be used, for example:

    Import a service key by its key value

    $ pulumi import megaport:index/serviceKey:ServiceKey example "e19de6a6-5354-4b9a-a957-3a4e0caa1513"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    megaport megaport/terraform-provider-megaport
    License
    Notes
    This Pulumi package is based on the megaport Terraform Provider.
    Viewing docs for megaport 1.7.0
    published on Thursday, Apr 30, 2026 by megaport
      Try Pulumi Cloud free. Your team will thank you.