DocumentationPart
Provides a settings of an API Gateway Documentation Part.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var exampleRestApi = new Aws.ApiGateway.RestApi("exampleRestApi", new Aws.ApiGateway.RestApiArgs
{
});
var exampleDocumentationPart = new Aws.ApiGateway.DocumentationPart("exampleDocumentationPart", new Aws.ApiGateway.DocumentationPartArgs
{
Location = new Aws.ApiGateway.Inputs.DocumentationPartLocationArgs
{
Method = "GET",
Path = "/example",
Type = "METHOD",
},
Properties = "{\"description\":\"Example description\"}",
RestApiId = exampleRestApi.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/apigateway"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleRestApi, err := apigateway.NewRestApi(ctx, "exampleRestApi", nil)
if err != nil {
return err
}
_, err = apigateway.NewDocumentationPart(ctx, "exampleDocumentationPart", &apigateway.DocumentationPartArgs{
Location: &apigateway.DocumentationPartLocationArgs{
Method: pulumi.String("GET"),
Path: pulumi.String("/example"),
Type: pulumi.String("METHOD"),
},
Properties: pulumi.String("{\"description\":\"Example description\"}"),
RestApiId: exampleRestApi.ID(),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example_rest_api = aws.apigateway.RestApi("exampleRestApi")
example_documentation_part = aws.apigateway.DocumentationPart("exampleDocumentationPart",
location={
"method": "GET",
"path": "/example",
"type": "METHOD",
},
properties="{\"description\":\"Example description\"}",
rest_api_id=example_rest_api.id)import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleRestApi = new aws.apigateway.RestApi("example", {});
const exampleDocumentationPart = new aws.apigateway.DocumentationPart("example", {
location: {
method: "GET",
path: "/example",
type: "METHOD",
},
properties: "{\"description\":\"Example description\"}",
restApiId: exampleRestApi.id,
});Create a DocumentationPart Resource
new DocumentationPart(name: string, args: DocumentationPartArgs, opts?: CustomResourceOptions);def DocumentationPart(resource_name, opts=None, location=None, properties=None, rest_api_id=None, __props__=None);func NewDocumentationPart(ctx *Context, name string, args DocumentationPartArgs, opts ...ResourceOption) (*DocumentationPart, error)public DocumentationPart(string name, DocumentationPartArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args DocumentationPartArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DocumentationPartArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DocumentationPartArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
DocumentationPart Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The DocumentationPart resource accepts the following input properties:
- Location
Documentation
Part Location Args The location of the targeted API entity of the to-be-created documentation part. See below.
- Properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- Rest
Api stringId The ID of the associated Rest API
- Location
Documentation
Part Location The location of the targeted API entity of the to-be-created documentation part. See below.
- Properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- Rest
Api stringId The ID of the associated Rest API
- location
Documentation
Part Location The location of the targeted API entity of the to-be-created documentation part. See below.
- properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- rest
Api stringId The ID of the associated Rest API
- location
Dict[Documentation
Part Location] The location of the targeted API entity of the to-be-created documentation part. See below.
- properties str
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- rest_
api_ strid The ID of the associated Rest API
Outputs
All input properties are implicitly available as output properties. Additionally, the DocumentationPart resource produces the following output properties:
Look up an Existing DocumentationPart Resource
Get an existing DocumentationPart 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?: DocumentationPartState, opts?: CustomResourceOptions): DocumentationPartstatic get(resource_name, id, opts=None, location=None, properties=None, rest_api_id=None, __props__=None);func GetDocumentationPart(ctx *Context, name string, id IDInput, state *DocumentationPartState, opts ...ResourceOption) (*DocumentationPart, error)public static DocumentationPart Get(string name, Input<string> id, DocumentationPartState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Location
Documentation
Part Location Args The location of the targeted API entity of the to-be-created documentation part. See below.
- Properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- Rest
Api stringId The ID of the associated Rest API
- Location
Documentation
Part Location The location of the targeted API entity of the to-be-created documentation part. See below.
- Properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- Rest
Api stringId The ID of the associated Rest API
- location
Documentation
Part Location The location of the targeted API entity of the to-be-created documentation part. See below.
- properties string
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- rest
Api stringId The ID of the associated Rest API
- location
Dict[Documentation
Part Location] The location of the targeted API entity of the to-be-created documentation part. See below.
- properties str
A content map of API-specific key-value pairs describing the targeted API entity. The map must be encoded as a JSON string, e.g., “{ \“description\”: \“The API does …\” }“. Only Swagger-compliant key-value pairs can be exported and, hence, published.
- rest_
api_ strid The ID of the associated Rest API
Supporting Types
DocumentationPartLocation
- Type string
The type of API entity to which the documentation content applies. e.g.
API,METHODorREQUEST_BODY- Method string
The HTTP verb of a method. The default value is
*for any method.- Name string
The name of the targeted API entity.
- Path string
The URL path of the target. The default value is
/for the root resource.- Status
Code string The HTTP status code of a response. The default value is
*for any status code.
- Type string
The type of API entity to which the documentation content applies. e.g.
API,METHODorREQUEST_BODY- Method string
The HTTP verb of a method. The default value is
*for any method.- Name string
The name of the targeted API entity.
- Path string
The URL path of the target. The default value is
/for the root resource.- Status
Code string The HTTP status code of a response. The default value is
*for any status code.
- type string
The type of API entity to which the documentation content applies. e.g.
API,METHODorREQUEST_BODY- method string
The HTTP verb of a method. The default value is
*for any method.- name string
The name of the targeted API entity.
- path string
The URL path of the target. The default value is
/for the root resource.- status
Code string The HTTP status code of a response. The default value is
*for any status code.
- type str
The type of API entity to which the documentation content applies. e.g.
API,METHODorREQUEST_BODY- method str
The HTTP verb of a method. The default value is
*for any method.- name str
The name of the targeted API entity.
- path str
The URL path of the target. The default value is
/for the root resource.- status_
code str The HTTP status code of a response. The default value is
*for any status code.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.