1. Registry
  2. Packages
  3. Google Cloud Native
  4. API Docs
  5. apigateway
  6. apigateway/v1
  7. Api

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for Google Cloud Native v0.32.0
published on Wednesday, Nov 29, 2023 by Pulumi
google-native logo Google Cloud Native

This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

Viewing docs for Google Cloud Native v0.32.0
published on Wednesday, Nov 29, 2023 by Pulumi

    Creates a new Api in a given project and location. Auto-naming is currently not supported for this resource.

    Create Api Resource

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

    Constructor syntax

    new Api(name: string, args: ApiArgs, opts?: CustomResourceOptions);
    @overload
    def Api(resource_name: str,
            args: ApiArgs,
            opts: Optional[ResourceOptions] = None)
    
    @overload
    def Api(resource_name: str,
            opts: Optional[ResourceOptions] = None,
            api_id: Optional[str] = None,
            display_name: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            location: Optional[str] = None,
            managed_service: Optional[str] = None,
            project: Optional[str] = None)
    func NewApi(ctx *Context, name string, args ApiArgs, opts ...ResourceOption) (*Api, error)
    public Api(string name, ApiArgs args, CustomResourceOptions? opts = null)
    public Api(String name, ApiArgs args)
    public Api(String name, ApiArgs args, CustomResourceOptions options)
    
    type: google-native:apigateway/v1:Api
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "google-native_apigateway_v1_api" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ApiArgs
    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 ApiArgs
    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 ApiArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiArgs
    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 apiResource = new GoogleNative.APIGateway.V1.Api("apiResource", new()
    {
        ApiId = "string",
        DisplayName = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Location = "string",
        ManagedService = "string",
        Project = "string",
    });
    
    example, err := apigateway.NewApi(ctx, "apiResource", &apigateway.ApiArgs{
    	ApiId:       pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Location:       pulumi.String("string"),
    	ManagedService: pulumi.String("string"),
    	Project:        pulumi.String("string"),
    })
    
    resource "google-native_apigateway_v1_api" "apiResource" {
      lifecycle {
        create_before_destroy = true
      }
      api_id       = "string"
      display_name = "string"
      labels = {
        "string" = "string"
      }
      location        = "string"
      managed_service = "string"
      project         = "string"
    }
    
    var apiResource = new com.pulumi.googlenative.apigateway_v1.Api("apiResource", com.pulumi.googlenative.apigateway_v1.ApiArgs.builder()
        .apiId("string")
        .displayName("string")
        .labels(Map.of("string", "string"))
        .location("string")
        .managedService("string")
        .project("string")
        .build());
    
    api_resource = google_native.apigateway.v1.Api("apiResource",
        api_id="string",
        display_name="string",
        labels={
            "string": "string",
        },
        location="string",
        managed_service="string",
        project="string")
    
    const apiResource = new google_native.apigateway.v1.Api("apiResource", {
        apiId: "string",
        displayName: "string",
        labels: {
            string: "string",
        },
        location: "string",
        managedService: "string",
        project: "string",
    });
    
    type: google-native:apigateway/v1:Api
    properties:
        apiId: string
        displayName: string
        labels:
            string: string
        location: string
        managedService: string
        project: string
    

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

    ApiId string
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    DisplayName string
    Optional. Display name.
    Labels Dictionary<string, string>
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    Location string
    ManagedService string
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    Project string
    ApiId string
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    DisplayName string
    Optional. Display name.
    Labels map[string]string
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    Location string
    ManagedService string
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    Project string
    api_id string
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    display_name string
    Optional. Display name.
    labels map(string)
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    location string
    managed_service string
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    project string
    apiId String
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    displayName String
    Optional. Display name.
    labels Map<String,String>
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    location String
    managedService String
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    project String
    apiId string
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    displayName string
    Optional. Display name.
    labels {[key: string]: string}
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    location string
    managedService string
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    project string
    api_id str
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    display_name str
    Optional. Display name.
    labels Mapping[str, str]
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    location str
    managed_service str
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    project str
    apiId String
    Required. Identifier to assign to the API. Must be unique within scope of the parent resource.
    displayName String
    Optional. Display name.
    labels Map<String>
    Optional. Resource labels to represent user-provided metadata. Refer to cloud documentation on labels for more details. https://cloud.google.com/compute/docs/labeling-resources
    location String
    managedService String
    Optional. Immutable. The name of a Google Managed Service ( https://cloud.google.com/service-infrastructure/docs/glossary#managed). If not specified, a new Service will automatically be created in the same project as this API.
    project String

    Outputs

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

    CreateTime string
    Created time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    State string
    State of the API.
    UpdateTime string
    Updated time.
    CreateTime string
    Created time.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    State string
    State of the API.
    UpdateTime string
    Updated time.
    create_time string
    Created time.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    state string
    State of the API.
    update_time string
    Updated time.
    createTime String
    Created time.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    state String
    State of the API.
    updateTime String
    Updated time.
    createTime string
    Created time.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    state string
    State of the API.
    updateTime string
    Updated time.
    create_time str
    Created time.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    state str
    State of the API.
    update_time str
    Updated time.
    createTime String
    Created time.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name of the API. Format: projects/{project}/locations/global/apis/{api}
    state String
    State of the API.
    updateTime String
    Updated time.

    Look up Existing Api Resource

    Get an existing Api 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>, opts?: CustomResourceOptions): Api
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None) -> Api
    func GetApi(ctx *Context, name string, id IDInput, state *ApiState, opts ...ResourceOption) (*Api, error)
    public static Api Get(string name, Input<string> id, CustomResourceOptions? opts = null)
    public static Api get(String name, Output<String> id, CustomResourceOptions options)
    resources:  existingApi:    type: google-native:apigateway/v1:Api    get:      id: ${id}
    import {
      to = google-native_apigateway_v1_api.example
      id = "${id}"
    }
    
    name string
    The unique name of the resulting resource.
    id Input<ID>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resulting resource.
    id str
    The unique provider ID of the resource to look up.
    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 resulting resource.
    id IDInput
    The unique provider ID of the resource to look up.
    state ApiState
    Pass nil. This resource has no state arguments.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resulting resource.
    id Input<string>
    The unique provider ID of the resource to look up.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resulting resource.
    id Output<String>
    The unique provider ID of the resource to look up.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Package Details

    Repository
    Google Cloud Native pulumi/pulumi-google-native
    License
    Apache-2.0
    google-native logo Google Cloud Native

    This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.

    Viewing docs for Google Cloud Native v0.32.0
    published on Wednesday, Nov 29, 2023 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial