Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR sdk/policy/mgmt-v2019_09_01] Add missing properties from list tenants API #8208

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/policy/mgmt-v2019_09_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.2.0</version>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-policy</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public class Identity {
private String tenantId;

/**
* The identity type. Possible values include: 'SystemAssigned', 'None'.
* The identity type. This is the only required field when adding a system
* assigned identity to a resource. Possible values include:
* 'SystemAssigned', 'None'.
*/
@JsonProperty(value = "type")
private ResourceIdentityType type;
Expand All @@ -51,7 +53,7 @@ public String tenantId() {
}

/**
* Get the identity type. Possible values include: 'SystemAssigned', 'None'.
* Get the identity type. This is the only required field when adding a system assigned identity to a resource. Possible values include: 'SystemAssigned', 'None'.
*
* @return the type value
*/
Expand All @@ -60,7 +62,7 @@ public ResourceIdentityType type() {
}

/**
* Set the identity type. Possible values include: 'SystemAssigned', 'None'.
* Set the identity type. This is the only required field when adding a system assigned identity to a resource. Possible values include: 'SystemAssigned', 'None'.
*
* @param type the type value to set
* @return the Identity object itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ParameterDefinitionsValue model.
* The definition of a parameter that can be provided to the policy.
*/
public class ParameterDefinitionsValue {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The ParameterValuesValue model.
* The value of a parameter.
*/
public class ParameterValuesValue {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ public interface PolicyAssignments extends SupportsCreating<PolicyAssignment.Def
*/
Observable<PolicyAssignment> listForResourceAsync(final String resourceGroupName, final String resourceProviderNamespace, final String parentResourcePath, final String resourceType, final String resourceName);

/**
* Retrieves all policy assignments that apply to a management group.
* This operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the management group.
*
* @param managementGroupId The ID of the management group.
* @param filter The filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}''. A filter is required when listing policy assignments at management group scope.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
Observable<PolicyAssignment> listForManagementGroupAsync(final String managementGroupId, final String filter);

/**
* Deletes a policy assignment.
* This operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* Defines values for ResourceIdentityType.
*/
public enum ResourceIdentityType {
/** Enum value SystemAssigned. */
/** Indicates that a system assigned identity is associated with the resource. */
SYSTEM_ASSIGNED("SystemAssigned"),

/** Enum value None. */
/** Indicates that no identity is associated with the resource or that the existing identity should be removed. */
NONE("None");

/** The actual serialized value for a ResourceIdentityType instance. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,24 @@ public PolicyAssignment call(PolicyAssignmentInner inner) {
});
}

@Override
public Observable<PolicyAssignment> listForManagementGroupAsync(final String managementGroupId, final String filter) {
PolicyAssignmentsInner client = this.inner();
return client.listForManagementGroupAsync(managementGroupId, filter)
.flatMapIterable(new Func1<Page<PolicyAssignmentInner>, Iterable<PolicyAssignmentInner>>() {
@Override
public Iterable<PolicyAssignmentInner> call(Page<PolicyAssignmentInner> page) {
return page.items();
}
})
.map(new Func1<PolicyAssignmentInner, PolicyAssignment>() {
@Override
public PolicyAssignment call(PolicyAssignmentInner inner) {
return new PolicyAssignmentImpl(inner, manager());
}
});
}

@Override
public Observable<PolicyAssignment> deleteByIdAsync(String policyAssignmentId) {
PolicyAssignmentsInner client = this.inner();
Expand Down
Loading