Skip to content

Commit

Permalink
Generate SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrbradley committed Nov 22, 2023
1 parent 04851f3 commit 9f01449
Show file tree
Hide file tree
Showing 29 changed files with 5,326 additions and 0 deletions.
247 changes: 247 additions & 0 deletions sdk/dotnet/Apigatewayv2/HttpApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
// *** WARNING: this file was generated by pulumi-gen-awsx. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.Awsx.Apigatewayv2
{
/// <summary>
/// Creates an HTTP API with associated sub-resources.
/// </summary>
[AwsxResourceType("awsx:apigatewayv2:HttpApi")]
public partial class HttpApi : global::Pulumi.CustomResource
{
/// <summary>
/// The underlying API resource.
/// </summary>
[Output("api")]
public Output<Pulumi.Aws.ApiGatewayV2.Api> Api { get; private set; } = null!;

/// <summary>
/// The API mappings for the HTTP API.
/// </summary>
[Output("apiMappings")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.ApiMapping>> ApiMappings { get; private set; } = null!;

/// <summary>
/// The authorizers for the HTTP API routes.
/// </summary>
[Output("authorizers")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.Authorizer>> Authorizers { get; private set; } = null!;

/// <summary>
/// The deployment for the HTTP API.
/// </summary>
[Output("deployment")]
public Output<Pulumi.Aws.ApiGatewayV2.Deployment> Deployment { get; private set; } = null!;

/// <summary>
/// The domain names for the HTTP API.
/// </summary>
[Output("domainNames")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.DomainName>> DomainNames { get; private set; } = null!;

/// <summary>
/// The integrations for the HTTP API routes. This is a map from integration name to the integration arguments.
/// </summary>
[Output("integrations")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.Integration>> Integrations { get; private set; } = null!;

/// <summary>
/// The routes for the HTTP API. This is a map from route key (for example `GET /pets`) to route arguments.
/// </summary>
[Output("routes")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.Route>> Routes { get; private set; } = null!;

/// <summary>
/// The deployment stages for the HTTP API.
/// </summary>
[Output("stages")]
public Output<ImmutableArray<Pulumi.Aws.ApiGatewayV2.Stage>> Stages { get; private set; } = null!;


/// <summary>
/// Create a HttpApi resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public HttpApi(string name, HttpApiArgs args, CustomResourceOptions? options = null)
: base("awsx:apigatewayv2:HttpApi", name, args ?? new HttpApiArgs(), MakeResourceOptions(options, ""))
{
}

private HttpApi(string name, Input<string> id, CustomResourceOptions? options = null)
: base("awsx:apigatewayv2:HttpApi", name, null, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing HttpApi resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static HttpApi Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new HttpApi(name, id, options);
}
}

public sealed class HttpApiArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// An [API key selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions).
/// Valid values: `$context.authorizer.usageIdentifierKey`, `$request.header.x-api-key`. Defaults to `$request.header.x-api-key`.
/// Applicable for WebSocket APIs.
/// </summary>
[Input("apiKeySelectionExpression")]
public Input<string>? ApiKeySelectionExpression { get; set; }

[Input("authorizers")]
private InputMap<Inputs.HttpAuthorizerArgs>? _authorizers;

/// <summary>
/// The authorizers for the HTTP API routes.
/// </summary>
public InputMap<Inputs.HttpAuthorizerArgs> Authorizers
{
get => _authorizers ?? (_authorizers = new InputMap<Inputs.HttpAuthorizerArgs>());
set => _authorizers = value;
}

/// <summary>
/// An OpenAPI specification that defines the set of routes and integrations to create as part of the HTTP APIs. Supported only for HTTP APIs.
/// </summary>
[Input("body")]
public Input<string>? Body { get; set; }

/// <summary>
/// Cross-origin resource sharing (CORS) [configuration](https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html). Applicable for HTTP APIs.
/// </summary>
[Input("corsConfiguration")]
public Input<Pulumi.Aws.ApiGatewayV2.Inputs.ApiCorsConfigurationArgs>? CorsConfiguration { get; set; }

/// <summary>
/// Description of the API. Must be less than or equal to 1024 characters in length.
/// </summary>
[Input("description")]
public Input<string>? Description { get; set; }

/// <summary>
/// Whether clients can invoke the API by using the default `execute-api` endpoint.
/// By default, clients can invoke the API with the default `{api_id}.execute-api.{region}.amazonaws.com endpoint`.
/// To require that clients use a custom domain name to invoke the API, disable the default endpoint.
/// </summary>
[Input("disableExecuteApiEndpoint")]
public Input<bool>? DisableExecuteApiEndpoint { get; set; }

[Input("domainMappings")]
private InputMap<Inputs.DomainMappingArgs>? _domainMappings;

/// <summary>
/// The domain names for the HTTP API.
/// </summary>
public InputMap<Inputs.DomainMappingArgs> DomainMappings
{
get => _domainMappings ?? (_domainMappings = new InputMap<Inputs.DomainMappingArgs>());
set => _domainMappings = value;
}

/// <summary>
/// Whether warnings should return an error while API Gateway is creating or updating the resource using an OpenAPI specification. Defaults to `false`. Applicable for HTTP APIs.
/// </summary>
[Input("failOnWarnings")]
public Input<bool>? FailOnWarnings { get; set; }

[Input("integrations")]
private InputMap<Inputs.HttpIntegrationArgs>? _integrations;

/// <summary>
/// The integrations for the HTTP API routes.
/// </summary>
public InputMap<Inputs.HttpIntegrationArgs> Integrations
{
get => _integrations ?? (_integrations = new InputMap<Inputs.HttpIntegrationArgs>());
set => _integrations = value;
}

/// <summary>
/// Name of the API. Must be less than or equal to 128 characters in length.
/// </summary>
[Input("name")]
public Input<string>? Name { get; set; }

/// <summary>
/// The [route selection expression](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-route-selection-expressions) for the API.
/// Defaults to `$request.method $request.path`.
/// </summary>
[Input("routeSelectionExpression")]
public Input<string>? RouteSelectionExpression { get; set; }

[Input("routes", required: true)]
private InputMap<Inputs.HttpRouteArgs>? _routes;

/// <summary>
/// The routes for the HTTP API.
/// </summary>
public InputMap<Inputs.HttpRouteArgs> Routes
{
get => _routes ?? (_routes = new InputMap<Inputs.HttpRouteArgs>());
set => _routes = value;
}

[Input("stages")]
private InputMap<Inputs.HttpStageArgs>? _stages;

/// <summary>
/// The deployment stages for the HTTP API.
/// </summary>
public InputMap<Inputs.HttpStageArgs> Stages
{
get => _stages ?? (_stages = new InputMap<Inputs.HttpStageArgs>());
set => _stages = value;
}

[Input("tags")]
private InputMap<string>? _tags;

/// <summary>
/// Map of tags to assign to the API. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
/// </summary>
public InputMap<string> Tags
{
get => _tags ?? (_tags = new InputMap<string>());
set => _tags = value;
}

/// <summary>
/// Version identifier for the API. Must be between 1 and 64 characters in length.
/// </summary>
[Input("version")]
public Input<string>? Version { get; set; }

public HttpApiArgs()
{
}
public static new HttpApiArgs Empty => new HttpApiArgs();
}
}
Loading

0 comments on commit 9f01449

Please sign in to comment.