github.com/twilio/twilio-go@v1.20.1/rest/serverless/v1/docs/ServicesFunctionsApi.md (about) 1 # ServicesFunctionsApi 2 3 All URIs are relative to *https://serverless.twilio.com* 4 5 Method | HTTP request | Description 6 ------------- | ------------- | ------------- 7 [**CreateFunction**](ServicesFunctionsApi.md#CreateFunction) | **Post** /v1/Services/{ServiceSid}/Functions | 8 [**DeleteFunction**](ServicesFunctionsApi.md#DeleteFunction) | **Delete** /v1/Services/{ServiceSid}/Functions/{Sid} | 9 [**FetchFunction**](ServicesFunctionsApi.md#FetchFunction) | **Get** /v1/Services/{ServiceSid}/Functions/{Sid} | 10 [**ListFunction**](ServicesFunctionsApi.md#ListFunction) | **Get** /v1/Services/{ServiceSid}/Functions | 11 [**UpdateFunction**](ServicesFunctionsApi.md#UpdateFunction) | **Post** /v1/Services/{ServiceSid}/Functions/{Sid} | 12 13 14 15 ## CreateFunction 16 17 > ServerlessV1Function CreateFunction(ctx, ServiceSidoptional) 18 19 20 21 Create a new Function resource. 22 23 ### Path Parameters 24 25 26 Name | Type | Description 27 ------------- | ------------- | ------------- 28 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 29 **ServiceSid** | **string** | The SID of the Service to create the Function resource under. 30 31 ### Other Parameters 32 33 Other parameters are passed through a pointer to a CreateFunctionParams struct 34 35 36 Name | Type | Description 37 ------------- | ------------- | ------------- 38 **FriendlyName** | **string** | A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. 39 40 ### Return type 41 42 [**ServerlessV1Function**](ServerlessV1Function.md) 43 44 ### Authorization 45 46 [accountSid_authToken](../README.md#accountSid_authToken) 47 48 ### HTTP request headers 49 50 - **Content-Type**: application/x-www-form-urlencoded 51 - **Accept**: application/json 52 53 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 54 [[Back to Model list]](../README.md#documentation-for-models) 55 [[Back to README]](../README.md) 56 57 58 ## DeleteFunction 59 60 > DeleteFunction(ctx, ServiceSidSid) 61 62 63 64 Delete a Function resource. 65 66 ### Path Parameters 67 68 69 Name | Type | Description 70 ------------- | ------------- | ------------- 71 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 72 **ServiceSid** | **string** | The SID of the Service to delete the Function resource from. 73 **Sid** | **string** | The SID of the Function resource to delete. 74 75 ### Other Parameters 76 77 Other parameters are passed through a pointer to a DeleteFunctionParams struct 78 79 80 Name | Type | Description 81 ------------- | ------------- | ------------- 82 83 ### Return type 84 85 (empty response body) 86 87 ### Authorization 88 89 [accountSid_authToken](../README.md#accountSid_authToken) 90 91 ### HTTP request headers 92 93 - **Content-Type**: Not defined 94 - **Accept**: Not defined 95 96 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 97 [[Back to Model list]](../README.md#documentation-for-models) 98 [[Back to README]](../README.md) 99 100 101 ## FetchFunction 102 103 > ServerlessV1Function FetchFunction(ctx, ServiceSidSid) 104 105 106 107 Retrieve a specific Function resource. 108 109 ### Path Parameters 110 111 112 Name | Type | Description 113 ------------- | ------------- | ------------- 114 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 115 **ServiceSid** | **string** | The SID of the Service to fetch the Function resource from. 116 **Sid** | **string** | The SID of the Function resource to fetch. 117 118 ### Other Parameters 119 120 Other parameters are passed through a pointer to a FetchFunctionParams struct 121 122 123 Name | Type | Description 124 ------------- | ------------- | ------------- 125 126 ### Return type 127 128 [**ServerlessV1Function**](ServerlessV1Function.md) 129 130 ### Authorization 131 132 [accountSid_authToken](../README.md#accountSid_authToken) 133 134 ### HTTP request headers 135 136 - **Content-Type**: Not defined 137 - **Accept**: application/json 138 139 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 140 [[Back to Model list]](../README.md#documentation-for-models) 141 [[Back to README]](../README.md) 142 143 144 ## ListFunction 145 146 > []ServerlessV1Function ListFunction(ctx, ServiceSidoptional) 147 148 149 150 Retrieve a list of all Functions. 151 152 ### Path Parameters 153 154 155 Name | Type | Description 156 ------------- | ------------- | ------------- 157 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 158 **ServiceSid** | **string** | The SID of the Service to read the Function resources from. 159 160 ### Other Parameters 161 162 Other parameters are passed through a pointer to a ListFunctionParams struct 163 164 165 Name | Type | Description 166 ------------- | ------------- | ------------- 167 **PageSize** | **int** | How many resources to return in each list page. The default is 50, and the maximum is 1000. 168 **Limit** | **int** | Max number of records to return. 169 170 ### Return type 171 172 [**[]ServerlessV1Function**](ServerlessV1Function.md) 173 174 ### Authorization 175 176 [accountSid_authToken](../README.md#accountSid_authToken) 177 178 ### HTTP request headers 179 180 - **Content-Type**: Not defined 181 - **Accept**: application/json 182 183 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 184 [[Back to Model list]](../README.md#documentation-for-models) 185 [[Back to README]](../README.md) 186 187 188 ## UpdateFunction 189 190 > ServerlessV1Function UpdateFunction(ctx, ServiceSidSidoptional) 191 192 193 194 Update a specific Function resource. 195 196 ### Path Parameters 197 198 199 Name | Type | Description 200 ------------- | ------------- | ------------- 201 **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. 202 **ServiceSid** | **string** | The SID of the Service to update the Function resource from. 203 **Sid** | **string** | The SID of the Function resource to update. 204 205 ### Other Parameters 206 207 Other parameters are passed through a pointer to a UpdateFunctionParams struct 208 209 210 Name | Type | Description 211 ------------- | ------------- | ------------- 212 **FriendlyName** | **string** | A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters. 213 214 ### Return type 215 216 [**ServerlessV1Function**](ServerlessV1Function.md) 217 218 ### Authorization 219 220 [accountSid_authToken](../README.md#accountSid_authToken) 221 222 ### HTTP request headers 223 224 - **Content-Type**: application/x-www-form-urlencoded 225 - **Accept**: application/json 226 227 [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 228 [[Back to Model list]](../README.md#documentation-for-models) 229 [[Back to README]](../README.md) 230