/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ public Observable<PolicyDefinitionInner> getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId) { return getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() { @Override public PolicyDefinitionInner call(ServiceResponse<PolicyDefinitionInner> response) { return response.body(); } }); }
/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyDefinitionInner object */ public Observable<PolicyDefinitionInner> getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId) { return getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() { @Override public PolicyDefinitionInner call(ServiceResponse<PolicyDefinitionInner> response) { return response.body(); } }); }
/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<PolicyDefinitionInner> getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId), serviceCallback); }
/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ public ServiceFuture<PolicyDefinitionInner> getAtManagementGroupAsync(String policyDefinitionName, String managementGroupId, final ServiceCallback<PolicyDefinitionInner> serviceCallback) { return ServiceFuture.fromResponse(getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId), serviceCallback); }
/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyDefinitionInner object if successful. */ public PolicyDefinitionInner getAtManagementGroup(String policyDefinitionName, String managementGroupId) { return getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).toBlocking().single().body(); }
/** * Gets the policy definition at management group level. * * @param policyDefinitionName The name of the policy definition to get. * @param managementGroupId The ID of the management group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyDefinitionInner object if successful. */ public PolicyDefinitionInner getAtManagementGroup(String policyDefinitionName, String managementGroupId) { return getAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).toBlocking().single().body(); }