/// <summary> /// create /// </summary> /// <param name="options"> Create RecordingSettings parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of RecordingSettings </returns> public static RecordingSettingsResource Create(CreateRecordingSettingsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildCreateRequest(CreateRecordingSettingsOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Video, "/v1/RecordingSettings/Default", postParams: options.GetParams() )); }
/// <summary> /// create /// </summary> /// <param name="friendlyName"> Friendly name of the configuration to be shown in the console </param> /// <param name="awsCredentialsSid"> SID of the Stored Credential resource CRxx </param> /// <param name="encryptionKeySid"> SID of the Public Key resource CRxx </param> /// <param name="awsS3Url"> Identity of the external location where the recordings should be stored. We only support /// DNS-compliant URLs like http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings /// is the path where you want recordings to be stored. </param> /// <param name="awsStorageEnabled"> true|false When set to true, all Recordings will be written to the AwsS3Url /// specified above. When set to false, all Recordings will be stored in Twilio's cloud. /// </param> /// <param name="encryptionEnabled"> true|false When set to true, all Recordings will be stored encrypted. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of RecordingSettings </returns> public static async System.Threading.Tasks.Task <RecordingSettingsResource> CreateAsync(string friendlyName, string awsCredentialsSid = null, string encryptionKeySid = null, Uri awsS3Url = null, bool?awsStorageEnabled = null, bool?encryptionEnabled = null, ITwilioRestClient client = null) { var options = new CreateRecordingSettingsOptions(friendlyName) { AwsCredentialsSid = awsCredentialsSid, EncryptionKeySid = encryptionKeySid, AwsS3Url = awsS3Url, AwsStorageEnabled = awsStorageEnabled, EncryptionEnabled = encryptionEnabled }; return(await CreateAsync(options, client)); }
/// <summary> /// create /// </summary> /// <param name="friendlyName"> Friendly name of the configuration to be shown in the console </param> /// <param name="awsCredentialsSid"> SID of the Stored Credential resource CRxx </param> /// <param name="encryptionKeySid"> SID of the Public Key resource CRxx </param> /// <param name="awsS3Url"> Identity of the external location where the recordings should be stored. We only support /// DNS-compliant URLs like http://<my-bucket>.s3-<aws-region>.amazonaws.com/recordings, where recordings /// is the path where you want recordings to be stored. </param> /// <param name="awsStorageEnabled"> true|false When set to true, all Recordings will be written to the AwsS3Url /// specified above. When set to false, all Recordings will be stored in Twilio's cloud. /// </param> /// <param name="encryptionEnabled"> true|false When set to true, all Recordings will be stored encrypted. </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of RecordingSettings </returns> public static RecordingSettingsResource Create(string friendlyName, string awsCredentialsSid = null, string encryptionKeySid = null, Uri awsS3Url = null, bool?awsStorageEnabled = null, bool?encryptionEnabled = null, ITwilioRestClient client = null) { var options = new CreateRecordingSettingsOptions(friendlyName) { AwsCredentialsSid = awsCredentialsSid, EncryptionKeySid = encryptionKeySid, AwsS3Url = awsS3Url, AwsStorageEnabled = awsStorageEnabled, EncryptionEnabled = encryptionEnabled }; return(Create(options, client)); }
/// <summary> /// create /// </summary> /// <param name="options"> Create RecordingSettings parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of RecordingSettings </returns> public static async System.Threading.Tasks.Task <RecordingSettingsResource> CreateAsync(CreateRecordingSettingsOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildCreateRequest(options, client)); return(FromJson(response.Content)); }