datadog.OpenapiApi
Explore with Pulumi AI
Provides a Datadog OpenAPI resource. This can be used to synchronize Datadog’s API catalog with an OpenAPI specifications file.
Create OpenapiApi Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OpenapiApi(name: string, args: OpenapiApiArgs, opts?: CustomResourceOptions);
@overload
def OpenapiApi(resource_name: str,
args: OpenapiApiArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OpenapiApi(resource_name: str,
opts: Optional[ResourceOptions] = None,
spec: Optional[str] = None)
func NewOpenapiApi(ctx *Context, name string, args OpenapiApiArgs, opts ...ResourceOption) (*OpenapiApi, error)
public OpenapiApi(string name, OpenapiApiArgs args, CustomResourceOptions? opts = null)
public OpenapiApi(String name, OpenapiApiArgs args)
public OpenapiApi(String name, OpenapiApiArgs args, CustomResourceOptions options)
type: datadog:OpenapiApi
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OpenapiApiArgs
- 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 OpenapiApiArgs
- 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 OpenapiApiArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OpenapiApiArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OpenapiApiArgs
- 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 openapiApiResource = new Datadog.OpenapiApi("openapiApiResource", new()
{
Spec = "string",
});
example, err := datadog.NewOpenapiApi(ctx, "openapiApiResource", &datadog.OpenapiApiArgs{
Spec: pulumi.String("string"),
})
var openapiApiResource = new OpenapiApi("openapiApiResource", OpenapiApiArgs.builder()
.spec("string")
.build());
openapi_api_resource = datadog.OpenapiApi("openapiApiResource", spec="string")
const openapiApiResource = new datadog.OpenapiApi("openapiApiResource", {spec: "string"});
type: datadog:OpenapiApi
properties:
spec: string
OpenapiApi 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 OpenapiApi resource accepts the following input properties:
- Spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- Spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec String
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec str
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec String
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
Outputs
All input properties are implicitly available as output properties. Additionally, the OpenapiApi resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing OpenapiApi Resource
Get an existing OpenapiApi 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?: OpenapiApiState, opts?: CustomResourceOptions): OpenapiApi
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
spec: Optional[str] = None) -> OpenapiApi
func GetOpenapiApi(ctx *Context, name string, id IDInput, state *OpenapiApiState, opts ...ResourceOption) (*OpenapiApi, error)
public static OpenapiApi Get(string name, Input<string> id, OpenapiApiState? state, CustomResourceOptions? opts = null)
public static OpenapiApi get(String name, Output<String> id, OpenapiApiState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- Spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec String
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec string
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec str
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
- spec String
- The textual content of the OpenAPI specification. Use
file()
in order to reference another file in the repository (see exmaple).
Import
$ pulumi import datadog:index/openapiApi:OpenapiApi new_list "90646597-5fdb-4a17-a240-647003f8c028"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadog
Terraform Provider.