All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.apimanagement.WorkspaceApiOperation Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.apimanagement;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.apimanagement.WorkspaceApiOperationArgs;
import com.pulumi.azurenative.apimanagement.outputs.ParameterContractResponse;
import com.pulumi.azurenative.apimanagement.outputs.RequestContractResponse;
import com.pulumi.azurenative.apimanagement.outputs.ResponseContractResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * API Operation details.
 * Azure REST API version: 2022-09-01-preview.
 * 
 * Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
 * 
 * ## Example Usage
 * ### ApiManagementCreateWorkspaceApiOperation
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.apimanagement.WorkspaceApiOperation;
 * import com.pulumi.azurenative.apimanagement.WorkspaceApiOperationArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.RequestContractArgs;
 * import com.pulumi.azurenative.apimanagement.inputs.ResponseContractArgs;
 * 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) {
 *         var workspaceApiOperation = new WorkspaceApiOperation("workspaceApiOperation", WorkspaceApiOperationArgs.builder()
 *             .apiId("PetStoreTemplate2")
 *             .description("This can only be done by the logged in user.")
 *             .displayName("createUser2")
 *             .method("POST")
 *             .operationId("newoperations")
 *             .request(RequestContractArgs.builder()
 *                 .description("Created user object")
 *                 .headers()
 *                 .queryParameters()
 *                 .representations(RepresentationContractArgs.builder()
 *                     .contentType("application/json")
 *                     .schemaId("592f6c1d0af5840ca8897f0c")
 *                     .typeName("User")
 *                     .build())
 *                 .build())
 *             .resourceGroupName("rg1")
 *             .responses(ResponseContractArgs.builder()
 *                 .description("successful operation")
 *                 .headers()
 *                 .representations(                
 *                     RepresentationContractArgs.builder()
 *                         .contentType("application/xml")
 *                         .build(),
 *                     RepresentationContractArgs.builder()
 *                         .contentType("application/json")
 *                         .build())
 *                 .statusCode(200)
 *                 .build())
 *             .serviceName("apimService1")
 *             .templateParameters()
 *             .urlTemplate("/user1")
 *             .workspaceId("wks1")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:apimanagement:WorkspaceApiOperation newoperations /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/operations/{operationId} * ``` * */ @ResourceType(type="azure-native:apimanagement:WorkspaceApiOperation") public class WorkspaceApiOperation extends com.pulumi.resources.CustomResource { /** * Description of the operation. May include HTML formatting tags. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return Description of the operation. May include HTML formatting tags. * */ public Output> description() { return Codegen.optional(this.description); } /** * Operation Name. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return Operation Name. * */ public Output displayName() { return this.displayName; } /** * A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. * */ @Export(name="method", refs={String.class}, tree="[0]") private Output method; /** * @return A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. * */ public Output method() { return this.method; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * Operation Policies * */ @Export(name="policies", refs={String.class}, tree="[0]") private Output policies; /** * @return Operation Policies * */ public Output> policies() { return Codegen.optional(this.policies); } /** * An entity containing request details. * */ @Export(name="request", refs={RequestContractResponse.class}, tree="[0]") private Output request; /** * @return An entity containing request details. * */ public Output> request() { return Codegen.optional(this.request); } /** * Array of Operation responses. * */ @Export(name="responses", refs={List.class,ResponseContractResponse.class}, tree="[0,1]") private Output> responses; /** * @return Array of Operation responses. * */ public Output>> responses() { return Codegen.optional(this.responses); } /** * Collection of URL template parameters. * */ @Export(name="templateParameters", refs={List.class,ParameterContractResponse.class}, tree="[0,1]") private Output> templateParameters; /** * @return Collection of URL template parameters. * */ public Output>> templateParameters() { return Codegen.optional(this.templateParameters); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} * */ @Export(name="urlTemplate", refs={String.class}, tree="[0]") private Output urlTemplate; /** * @return Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} * */ public Output urlTemplate() { return this.urlTemplate; } /** * * @param name The _unique_ name of the resulting resource. */ public WorkspaceApiOperation(java.lang.String name) { this(name, WorkspaceApiOperationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public WorkspaceApiOperation(java.lang.String name, WorkspaceApiOperationArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public WorkspaceApiOperation(java.lang.String name, WorkspaceApiOperationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceApiOperation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private WorkspaceApiOperation(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:apimanagement:WorkspaceApiOperation", name, null, makeResourceOptions(options, id), false); } private static WorkspaceApiOperationArgs makeArgs(WorkspaceApiOperationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkspaceApiOperationArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:apimanagement/v20220901preview:WorkspaceApiOperation").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230301preview:WorkspaceApiOperation").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230501preview:WorkspaceApiOperation").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20230901preview:WorkspaceApiOperation").build()), Output.of(Alias.builder().type("azure-native:apimanagement/v20240501:WorkspaceApiOperation").build()) )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param options Optional settings to control the behavior of the CustomResource. */ public static WorkspaceApiOperation get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new WorkspaceApiOperation(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy