Show / Hide Table of Contents

Class GetResource

Inheritance
System.Object
GetResource
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public static class GetResource

Methods

View Source

InvokeAsync(GetResourceArgs, InvokeOptions)

Use this data source to get the id of a Resource in API Gateway. To fetch the Resource, you must provide the REST API id as well as the full path.

{{% examples %}}

Example Usage

{{% example %}}

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var myRestApi = Output.Create(Aws.ApiGateway.GetRestApi.InvokeAsync(new Aws.ApiGateway.GetRestApiArgs
    {
        Name = "my-rest-api",
    }));
    var myResource = myRestApi.Apply(myRestApi => Output.Create(Aws.ApiGateway.GetResource.InvokeAsync(new Aws.ApiGateway.GetResourceArgs
    {
        Path = "/endpoint/path",
        RestApiId = myRestApi.Id,
    })));
}

}

{{% /example %}} {{% /examples %}}

Declaration
public static Task<GetResourceResult> InvokeAsync(GetResourceArgs args, InvokeOptions options = null)
Parameters
Type Name Description
GetResourceArgs args
InvokeOptions options
Returns
Type Description
System.Threading.Tasks.Task<GetResourceResult>
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.