1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apihub
  5. ApiHubInstance
Google Cloud v8.25.1 published on Wednesday, Apr 9, 2025 by Pulumi

gcp.apihub.ApiHubInstance

Explore with Pulumi AI

An ApiHubInstance represents the instance resources of the API Hub. Currently, only one ApiHub instance is allowed for each project. Currently, updation/deletion of ApiHub instance is not allowed.

Example Usage

Apihub Api Hub Instance Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const apihub_instance_without_search = new gcp.apihub.ApiHubInstance("apihub-instance-without-search", {
    location: "us-central1",
    config: {
        disableSearch: true,
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

apihub_instance_without_search = gcp.apihub.ApiHubInstance("apihub-instance-without-search",
    location="us-central1",
    config={
        "disable_search": True,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/apihub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apihub.NewApiHubInstance(ctx, "apihub-instance-without-search", &apihub.ApiHubInstanceArgs{
			Location: pulumi.String("us-central1"),
			Config: &apihub.ApiHubInstanceConfigArgs{
				DisableSearch: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var apihub_instance_without_search = new Gcp.ApiHub.ApiHubInstance("apihub-instance-without-search", new()
    {
        Location = "us-central1",
        Config = new Gcp.ApiHub.Inputs.ApiHubInstanceConfigArgs
        {
            DisableSearch = true,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apihub.ApiHubInstance;
import com.pulumi.gcp.apihub.ApiHubInstanceArgs;
import com.pulumi.gcp.apihub.inputs.ApiHubInstanceConfigArgs;
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 apihub_instance_without_search = new ApiHubInstance("apihub-instance-without-search", ApiHubInstanceArgs.builder()
            .location("us-central1")
            .config(ApiHubInstanceConfigArgs.builder()
                .disableSearch(true)
                .build())
            .build());

    }
}
Copy
resources:
  apihub-instance-without-search:
    type: gcp:apihub:ApiHubInstance
    properties:
      location: us-central1
      config:
        disableSearch: true
Copy

Apihub Api Hub Instance Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const apihub_instance_search = new gcp.apihub.ApiHubInstance("apihub-instance-search", {
    project: "my-project",
    apiHubInstanceId: "test-instance-full",
    description: "Test API hub instance",
    location: "us-central1",
    config: {
        encryptionType: "CMEK",
        cmekKeyName: "projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key",
        disableSearch: false,
        vertexLocation: "us",
    },
    labels: {
        environment: "dev",
    },
});
Copy
import pulumi
import pulumi_gcp as gcp

apihub_instance_search = gcp.apihub.ApiHubInstance("apihub-instance-search",
    project="my-project",
    api_hub_instance_id="test-instance-full",
    description="Test API hub instance",
    location="us-central1",
    config={
        "encryption_type": "CMEK",
        "cmek_key_name": "projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key",
        "disable_search": False,
        "vertex_location": "us",
    },
    labels={
        "environment": "dev",
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/apihub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := apihub.NewApiHubInstance(ctx, "apihub-instance-search", &apihub.ApiHubInstanceArgs{
			Project:          pulumi.String("my-project"),
			ApiHubInstanceId: pulumi.String("test-instance-full"),
			Description:      pulumi.String("Test API hub instance"),
			Location:         pulumi.String("us-central1"),
			Config: &apihub.ApiHubInstanceConfigArgs{
				EncryptionType: pulumi.String("CMEK"),
				CmekKeyName:    pulumi.String("projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key"),
				DisableSearch:  pulumi.Bool(false),
				VertexLocation: pulumi.String("us"),
			},
			Labels: pulumi.StringMap{
				"environment": pulumi.String("dev"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var apihub_instance_search = new Gcp.ApiHub.ApiHubInstance("apihub-instance-search", new()
    {
        Project = "my-project",
        ApiHubInstanceId = "test-instance-full",
        Description = "Test API hub instance",
        Location = "us-central1",
        Config = new Gcp.ApiHub.Inputs.ApiHubInstanceConfigArgs
        {
            EncryptionType = "CMEK",
            CmekKeyName = "projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key",
            DisableSearch = false,
            VertexLocation = "us",
        },
        Labels = 
        {
            { "environment", "dev" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apihub.ApiHubInstance;
import com.pulumi.gcp.apihub.ApiHubInstanceArgs;
import com.pulumi.gcp.apihub.inputs.ApiHubInstanceConfigArgs;
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 apihub_instance_search = new ApiHubInstance("apihub-instance-search", ApiHubInstanceArgs.builder()
            .project("my-project")
            .apiHubInstanceId("test-instance-full")
            .description("Test API hub instance")
            .location("us-central1")
            .config(ApiHubInstanceConfigArgs.builder()
                .encryptionType("CMEK")
                .cmekKeyName("projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key")
                .disableSearch(false)
                .vertexLocation("us")
                .build())
            .labels(Map.of("environment", "dev"))
            .build());

    }
}
Copy
resources:
  apihub-instance-search:
    type: gcp:apihub:ApiHubInstance
    properties:
      project: my-project
      apiHubInstanceId: test-instance-full
      description: Test API hub instance
      location: us-central1
      config:
        encryptionType: CMEK
        cmekKeyName: projects/my-project/locations/us-central1/keyRings/apihub/cryptoKeys/apihub-key
        disableSearch: false
        vertexLocation: us
      labels:
        environment: dev
Copy

Create ApiHubInstance Resource

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

Constructor syntax

new ApiHubInstance(name: string, args: ApiHubInstanceArgs, opts?: CustomResourceOptions);
@overload
def ApiHubInstance(resource_name: str,
                   args: ApiHubInstanceArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ApiHubInstance(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   config: Optional[ApiHubInstanceConfigArgs] = None,
                   location: Optional[str] = None,
                   api_hub_instance_id: Optional[str] = None,
                   description: Optional[str] = None,
                   labels: Optional[Mapping[str, str]] = None,
                   project: Optional[str] = None)
func NewApiHubInstance(ctx *Context, name string, args ApiHubInstanceArgs, opts ...ResourceOption) (*ApiHubInstance, error)
public ApiHubInstance(string name, ApiHubInstanceArgs args, CustomResourceOptions? opts = null)
public ApiHubInstance(String name, ApiHubInstanceArgs args)
public ApiHubInstance(String name, ApiHubInstanceArgs args, CustomResourceOptions options)
type: gcp:apihub:ApiHubInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ApiHubInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ApiHubInstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ApiHubInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ApiHubInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApiHubInstanceArgs
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 apiHubInstanceResource = new Gcp.ApiHub.ApiHubInstance("apiHubInstanceResource", new()
{
    Config = new Gcp.ApiHub.Inputs.ApiHubInstanceConfigArgs
    {
        CmekKeyName = "string",
        DisableSearch = false,
        EncryptionType = "string",
        VertexLocation = "string",
    },
    Location = "string",
    ApiHubInstanceId = "string",
    Description = "string",
    Labels = 
    {
        { "string", "string" },
    },
    Project = "string",
});
Copy
example, err := apihub.NewApiHubInstance(ctx, "apiHubInstanceResource", &apihub.ApiHubInstanceArgs{
	Config: &apihub.ApiHubInstanceConfigArgs{
		CmekKeyName:    pulumi.String("string"),
		DisableSearch:  pulumi.Bool(false),
		EncryptionType: pulumi.String("string"),
		VertexLocation: pulumi.String("string"),
	},
	Location:         pulumi.String("string"),
	ApiHubInstanceId: pulumi.String("string"),
	Description:      pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Project: pulumi.String("string"),
})
Copy
var apiHubInstanceResource = new ApiHubInstance("apiHubInstanceResource", ApiHubInstanceArgs.builder()
    .config(ApiHubInstanceConfigArgs.builder()
        .cmekKeyName("string")
        .disableSearch(false)
        .encryptionType("string")
        .vertexLocation("string")
        .build())
    .location("string")
    .apiHubInstanceId("string")
    .description("string")
    .labels(Map.of("string", "string"))
    .project("string")
    .build());
Copy
api_hub_instance_resource = gcp.apihub.ApiHubInstance("apiHubInstanceResource",
    config={
        "cmek_key_name": "string",
        "disable_search": False,
        "encryption_type": "string",
        "vertex_location": "string",
    },
    location="string",
    api_hub_instance_id="string",
    description="string",
    labels={
        "string": "string",
    },
    project="string")
Copy
const apiHubInstanceResource = new gcp.apihub.ApiHubInstance("apiHubInstanceResource", {
    config: {
        cmekKeyName: "string",
        disableSearch: false,
        encryptionType: "string",
        vertexLocation: "string",
    },
    location: "string",
    apiHubInstanceId: "string",
    description: "string",
    labels: {
        string: "string",
    },
    project: "string",
});
Copy
type: gcp:apihub:ApiHubInstance
properties:
    apiHubInstanceId: string
    config:
        cmekKeyName: string
        disableSearch: false
        encryptionType: string
        vertexLocation: string
    description: string
    labels:
        string: string
    location: string
    project: string
Copy

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

Config
This property is required.
Changes to this property will trigger replacement.
ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
Location
This property is required.
Changes to this property will trigger replacement.
string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
ApiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
Description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
Labels Dictionary<string, string>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Project Changes to this property will trigger replacement. string
Config
This property is required.
Changes to this property will trigger replacement.
ApiHubInstanceConfigArgs
Available configurations to provision an ApiHub Instance. Structure is documented below.
Location
This property is required.
Changes to this property will trigger replacement.
string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
ApiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
Description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
Labels map[string]string
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Project Changes to this property will trigger replacement. string
config
This property is required.
Changes to this property will trigger replacement.
ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
String
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
apiHubInstanceId Changes to this property will trigger replacement. String
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
description Changes to this property will trigger replacement. String
Optional. Description of the ApiHub instance.
labels Map<String,String>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
project Changes to this property will trigger replacement. String
config
This property is required.
Changes to this property will trigger replacement.
ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
apiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
labels {[key: string]: string}
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
project Changes to this property will trigger replacement. string
config
This property is required.
Changes to this property will trigger replacement.
ApiHubInstanceConfigArgs
Available configurations to provision an ApiHub Instance. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
str
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
api_hub_instance_id Changes to this property will trigger replacement. str
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
description Changes to this property will trigger replacement. str
Optional. Description of the ApiHub instance.
labels Mapping[str, str]
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
project Changes to this property will trigger replacement. str
config
This property is required.
Changes to this property will trigger replacement.
Property Map
Available configurations to provision an ApiHub Instance. Structure is documented below.
location
This property is required.
Changes to this property will trigger replacement.
String
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
apiHubInstanceId Changes to this property will trigger replacement. String
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
description Changes to this property will trigger replacement. String
Optional. Description of the ApiHub instance.
labels Map<String>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
project Changes to this property will trigger replacement. String

Outputs

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

CreateTime string
Output only. Creation timestamp.
EffectiveLabels Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
StateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
UpdateTime string
Output only. Last update timestamp.
CreateTime string
Output only. Creation timestamp.
EffectiveLabels map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
StateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
UpdateTime string
Output only. Last update timestamp.
createTime String
Output only. Creation timestamp.
effectiveLabels Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage String
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime String
Output only. Last update timestamp.
createTime string
Output only. Creation timestamp.
effectiveLabels {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id string
The provider-assigned unique ID for this managed resource.
name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
state string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime string
Output only. Last update timestamp.
create_time str
Output only. Creation timestamp.
effective_labels Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id str
The provider-assigned unique ID for this managed resource.
name str
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
state str
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
state_message str
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
update_time str
Output only. Last update timestamp.
createTime String
Output only. Creation timestamp.
effectiveLabels Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
id String
The provider-assigned unique ID for this managed resource.
name String
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage String
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime String
Output only. Last update timestamp.

Look up Existing ApiHubInstance Resource

Get an existing ApiHubInstance 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?: ApiHubInstanceState, opts?: CustomResourceOptions): ApiHubInstance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_hub_instance_id: Optional[str] = None,
        config: Optional[ApiHubInstanceConfigArgs] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        effective_labels: Optional[Mapping[str, str]] = None,
        labels: Optional[Mapping[str, str]] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        pulumi_labels: Optional[Mapping[str, str]] = None,
        state: Optional[str] = None,
        state_message: Optional[str] = None,
        update_time: Optional[str] = None) -> ApiHubInstance
func GetApiHubInstance(ctx *Context, name string, id IDInput, state *ApiHubInstanceState, opts ...ResourceOption) (*ApiHubInstance, error)
public static ApiHubInstance Get(string name, Input<string> id, ApiHubInstanceState? state, CustomResourceOptions? opts = null)
public static ApiHubInstance get(String name, Output<String> id, ApiHubInstanceState state, CustomResourceOptions options)
resources:  _:    type: gcp:apihub:ApiHubInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ApiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
Config Changes to this property will trigger replacement. ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
CreateTime string
Output only. Creation timestamp.
Description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
EffectiveLabels Changes to this property will trigger replacement. Dictionary<string, string>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Labels Dictionary<string, string>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
Name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
Project Changes to this property will trigger replacement. string
PulumiLabels Dictionary<string, string>
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
StateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
UpdateTime string
Output only. Last update timestamp.
ApiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
Config Changes to this property will trigger replacement. ApiHubInstanceConfigArgs
Available configurations to provision an ApiHub Instance. Structure is documented below.
CreateTime string
Output only. Creation timestamp.
Description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
EffectiveLabels Changes to this property will trigger replacement. map[string]string
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
Labels map[string]string
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
Location Changes to this property will trigger replacement. string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
Name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
Project Changes to this property will trigger replacement. string
PulumiLabels map[string]string
The combination of labels configured directly on the resource and default labels configured on the provider.
State string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
StateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
UpdateTime string
Output only. Last update timestamp.
apiHubInstanceId Changes to this property will trigger replacement. String
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
config Changes to this property will trigger replacement. ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
createTime String
Output only. Creation timestamp.
description Changes to this property will trigger replacement. String
Optional. Description of the ApiHub instance.
effectiveLabels Changes to this property will trigger replacement. Map<String,String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Map<String,String>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
name String
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String,String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage String
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime String
Output only. Last update timestamp.
apiHubInstanceId Changes to this property will trigger replacement. string
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
config Changes to this property will trigger replacement. ApiHubInstanceConfig
Available configurations to provision an ApiHub Instance. Structure is documented below.
createTime string
Output only. Creation timestamp.
description Changes to this property will trigger replacement. string
Optional. Description of the ApiHub instance.
effectiveLabels Changes to this property will trigger replacement. {[key: string]: string}
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels {[key: string]: string}
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
location Changes to this property will trigger replacement. string
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
name string
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
project Changes to this property will trigger replacement. string
pulumiLabels {[key: string]: string}
The combination of labels configured directly on the resource and default labels configured on the provider.
state string
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage string
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime string
Output only. Last update timestamp.
api_hub_instance_id Changes to this property will trigger replacement. str
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
config Changes to this property will trigger replacement. ApiHubInstanceConfigArgs
Available configurations to provision an ApiHub Instance. Structure is documented below.
create_time str
Output only. Creation timestamp.
description Changes to this property will trigger replacement. str
Optional. Description of the ApiHub instance.
effective_labels Changes to this property will trigger replacement. Mapping[str, str]
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Mapping[str, str]
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
location Changes to this property will trigger replacement. str
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
name str
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
project Changes to this property will trigger replacement. str
pulumi_labels Mapping[str, str]
The combination of labels configured directly on the resource and default labels configured on the provider.
state str
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
state_message str
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
update_time str
Output only. Last update timestamp.
apiHubInstanceId Changes to this property will trigger replacement. String
Optional. Identifier to assign to the Api Hub instance. Must be unique within scope of the parent resource. If the field is not provided, system generated id will be used. This value should be 4-40 characters, and valid characters are '/a-z[0-9]-_/'.
config Changes to this property will trigger replacement. Property Map
Available configurations to provision an ApiHub Instance. Structure is documented below.
createTime String
Output only. Creation timestamp.
description Changes to this property will trigger replacement. String
Optional. Description of the ApiHub instance.
effectiveLabels Changes to this property will trigger replacement. Map<String>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
labels Map<String>
Optional. Instance labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
location Changes to this property will trigger replacement. String
Resource ID segment making up resource name. It identifies the resource within its parent collection as described in https://google.aip.dev/122.
name String
Identifier. Format: projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}.
project Changes to this property will trigger replacement. String
pulumiLabels Map<String>
The combination of labels configured directly on the resource and default labels configured on the provider.
state String
Output only. The current state of the ApiHub instance. Possible values: STATE_UNSPECIFIED INACTIVE CREATING ACTIVE UPDATING DELETING FAILED
stateMessage String
Output only. Extra information about ApiHub instance state. Currently the message would be populated when state is FAILED.
updateTime String
Output only. Last update timestamp.

Supporting Types

ApiHubInstanceConfig
, ApiHubInstanceConfigArgs

CmekKeyName Changes to this property will trigger replacement. string
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
DisableSearch Changes to this property will trigger replacement. bool
Optional. If true, the search will be disabled for the instance. The default value is false.
EncryptionType Changes to this property will trigger replacement. string
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
VertexLocation Changes to this property will trigger replacement. string
Optional. The name of the Vertex AI location where the data store is stored.


CmekKeyName Changes to this property will trigger replacement. string
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
DisableSearch Changes to this property will trigger replacement. bool
Optional. If true, the search will be disabled for the instance. The default value is false.
EncryptionType Changes to this property will trigger replacement. string
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
VertexLocation Changes to this property will trigger replacement. string
Optional. The name of the Vertex AI location where the data store is stored.


cmekKeyName Changes to this property will trigger replacement. String
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
disableSearch Changes to this property will trigger replacement. Boolean
Optional. If true, the search will be disabled for the instance. The default value is false.
encryptionType Changes to this property will trigger replacement. String
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
vertexLocation Changes to this property will trigger replacement. String
Optional. The name of the Vertex AI location where the data store is stored.


cmekKeyName Changes to this property will trigger replacement. string
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
disableSearch Changes to this property will trigger replacement. boolean
Optional. If true, the search will be disabled for the instance. The default value is false.
encryptionType Changes to this property will trigger replacement. string
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
vertexLocation Changes to this property will trigger replacement. string
Optional. The name of the Vertex AI location where the data store is stored.


cmek_key_name Changes to this property will trigger replacement. str
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
disable_search Changes to this property will trigger replacement. bool
Optional. If true, the search will be disabled for the instance. The default value is false.
encryption_type Changes to this property will trigger replacement. str
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
vertex_location Changes to this property will trigger replacement. str
Optional. The name of the Vertex AI location where the data store is stored.


cmekKeyName Changes to this property will trigger replacement. String
Optional. The Customer Managed Encryption Key (CMEK) used for data encryption. The CMEK name should follow the format of projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+), where the location must match the instance location. If the CMEK is not provided, a GMEK will be created for the instance.
disableSearch Changes to this property will trigger replacement. Boolean
Optional. If true, the search will be disabled for the instance. The default value is false.
encryptionType Changes to this property will trigger replacement. String
Optional. Encryption type for the region. If the encryption type is CMEK, the cmek_key_name must be provided. If no encryption type is provided, GMEK will be used. Possible values: ENCRYPTION_TYPE_UNSPECIFIED GMEK CMEK
vertexLocation Changes to this property will trigger replacement. String
Optional. The name of the Vertex AI location where the data store is stored.


Import

ApiHubInstance can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/apiHubInstances/{{api_hub_instance_id}}

  • {{project}}/{{location}}/{{api_hub_instance_id}}

  • {{location}}/{{api_hub_instance_id}}

When using the pulumi import command, ApiHubInstance can be imported using one of the formats above. For example:

$ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default projects/{{project}}/locations/{{location}}/apiHubInstances/{{api_hub_instance_id}}
Copy
$ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default {{project}}/{{location}}/{{api_hub_instance_id}}
Copy
$ pulumi import gcp:apihub/apiHubInstance:ApiHubInstance default {{location}}/{{api_hub_instance_id}}
Copy

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

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.