equinix-metal logo
Equinix Metal v3.2.1, Dec 30 21

equinix-metal.ProjectApiKey

Explore with Pulumi AI

Example Usage

using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new read-only API key in existing project
        var test = new EquinixMetal.ProjectApiKey("test", new EquinixMetal.ProjectApiKeyArgs
        {
            ProjectId = local.Existing_project_id,
            Description = "Read-only key scoped to a projct",
            ReadOnly = true,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := equinix - metal.NewProjectApiKey(ctx, "test", &equinix-metal.ProjectApiKeyArgs{
			ProjectId:   pulumi.Any(local.Existing_project_id),
			Description: pulumi.String("Read-only key scoped to a projct"),
			ReadOnly:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_equinix_metal as equinix_metal

# Create a new read-only API key in existing project
test = equinix_metal.ProjectApiKey("test",
    project_id=local["existing_project_id"],
    description="Read-only key scoped to a projct",
    read_only=True)
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";

// Create a new read-only API key in existing project
const test = new equinix_metal.ProjectApiKey("test", {
    projectId: local.existing_project_id,
    description: "Read-only key scoped to a projct",
    readOnly: true,
});

Coming soon!

Create ProjectApiKey Resource

new ProjectApiKey(name: string, args: ProjectApiKeyArgs, opts?: CustomResourceOptions);
@overload
def ProjectApiKey(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  description: Optional[str] = None,
                  project_id: Optional[str] = None,
                  read_only: Optional[bool] = None)
@overload
def ProjectApiKey(resource_name: str,
                  args: ProjectApiKeyArgs,
                  opts: Optional[ResourceOptions] = None)
func NewProjectApiKey(ctx *Context, name string, args ProjectApiKeyArgs, opts ...ResourceOption) (*ProjectApiKey, error)
public ProjectApiKey(string name, ProjectApiKeyArgs args, CustomResourceOptions? opts = null)
public ProjectApiKey(String name, ProjectApiKeyArgs args)
public ProjectApiKey(String name, ProjectApiKeyArgs args, CustomResourceOptions options)
type: equinix-metal:ProjectApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args ProjectApiKeyArgs
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 ProjectApiKeyArgs
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 ProjectApiKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectApiKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args ProjectApiKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

ProjectApiKey Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The ProjectApiKey resource accepts the following input properties:

Description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
ProjectId string

UUID of the project where the API key is scoped to

ReadOnly bool

Flag indicating whether the API key shoud be read-only

Description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
ProjectId string

UUID of the project where the API key is scoped to

ReadOnly bool

Flag indicating whether the API key shoud be read-only

description String

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId String

UUID of the project where the API key is scoped to

readOnly Boolean

Flag indicating whether the API key shoud be read-only

description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId string

UUID of the project where the API key is scoped to

readOnly boolean

Flag indicating whether the API key shoud be read-only

description str

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
project_id str

UUID of the project where the API key is scoped to

read_only bool

Flag indicating whether the API key shoud be read-only

description String

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId String

UUID of the project where the API key is scoped to

readOnly Boolean

Flag indicating whether the API key shoud be read-only

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Token string

API token which can be used in Equinix Metal API clients

Id string

The provider-assigned unique ID for this managed resource.

Token string

API token which can be used in Equinix Metal API clients

id String

The provider-assigned unique ID for this managed resource.

token String

API token which can be used in Equinix Metal API clients

id string

The provider-assigned unique ID for this managed resource.

token string

API token which can be used in Equinix Metal API clients

id str

The provider-assigned unique ID for this managed resource.

token str

API token which can be used in Equinix Metal API clients

id String

The provider-assigned unique ID for this managed resource.

token String

API token which can be used in Equinix Metal API clients

Look up Existing ProjectApiKey Resource

Get an existing ProjectApiKey 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?: ProjectApiKeyState, opts?: CustomResourceOptions): ProjectApiKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        project_id: Optional[str] = None,
        read_only: Optional[bool] = None,
        token: Optional[str] = None) -> ProjectApiKey
func GetProjectApiKey(ctx *Context, name string, id IDInput, state *ProjectApiKeyState, opts ...ResourceOption) (*ProjectApiKey, error)
public static ProjectApiKey Get(string name, Input<string> id, ProjectApiKeyState? state, CustomResourceOptions? opts = null)
public static ProjectApiKey get(String name, Output<String> id, ProjectApiKeyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
Description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
ProjectId string

UUID of the project where the API key is scoped to

ReadOnly bool

Flag indicating whether the API key shoud be read-only

Token string

API token which can be used in Equinix Metal API clients

Description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
ProjectId string

UUID of the project where the API key is scoped to

ReadOnly bool

Flag indicating whether the API key shoud be read-only

Token string

API token which can be used in Equinix Metal API clients

description String

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId String

UUID of the project where the API key is scoped to

readOnly Boolean

Flag indicating whether the API key shoud be read-only

token String

API token which can be used in Equinix Metal API clients

description string

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId string

UUID of the project where the API key is scoped to

readOnly boolean

Flag indicating whether the API key shoud be read-only

token string

API token which can be used in Equinix Metal API clients

description str

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
project_id str

UUID of the project where the API key is scoped to

read_only bool

Flag indicating whether the API key shoud be read-only

token str

API token which can be used in Equinix Metal API clients

description String

Description string for the Project API Key resource

  • read-only - Flag indicating whether the API key shoud be read-only
projectId String

UUID of the project where the API key is scoped to

readOnly Boolean

Flag indicating whether the API key shoud be read-only

token String

API token which can be used in Equinix Metal API clients

Package Details

Repository
Equinix Metal pulumi/pulumi-equinix-metal
License
Apache-2.0
Notes

This Pulumi package is based on the metal Terraform Provider.