Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. */
package com.microsoft.azure.arm.resources.models; import com.microsoft.azure.arm.resources.Region; import com.microsoft.azure.arm.model.Indexable; import com.microsoft.azure.management.apigeneration.LangDefinition; import java.util.Map;
Base interfaces for fluent resources.
/** * Base interfaces for fluent resources. */
@LangDefinition() public interface Resource extends Indexable, HasId, HasName {
Returns:the type of the resource
/** * @return the type of the resource */
String type();
Returns:the name of the region the resource is in
/** * @return the name of the region the resource is in */
String regionName();
Returns:the region the resource is in
/** * @return the region the resource is in */
Region region();
Returns:the tags for the resource
/** * @return the tags for the resource */
Map<String, String> tags();
A resource definition allowing a location be selected for the resource.
Type parameters:
  • <T> – the type of the next stage resource definition
/** * A resource definition allowing a location be selected for the resource. * * @param <T> the type of the next stage resource definition */
@LangDefinition(ContainerName = "Resource.Definition", ContainerFileName = "IDefinition") interface DefinitionWithRegion<T> {
Specifies the region for the resource by name.
Params:
  • regionName – The name of the region for the resource
Returns:the next stage of the definition
/** * Specifies the region for the resource by name. * @param regionName The name of the region for the resource * @return the next stage of the definition */
T withRegion(String regionName);
Specifies the region for the resource.
Params:
  • region – The location for the resource
Returns:the next stage of the definition
/** * Specifies the region for the resource. * @param region The location for the resource * @return the next stage of the definition */
T withRegion(Region region); }
A resource definition allowing tags to be modified for the resource.
Type parameters:
  • <T> – the type of the next stage resource definition
/** * A resource definition allowing tags to be modified for the resource. * * @param <T> the type of the next stage resource definition */
@LangDefinition(ContainerName = "Resource.Definition", ContainerFileName = "IDefinition") interface DefinitionWithTags<T> {
Specifies tags for the resource as a Map.
Params:
  • tags – a Map of tags
Returns:the next stage of the definition
/** * Specifies tags for the resource as a {@link Map}. * @param tags a {@link Map} of tags * @return the next stage of the definition */
T withTags(Map<String, String> tags);
Adds a tag to the resource.
Params:
  • key – the key for the tag
  • value – the value for the tag
Returns:the next stage of the definition
/** * Adds a tag to the resource. * @param key the key for the tag * @param value the value for the tag * @return the next stage of the definition */
T withTag(String key, String value); }
An update allowing tags to be modified for the resource.
Type parameters:
  • <T> – the type of the next stage resource update
/** * An update allowing tags to be modified for the resource. * * @param <T> the type of the next stage resource update */
@LangDefinition(ContainerName = "Resource.Update", ContainerFileName = "IUpdate") interface UpdateWithTags<T> {
Specifies tags for the resource as a Map.
Params:
  • tags – a Map of tags
Returns:the next stage of the resource update
/** * Specifies tags for the resource as a {@link Map}. * @param tags a {@link Map} of tags * @return the next stage of the resource update */
T withTags(Map<String, String> tags);
Adds a tag to the resource.
Params:
  • key – the key for the tag
  • value – the value for the tag
Returns:the next stage of the resource update
/** * Adds a tag to the resource. * @param key the key for the tag * @param value the value for the tag * @return the next stage of the resource update */
T withTag(String key, String value);
Removes a tag from the resource.
Params:
  • key – the key of the tag to remove
Returns:the next stage of the resource update
/** * Removes a tag from the resource. * @param key the key of the tag to remove * @return the next stage of the resource update */
T withoutTag(String key); } }