github.com/twilio/twilio-go@v1.20.1/rest/serverless/v1/docs/ServicesEnvironmentsApi.md (about)

     1  # ServicesEnvironmentsApi
     2  
     3  All URIs are relative to *https://serverless.twilio.com*
     4  
     5  Method | HTTP request | Description
     6  ------------- | ------------- | -------------
     7  [**CreateEnvironment**](ServicesEnvironmentsApi.md#CreateEnvironment) | **Post** /v1/Services/{ServiceSid}/Environments | 
     8  [**DeleteEnvironment**](ServicesEnvironmentsApi.md#DeleteEnvironment) | **Delete** /v1/Services/{ServiceSid}/Environments/{Sid} | 
     9  [**FetchEnvironment**](ServicesEnvironmentsApi.md#FetchEnvironment) | **Get** /v1/Services/{ServiceSid}/Environments/{Sid} | 
    10  [**ListEnvironment**](ServicesEnvironmentsApi.md#ListEnvironment) | **Get** /v1/Services/{ServiceSid}/Environments | 
    11  
    12  
    13  
    14  ## CreateEnvironment
    15  
    16  > ServerlessV1Environment CreateEnvironment(ctx, ServiceSidoptional)
    17  
    18  
    19  
    20  Create a new environment.
    21  
    22  ### Path Parameters
    23  
    24  
    25  Name | Type | Description
    26  ------------- | ------------- | -------------
    27  **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
    28  **ServiceSid** | **string** | The SID of the Service to create the Environment resource under.
    29  
    30  ### Other Parameters
    31  
    32  Other parameters are passed through a pointer to a CreateEnvironmentParams struct
    33  
    34  
    35  Name | Type | Description
    36  ------------- | ------------- | -------------
    37  **UniqueName** | **string** | A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters.
    38  **DomainSuffix** | **string** | A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters.
    39  
    40  ### Return type
    41  
    42  [**ServerlessV1Environment**](ServerlessV1Environment.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  ## DeleteEnvironment
    59  
    60  > DeleteEnvironment(ctx, ServiceSidSid)
    61  
    62  
    63  
    64  Delete a specific environment.
    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 Environment resource from.
    73  **Sid** | **string** | The SID of the Environment resource to delete.
    74  
    75  ### Other Parameters
    76  
    77  Other parameters are passed through a pointer to a DeleteEnvironmentParams 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  ## FetchEnvironment
   102  
   103  > ServerlessV1Environment FetchEnvironment(ctx, ServiceSidSid)
   104  
   105  
   106  
   107  Retrieve a specific environment.
   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 Environment resource from.
   116  **Sid** | **string** | The SID of the Environment resource to fetch.
   117  
   118  ### Other Parameters
   119  
   120  Other parameters are passed through a pointer to a FetchEnvironmentParams struct
   121  
   122  
   123  Name | Type | Description
   124  ------------- | ------------- | -------------
   125  
   126  ### Return type
   127  
   128  [**ServerlessV1Environment**](ServerlessV1Environment.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  ## ListEnvironment
   145  
   146  > []ServerlessV1Environment ListEnvironment(ctx, ServiceSidoptional)
   147  
   148  
   149  
   150  Retrieve a list of all environments.
   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 Environment resources from.
   159  
   160  ### Other Parameters
   161  
   162  Other parameters are passed through a pointer to a ListEnvironmentParams 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  [**[]ServerlessV1Environment**](ServerlessV1Environment.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