/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ public Observable<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName) { return getWithServiceResponseAsync(scope, policyAssignmentName).map(new Func1<ServiceResponse<PolicyAssignmentInner>, PolicyAssignmentInner>() { @Override public PolicyAssignmentInner call(ServiceResponse<PolicyAssignmentInner> response) { return response.body(); } }); }
/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PolicyAssignmentInner object */ public Observable<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName) { return getWithServiceResponseAsync(scope, policyAssignmentName).map(new Func1<ServiceResponse<PolicyAssignmentInner>, PolicyAssignmentInner>() { @Override public PolicyAssignmentInner call(ServiceResponse<PolicyAssignmentInner> response) { return response.body(); } }); }
/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @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<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName, final ServiceCallback<PolicyAssignmentInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(scope, policyAssignmentName), serviceCallback); }
/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @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<PolicyAssignmentInner> getAsync(String scope, String policyAssignmentName, final ServiceCallback<PolicyAssignmentInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(scope, policyAssignmentName), serviceCallback); }
/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyAssignmentInner object if successful. */ public PolicyAssignmentInner get(String scope, String policyAssignmentName) { return getWithServiceResponseAsync(scope, policyAssignmentName).toBlocking().single().body(); }
/** * Gets a policy assignment. * * @param scope The scope of the policy assignment. * @param policyAssignmentName The name of the policy assignment to get. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws ErrorResponseException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PolicyAssignmentInner object if successful. */ public PolicyAssignmentInner get(String scope, String policyAssignmentName) { return getWithServiceResponseAsync(scope, policyAssignmentName).toBlocking().single().body(); }