/// <summary> /// Create a new Network Access Profile /// </summary> /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param> /// <param name="networks"> List of Network SIDs that this Network Access Profile will allow connections to </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of NetworkAccessProfile </returns> public static NetworkAccessProfileResource Create(string uniqueName = null, List <string> networks = null, ITwilioRestClient client = null) { var options = new CreateNetworkAccessProfileOptions() { UniqueName = uniqueName, Networks = networks }; return(Create(options, client)); }
/// <summary> /// Create a new Network Access Profile /// </summary> /// <param name="uniqueName"> An application-defined string that uniquely identifies the resource </param> /// <param name="networks"> List of Network SIDs that this Network Access Profile will allow connections to </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of NetworkAccessProfile </returns> public static async System.Threading.Tasks.Task <NetworkAccessProfileResource> CreateAsync(string uniqueName = null, List <string> networks = null, ITwilioRestClient client = null) { var options = new CreateNetworkAccessProfileOptions() { UniqueName = uniqueName, Networks = networks }; return(await CreateAsync(options, client)); }
/// <summary> /// Create a new Network Access Profile /// </summary> /// <param name="options"> Create NetworkAccessProfile parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of NetworkAccessProfile </returns> public static async System.Threading.Tasks.Task <NetworkAccessProfileResource> CreateAsync(CreateNetworkAccessProfileOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }