1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ApiGateway
  5. getApis
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.ApiGateway.getApis

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of Apis in Oracle Cloud Infrastructure API Gateway service.

    Returns a list of APIs.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testApis = oci.ApiGateway.getApis({
        compartmentId: _var.compartment_id,
        displayName: _var.api_display_name,
        state: _var.api_state,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_apis = oci.ApiGateway.get_apis(compartment_id=var["compartment_id"],
        display_name=var["api_display_name"],
        state=var["api_state"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/ApiGateway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ApiGateway.GetApis(ctx, &apigateway.GetApisArgs{
    			CompartmentId: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Api_display_name),
    			State:         pulumi.StringRef(_var.Api_state),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testApis = Oci.ApiGateway.GetApis.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Api_display_name,
            State = @var.Api_state,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.ApiGateway.ApiGatewayFunctions;
    import com.pulumi.oci.ApiGateway.inputs.GetApisArgs;
    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) {
            final var testApis = ApiGatewayFunctions.getApis(GetApisArgs.builder()
                .compartmentId(var_.compartment_id())
                .displayName(var_.api_display_name())
                .state(var_.api_state())
                .build());
    
        }
    }
    
    variables:
      testApis:
        fn::invoke:
          Function: oci:ApiGateway:getApis
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.api_display_name}
            state: ${var.api_state}
    

    Using getApis

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getApis(args: GetApisArgs, opts?: InvokeOptions): Promise<GetApisResult>
    function getApisOutput(args: GetApisOutputArgs, opts?: InvokeOptions): Output<GetApisResult>
    def get_apis(compartment_id: Optional[str] = None,
                 display_name: Optional[str] = None,
                 filters: Optional[Sequence[_apigateway.GetApisFilter]] = None,
                 state: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetApisResult
    def get_apis_output(compartment_id: Optional[pulumi.Input[str]] = None,
                 display_name: Optional[pulumi.Input[str]] = None,
                 filters: Optional[pulumi.Input[Sequence[pulumi.Input[_apigateway.GetApisFilterArgs]]]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetApisResult]
    func GetApis(ctx *Context, args *GetApisArgs, opts ...InvokeOption) (*GetApisResult, error)
    func GetApisOutput(ctx *Context, args *GetApisOutputArgs, opts ...InvokeOption) GetApisResultOutput

    > Note: This function is named GetApis in the Go SDK.

    public static class GetApis 
    {
        public static Task<GetApisResult> InvokeAsync(GetApisArgs args, InvokeOptions? opts = null)
        public static Output<GetApisResult> Invoke(GetApisInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApisResult> getApis(GetApisArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ApiGateway/getApis:getApis
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The ocid of the compartment in which to list resources.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    Filters List<GetApisFilter>
    State string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    CompartmentId string
    The ocid of the compartment in which to list resources.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    Filters []GetApisFilter
    State string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    compartmentId String
    The ocid of the compartment in which to list resources.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    filters List<GetApisFilter>
    state String
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    compartmentId string
    The ocid of the compartment in which to list resources.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    filters GetApisFilter[]
    state string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    compartment_id str
    The ocid of the compartment in which to list resources.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    filters Sequence[apigateway.GetApisFilter]
    state str
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    compartmentId String
    The ocid of the compartment in which to list resources.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    filters List<Property Map>
    state String
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE

    getApis Result

    The following output properties are available:

    ApiCollections List<GetApisApiCollection>
    The list of api_collection.
    CompartmentId string
    The OCID of the compartment in which the resource is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    Filters List<GetApisFilter>
    State string
    The current state of the API.
    ApiCollections []GetApisApiCollection
    The list of api_collection.
    CompartmentId string
    The OCID of the compartment in which the resource is created.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    Filters []GetApisFilter
    State string
    The current state of the API.
    apiCollections List<GetApisApiCollection>
    The list of api_collection.
    compartmentId String
    The OCID of the compartment in which the resource is created.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters List<GetApisFilter>
    state String
    The current state of the API.
    apiCollections GetApisApiCollection[]
    The list of api_collection.
    compartmentId string
    The OCID of the compartment in which the resource is created.
    id string
    The provider-assigned unique ID for this managed resource.
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters GetApisFilter[]
    state string
    The current state of the API.
    api_collections Sequence[apigateway.GetApisApiCollection]
    The list of api_collection.
    compartment_id str
    The OCID of the compartment in which the resource is created.
    id str
    The provider-assigned unique ID for this managed resource.
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters Sequence[apigateway.GetApisFilter]
    state str
    The current state of the API.
    apiCollections List<Property Map>
    The list of api_collection.
    compartmentId String
    The OCID of the compartment in which the resource is created.
    id String
    The provider-assigned unique ID for this managed resource.
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
    filters List<Property Map>
    state String
    The current state of the API.

    Supporting Types

    GetApisApiCollection

    GetApisApiCollectionItem

    CompartmentId string
    The ocid of the compartment in which to list resources.
    Content string
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the resource.
    LifecycleDetails string
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    SpecificationType string
    Type of API Specification file.
    State string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    TimeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    ValidationResults List<GetApisApiCollectionItemValidationResult>
    Status of each feature available from the API.
    CompartmentId string
    The ocid of the compartment in which to list resources.
    Content string
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the resource.
    LifecycleDetails string
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    SpecificationType string
    Type of API Specification file.
    State string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    TimeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    TimeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    ValidationResults []GetApisApiCollectionItemValidationResult
    Status of each feature available from the API.
    compartmentId String
    The ocid of the compartment in which to list resources.
    content String
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the resource.
    lifecycleDetails String
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    specificationType String
    Type of API Specification file.
    state String
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    timeCreated String
    The time this resource was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time this resource was last updated. An RFC3339 formatted datetime string.
    validationResults List<GetApisApiCollectionItemValidationResult>
    Status of each feature available from the API.
    compartmentId string
    The ocid of the compartment in which to list resources.
    content string
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of the resource.
    lifecycleDetails string
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    specificationType string
    Type of API Specification file.
    state string
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    timeCreated string
    The time this resource was created. An RFC3339 formatted datetime string.
    timeUpdated string
    The time this resource was last updated. An RFC3339 formatted datetime string.
    validationResults GetApisApiCollectionItemValidationResult[]
    Status of each feature available from the API.
    compartment_id str
    The ocid of the compartment in which to list resources.
    content str
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of the resource.
    lifecycle_details str
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    specification_type str
    Type of API Specification file.
    state str
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    time_created str
    The time this resource was created. An RFC3339 formatted datetime string.
    time_updated str
    The time this resource was last updated. An RFC3339 formatted datetime string.
    validation_results Sequence[apigateway.GetApisApiCollectionItemValidationResult]
    Status of each feature available from the API.
    compartmentId String
    The ocid of the compartment in which to list resources.
    content String
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Example: My new resource
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the resource.
    lifecycleDetails String
    A message describing the current lifecycleState in more detail. For ACTIVE state it describes if the document has been validated and the possible values are:

    • 'New' for just updated API Specifications
    • 'Validating' for a document which is being validated.
    • 'Valid' the document has been validated without any errors or warnings
    • 'Warning' the document has been validated and contains warnings
    • 'Error' the document has been validated and contains errors
    • 'Failed' the document validation failed
    • 'Canceled' the document validation was canceled
    specificationType String
    Type of API Specification file.
    state String
    A filter to return only resources that match the given lifecycle state. Example: ACTIVE
    timeCreated String
    The time this resource was created. An RFC3339 formatted datetime string.
    timeUpdated String
    The time this resource was last updated. An RFC3339 formatted datetime string.
    validationResults List<Property Map>
    Status of each feature available from the API.

    GetApisApiCollectionItemValidationResult

    Name string
    Name of the validation.
    Result string
    Result of the validation.
    Name string
    Name of the validation.
    Result string
    Result of the validation.
    name String
    Name of the validation.
    result String
    Result of the validation.
    name string
    Name of the validation.
    result string
    Result of the validation.
    name str
    Name of the validation.
    result str
    Result of the validation.
    name String
    Name of the validation.
    result String
    Result of the validation.

    GetApisFilter

    Name string
    Name of the validation.
    Values List<string>
    Regex bool
    Name string
    Name of the validation.
    Values []string
    Regex bool
    name String
    Name of the validation.
    values List<String>
    regex Boolean
    name string
    Name of the validation.
    values string[]
    regex boolean
    name str
    Name of the validation.
    values Sequence[str]
    regex bool
    name String
    Name of the validation.
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi