code: public SecurityRuleInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) {
          return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).toBlocking().single().body();
      }
docs: Creates or updates a security rule in the specified network security group.
  
  @param resourceGroupName The name of the resource group.
  @param networkSecurityGroupName The name of the network security group.
  @param securityRuleName The name of the security rule.
  @param securityRuleParameters Parameters supplied to the create or update network security rule operation.
  @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 SecurityRuleInner object if successful.