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.management.resources;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasId;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Indexable;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
import com.microsoft.azure.management.resources.implementation.PolicyDefinitionInner;
An immutable client-side representation of an Azure policy.
/**
* An immutable client-side representation of an Azure policy.
*/
@Fluent
public interface PolicyDefinition extends
HasName,
HasId,
Indexable,
Refreshable<PolicyDefinition>,
Updatable<PolicyDefinition.Update>,
HasInner<PolicyDefinitionInner> {
Returns: the type of the policy definition
/**
* @return the type of the policy definition
*/
PolicyType policyType();
Returns: the policy definition display name
/**
* @return the policy definition display name
*/
String displayName();
Returns: the policy definition description
/**
* @return the policy definition description
*/
String description();
Returns: the policy rule
/**
* @return the policy rule
*/
Object policyRule();
Container interface for all the definitions that need to be implemented.
/**
* Container interface for all the definitions that need to be implemented.
*/
interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithCreate {
}
Grouping of all the policy definition stages.
/**
* Grouping of all the policy definition stages.
*/
interface DefinitionStages {
The first stage of the policy definition.
/**
* The first stage of the policy definition.
*/
interface Blank extends WithPolicyRule {
}
A policy definition allowing the policy rule to be set.
/**
* A policy definition allowing the policy rule to be set.
*/
interface WithPolicyRule {
Specifies the rule of the policy.
Params: - policyRule – the rule object
Returns: the next stage of policy definition
/**
* Specifies the rule of the policy.
*
* @param policyRule the rule object
* @return the next stage of policy definition
*/
WithCreate withPolicyRule(Object policyRule);
Specifies the rule of the policy in JSON format.
Params: - policyRuleJson – the rule object
Returns: the next stage of policy definition
/**
* Specifies the rule of the policy in JSON format.
*
* @param policyRuleJson the rule object
* @return the next stage of policy definition
*/
WithCreate withPolicyRuleJson(String policyRuleJson);
}
A policy definition specifying the policy type to be blob.
/**
* A policy definition specifying the policy type to be blob.
*/
interface WithPolicyType {
Specifies the type of the policy. The default value is 'NotSpecified'.
Params: - policyType – the policy type enum
Returns: the next stage of policy definition
/**
* Specifies the type of the policy. The default value is 'NotSpecified'.
*
* @param policyType the policy type enum
* @return the next stage of policy definition
*/
WithCreate withPolicyType(PolicyType policyType);
}
A policy definition allowing the display name to be set.
/**
* A policy definition allowing the display name to be set.
*/
interface WithDisplayName {
Specifies the display name of the policy.
Params: - displayName – the display name of the policy
Returns: the next stage of policy definition
/**
* Specifies the display name of the policy.
*
* @param displayName the display name of the policy
* @return the next stage of policy definition
*/
WithCreate withDisplayName(String displayName);
}
A policy definition allowing policy description to be set.
/**
* A policy definition allowing policy description to be set.
*/
interface WithDescription {
Specifies the description of the policy.
Params: - description – the description of the policy
Returns: the next stage of policy definition
/**
* Specifies the description of the policy.
*
* @param description the description of the policy
* @return the next stage of policy definition
*/
WithCreate withDescription(String description);
}
A policy definition with sufficient inputs to create a new
policy in the cloud, but exposing additional optional inputs to
specify.
/**
* A policy definition with sufficient inputs to create a new
* policy in the cloud, but exposing additional optional inputs to
* specify.
*/
interface WithCreate extends
Creatable<PolicyDefinition>,
DefinitionStages.WithDescription,
DefinitionStages.WithDisplayName,
DefinitionStages.WithPolicyType {
}
}
Grouping of all the policy update stages.
/**
* Grouping of all the policy update stages.
*/
interface UpdateStages {
A policy definition allowing the policy rule to be set.
/**
* A policy definition allowing the policy rule to be set.
*/
interface WithPolicyRule {
Specifies the rule of the policy.
Params: - policyRule – the rule object
Returns: the next stage of policy update
/**
* Specifies the rule of the policy.
*
* @param policyRule the rule object
* @return the next stage of policy update
*/
Update withPolicyRule(Object policyRule);
}
A policy definition allowing the policy type to be set.
/**
* A policy definition allowing the policy type to be set.
*/
interface WithPolicyType {
Specifies the type of the policy. The default value is 'NotSpecified'.
Params: - policyType – the policy type enum
Returns: the next stage of policy update
/**
* Specifies the type of the policy. The default value is 'NotSpecified'.
*
* @param policyType the policy type enum
* @return the next stage of policy update
*/
Update withPolicyType(PolicyType policyType);
}
A policy definition allowing the display name to be set.
/**
* A policy definition allowing the display name to be set.
*/
interface WithDisplayName {
Specifies the display name of the policy.
Params: - displayName – the display name of the policy
Returns: the next stage of policy update
/**
* Specifies the display name of the policy.
*
* @param displayName the display name of the policy
* @return the next stage of policy update
*/
Update withDisplayName(String displayName);
}
A policy definition allowing the policy description to be set.
/**
* A policy definition allowing the policy description to be set.
*/
interface WithDescription {
Specifies the description of the policy.
Params: - description – the description of the policy
Returns: the next stage of policy update
/**
* Specifies the description of the policy.
*
* @param description the description of the policy
* @return the next stage of policy update
*/
Update withDescription(String description);
}
}
The template for a policy update operation, containing all the settings that can be modified.
/**
* The template for a policy update operation, containing all the settings that can be modified.
*/
interface Update extends
Appliable<PolicyDefinition>,
UpdateStages.WithDescription,
UpdateStages.WithDisplayName,
UpdateStages.WithPolicyRule,
UpdateStages.WithPolicyType {
}
}