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