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

com.azure.core.annotation.Put Maven / Gradle / Ivy

There is a newer version: 1.54.1
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.core.annotation;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * HTTP PUT method annotation describing the parameterized relative path to a REST endpoint for resource creation or
 * update.
 *
 * 

The required value can be either a relative path or an absolute path. When it's an absolute path, it must start * with a protocol or a parameterized segment (Otherwise the parse cannot tell if it's absolute or relative).

* *

Example 1: Relative path segments

* * *
 * @Put("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/"
 *     + "virtualMachines/{vmName}")
 * VirtualMachine createOrUpdate(@PathParam("resourceGroupName") String rgName,
 *     @PathParam("vmName") String vmName,
 *     @PathParam("subscriptionId") String subscriptionId,
 *     @BodyParam("application/json") VirtualMachine vm);
 * 
* * *

Example 2: Absolute path segment

* * *
 * @Put("{vaultBaseUrl}/secrets/{secretName}")
 * Secret createOrUpdate(@PathParam(value = "vaultBaseUrl", encoded = true) String vaultBaseUrl,
 *     @PathParam("secretName") String secretName,
 *     @BodyParam("application/json") Secret secret);
 * 
* */ @Retention(RUNTIME) @Target(METHOD) public @interface Put { /** * Get the relative path of the annotated method's PUT URL. * @return The relative path of the annotated method's PUT URL. */ String value(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy