# Distributions

A CDN distribution resource.

This tag groups all operations for distributions.

## Retrieve all Distributions

> This endpoint enables retrieving all Distributions using\
> pagination and optional filters.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\n\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"parameters":{"paginationOffset":{"name":"offset","in":"query","description":"The first element (of the total list of elements) to include in the response. Use this parameter together with the limit for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":0,"minimum":0}},"paginationLimit":{"name":"limit","in":"query","description":"The maximum number of elements to return. Use this parameter together with the offset for pagination.","required":false,"schema":{"type":"integer","format":"int32","default":100,"minimum":1,"maximum":1000}},"domain":{"name":"filter.domain","in":"query","description":"filters resources by domain.","required":false,"schema":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253}},"state":{"name":"filter.state","in":"query","description":"filters resources by state.","required":false,"schema":{"type":"string","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"]}}},"schemas":{"DistributionReadList":{"allOf":[{"type":"object","required":["id","type","href"],"properties":{"id":{"description":"ID of the list of Distribution resources.","type":"string","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["collection"]},"href":{"description":"The URL of the list of Distribution resources.","type":"string"},"items":{"description":"The list of Distribution resources.","type":"array","items":{"$ref":"#/components/schemas/DistributionRead"}}}},{"$ref":"#/components/schemas/Pagination"}]},"DistributionRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","description":"The ID (UUID) of the Distribution.","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["distribution"]},"href":{"description":"The URL of the Distribution.","type":"string"},"metadata":{"$ref":"#/components/schemas/DistributionMetadata"},"properties":{"$ref":"#/components/schemas/Distribution"}}},"DistributionMetadata":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Metadata"},{"$ref":"#/components/schemas/IpAddresses"},{"$ref":"#/components/schemas/ResourceState"}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp.","readOnly":true},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"Unique id of the identity that created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp.","readOnly":true},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"Unique id of the identity that last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"IpAddresses":{"type":"object","description":"The IP addresses of the distribution.\nNote that the IP addresses will be included in the response only when\nthe CDN distribution is in the 'AVAILABLE' state.\n","properties":{"publicEndpointIpv4":{"type":"string","format":"ipv4","description":"IP of the distribution. It has to be included on the domain DNS Zone as A record.","readOnly":true},"publicEndpointIpv6":{"type":"string","format":"ipv6","description":"IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.","readOnly":true}}},"ResourceState":{"type":"object","description":"The current status of the resource.","required":["state"],"properties":{"state":{"type":"string","description":"Represents one of the possible states of the resource.","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"],"readOnly":true},"message":{"type":"string","description":"A human readable message describing the current state.\nIn case of an error, the message will contain a detailed error message.\n","readOnly":true}}},"Distribution":{"type":"object","description":"A CDN distribution resource.\n","required":["domain","routingRules"],"properties":{"domain":{"description":"The domain of the distribution.","type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253},"certificateId":{"description":"The ID of the certificate to use for the distribution.","type":"string","format":"uuid"},"routingRules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"},"description":"The routing rules for the distribution.","minItems":1,"maxItems":25}}},"RoutingRule":{"type":"object","required":["prefix","upstream","scheme"],"properties":{"scheme":{"type":"string","description":"The scheme of the routing rule.","enum":["http","https","http/https"]},"prefix":{"type":"string","description":"The prefix of the routing rule.","pattern":"^(\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*[\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*]*)$","minLength":1,"maxLength":128},"upstream":{"$ref":"#/components/schemas/Upstream"}}},"Upstream":{"type":"object","required":["host","caching","waf","rateLimitClass","sniMode"],"properties":{"host":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","description":"The upstream host that handles the requests if not already cached.\nThis host will be protected by the WAF if the option is enabled.\n"},"caching":{"type":"boolean","description":"Enable or disable caching.\nIf enabled, the CDN will cache the responses from the upstream host.\nSubsequent requests for the same resource will be served from the cache.\n"},"waf":{"type":"boolean","description":"Enable or disable WAF to protect the upstream host."},"geoRestrictions":{"description":"This field manages the list of countries that are allowed or blocked from accessing the resource\nfrom the upstream host based on their ISO 3166-1 alpha-2 codes.\n","oneOf":[{"type":"object","required":["blockList"],"properties":{"blockList":{"$ref":"#/components/schemas/CountryCodes"}}},{"type":"object","required":["allowList"],"properties":{"allowList":{"$ref":"#/components/schemas/CountryCodes"}}}]},"rateLimitClass":{"type":"string","enum":["R1","R5","R10","R25","R50","R100","R250","R500"],"description":"Rate limit class that will be applied to limit the number of incoming requests per IP."},"sniMode":{"type":"string","description":"The SNI (Server Name Indication) mode of the upstream host. It supports two modes:\n- distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate\nthat matches the configured domain of the CDN distribution.\n- origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that\nmatches the configured upstream/origin hostname.\n","enum":["distribution","origin"]}}},"CountryCodes":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"description":"Country codes, the format should be based on ISO 3166-1 alpha-2 codes standard.\nThese codes are used to either block or allow countries in geoIPBlock.\n"},"Pagination":{"required":["offset","limit","_links"],"description":"Pagination information. The offset and limit parameters are used to\nnavigate the list of elements. The _links object contains URLs to\nnavigate the different pages.\n","type":"object","properties":{"offset":{"$ref":"#/components/schemas/Offset"},"limit":{"$ref":"#/components/schemas/Limit"},"_links":{"$ref":"#/components/schemas/Links"}}},"Offset":{"description":"The offset specified in the request (if none was specified, the default\noffset is 0).\n","type":"integer","minimum":0,"readOnly":true},"Limit":{"description":"The limit specified in the request (if none was specified, use the\nendpoint's default pagination limit).\n","type":"integer","minimum":0,"readOnly":true},"Links":{"description":"URLs to navigate the different pages. As of now we always only return a\nsingle page.\n","type":"object","properties":{"prev":{"description":"URL (with offset and limit parameters) of the previous page; only\npresent if offset is greater than 0.\n","type":"string","format":"uri","readOnly":true},"self":{"description":"URL (with offset and limit parameters) of the current page.\n","type":"string","format":"uri","readOnly":true},"next":{"description":"URL (with offset and limit parameters) of the next page; only\npresent if offset + limit is less than the total number of elements.\n","type":"string","format":"uri","readOnly":true}}},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/distributions":{"get":{"operationId":"distributionsGet","summary":"Retrieve all Distributions","description":"This endpoint enables retrieving all Distributions using\npagination and optional filters.\n","parameters":[{"$ref":"#/components/parameters/paginationOffset"},{"$ref":"#/components/parameters/paginationLimit"},{"$ref":"#/components/parameters/domain"},{"$ref":"#/components/parameters/state"}],"tags":["Distributions"],"responses":{"200":{"description":"Returned all requested Distributions successfully.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionReadList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```

## Create Distribution

> Creates a new Distribution.\
> \
> The full Distribution needs to be provided to create the object.\
> Optional data will be filled with defaults or left empty.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\n\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"schemas":{"DistributionCreate":{"type":"object","required":["properties"],"properties":{"metadata":{"description":"Metadata","additionalProperties":true},"properties":{"$ref":"#/components/schemas/Distribution"}}},"Distribution":{"type":"object","description":"A CDN distribution resource.\n","required":["domain","routingRules"],"properties":{"domain":{"description":"The domain of the distribution.","type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253},"certificateId":{"description":"The ID of the certificate to use for the distribution.","type":"string","format":"uuid"},"routingRules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"},"description":"The routing rules for the distribution.","minItems":1,"maxItems":25}}},"RoutingRule":{"type":"object","required":["prefix","upstream","scheme"],"properties":{"scheme":{"type":"string","description":"The scheme of the routing rule.","enum":["http","https","http/https"]},"prefix":{"type":"string","description":"The prefix of the routing rule.","pattern":"^(\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*[\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*]*)$","minLength":1,"maxLength":128},"upstream":{"$ref":"#/components/schemas/Upstream"}}},"Upstream":{"type":"object","required":["host","caching","waf","rateLimitClass","sniMode"],"properties":{"host":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","description":"The upstream host that handles the requests if not already cached.\nThis host will be protected by the WAF if the option is enabled.\n"},"caching":{"type":"boolean","description":"Enable or disable caching.\nIf enabled, the CDN will cache the responses from the upstream host.\nSubsequent requests for the same resource will be served from the cache.\n"},"waf":{"type":"boolean","description":"Enable or disable WAF to protect the upstream host."},"geoRestrictions":{"description":"This field manages the list of countries that are allowed or blocked from accessing the resource\nfrom the upstream host based on their ISO 3166-1 alpha-2 codes.\n","oneOf":[{"type":"object","required":["blockList"],"properties":{"blockList":{"$ref":"#/components/schemas/CountryCodes"}}},{"type":"object","required":["allowList"],"properties":{"allowList":{"$ref":"#/components/schemas/CountryCodes"}}}]},"rateLimitClass":{"type":"string","enum":["R1","R5","R10","R25","R50","R100","R250","R500"],"description":"Rate limit class that will be applied to limit the number of incoming requests per IP."},"sniMode":{"type":"string","description":"The SNI (Server Name Indication) mode of the upstream host. It supports two modes:\n- distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate\nthat matches the configured domain of the CDN distribution.\n- origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that\nmatches the configured upstream/origin hostname.\n","enum":["distribution","origin"]}}},"CountryCodes":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"description":"Country codes, the format should be based on ISO 3166-1 alpha-2 codes standard.\nThese codes are used to either block or allow countries in geoIPBlock.\n"},"DistributionRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","description":"The ID (UUID) of the Distribution.","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["distribution"]},"href":{"description":"The URL of the Distribution.","type":"string"},"metadata":{"$ref":"#/components/schemas/DistributionMetadata"},"properties":{"$ref":"#/components/schemas/Distribution"}}},"DistributionMetadata":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Metadata"},{"$ref":"#/components/schemas/IpAddresses"},{"$ref":"#/components/schemas/ResourceState"}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp.","readOnly":true},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"Unique id of the identity that created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp.","readOnly":true},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"Unique id of the identity that last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"IpAddresses":{"type":"object","description":"The IP addresses of the distribution.\nNote that the IP addresses will be included in the response only when\nthe CDN distribution is in the 'AVAILABLE' state.\n","properties":{"publicEndpointIpv4":{"type":"string","format":"ipv4","description":"IP of the distribution. It has to be included on the domain DNS Zone as A record.","readOnly":true},"publicEndpointIpv6":{"type":"string","format":"ipv6","description":"IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.","readOnly":true}}},"ResourceState":{"type":"object","description":"The current status of the resource.","required":["state"],"properties":{"state":{"type":"string","description":"Represents one of the possible states of the resource.","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"],"readOnly":true},"message":{"type":"string","description":"A human readable message describing the current state.\nIn case of an error, the message will contain a detailed error message.\n","readOnly":true}}},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMediaType":{"description":"### Unsupported Media Type\nThe request has an unsupported media type.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"### Unprocessable Entity\nThe request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/distributions":{"post":{"operationId":"distributionsPost","summary":"Create Distribution","tags":["Distributions"],"description":"Creates a new Distribution.\n\nThe full Distribution needs to be provided to create the object.\nOptional data will be filled with defaults or left empty.\n","requestBody":{"description":"Distribution to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionCreate"}}}},"responses":{"201":{"description":"Distribution successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```

## Retrieve Distribution

> Returns the Distribution by ID.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\n\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"schemas":{"DistributionRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","description":"The ID (UUID) of the Distribution.","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["distribution"]},"href":{"description":"The URL of the Distribution.","type":"string"},"metadata":{"$ref":"#/components/schemas/DistributionMetadata"},"properties":{"$ref":"#/components/schemas/Distribution"}}},"DistributionMetadata":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Metadata"},{"$ref":"#/components/schemas/IpAddresses"},{"$ref":"#/components/schemas/ResourceState"}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp.","readOnly":true},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"Unique id of the identity that created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp.","readOnly":true},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"Unique id of the identity that last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"IpAddresses":{"type":"object","description":"The IP addresses of the distribution.\nNote that the IP addresses will be included in the response only when\nthe CDN distribution is in the 'AVAILABLE' state.\n","properties":{"publicEndpointIpv4":{"type":"string","format":"ipv4","description":"IP of the distribution. It has to be included on the domain DNS Zone as A record.","readOnly":true},"publicEndpointIpv6":{"type":"string","format":"ipv6","description":"IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.","readOnly":true}}},"ResourceState":{"type":"object","description":"The current status of the resource.","required":["state"],"properties":{"state":{"type":"string","description":"Represents one of the possible states of the resource.","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"],"readOnly":true},"message":{"type":"string","description":"A human readable message describing the current state.\nIn case of an error, the message will contain a detailed error message.\n","readOnly":true}}},"Distribution":{"type":"object","description":"A CDN distribution resource.\n","required":["domain","routingRules"],"properties":{"domain":{"description":"The domain of the distribution.","type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253},"certificateId":{"description":"The ID of the certificate to use for the distribution.","type":"string","format":"uuid"},"routingRules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"},"description":"The routing rules for the distribution.","minItems":1,"maxItems":25}}},"RoutingRule":{"type":"object","required":["prefix","upstream","scheme"],"properties":{"scheme":{"type":"string","description":"The scheme of the routing rule.","enum":["http","https","http/https"]},"prefix":{"type":"string","description":"The prefix of the routing rule.","pattern":"^(\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*[\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*]*)$","minLength":1,"maxLength":128},"upstream":{"$ref":"#/components/schemas/Upstream"}}},"Upstream":{"type":"object","required":["host","caching","waf","rateLimitClass","sniMode"],"properties":{"host":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","description":"The upstream host that handles the requests if not already cached.\nThis host will be protected by the WAF if the option is enabled.\n"},"caching":{"type":"boolean","description":"Enable or disable caching.\nIf enabled, the CDN will cache the responses from the upstream host.\nSubsequent requests for the same resource will be served from the cache.\n"},"waf":{"type":"boolean","description":"Enable or disable WAF to protect the upstream host."},"geoRestrictions":{"description":"This field manages the list of countries that are allowed or blocked from accessing the resource\nfrom the upstream host based on their ISO 3166-1 alpha-2 codes.\n","oneOf":[{"type":"object","required":["blockList"],"properties":{"blockList":{"$ref":"#/components/schemas/CountryCodes"}}},{"type":"object","required":["allowList"],"properties":{"allowList":{"$ref":"#/components/schemas/CountryCodes"}}}]},"rateLimitClass":{"type":"string","enum":["R1","R5","R10","R25","R50","R100","R250","R500"],"description":"Rate limit class that will be applied to limit the number of incoming requests per IP."},"sniMode":{"type":"string","description":"The SNI (Server Name Indication) mode of the upstream host. It supports two modes:\n- distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate\nthat matches the configured domain of the CDN distribution.\n- origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that\nmatches the configured upstream/origin hostname.\n","enum":["distribution","origin"]}}},"CountryCodes":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"description":"Country codes, the format should be based on ISO 3166-1 alpha-2 codes standard.\nThese codes are used to either block or allow countries in geoIPBlock.\n"},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/distributions/{distributionId}":{"get":{"operationId":"distributionsFindById","summary":"Retrieve Distribution","tags":["Distributions"],"description":"Returns the Distribution by ID.","parameters":[{"name":"distributionId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the Distribution."}],"responses":{"200":{"description":"Getting Distribution was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```

## Ensure Distribution

> Ensures that the Distribution with the provided ID is created or modified.\
> The full Distribution needs to be provided to ensure\
> (either update or create) the Distribution. Non present data will\
> only be filled with defaults or left empty, but not take\
> previous values into consideration.<br>

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\n\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"schemas":{"DistributionEnsure":{"type":"object","required":["properties"],"properties":{"metadata":{"description":"Metadata","additionalProperties":true},"properties":{"$ref":"#/components/schemas/Distribution"}}},"Distribution":{"type":"object","description":"A CDN distribution resource.\n","required":["domain","routingRules"],"properties":{"domain":{"description":"The domain of the distribution.","type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","minLength":2,"maxLength":253},"certificateId":{"description":"The ID of the certificate to use for the distribution.","type":"string","format":"uuid"},"routingRules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"},"description":"The routing rules for the distribution.","minItems":1,"maxItems":25}}},"RoutingRule":{"type":"object","required":["prefix","upstream","scheme"],"properties":{"scheme":{"type":"string","description":"The scheme of the routing rule.","enum":["http","https","http/https"]},"prefix":{"type":"string","description":"The prefix of the routing rule.","pattern":"^(\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*[\\/[\\w\\;\\:\\@\\&\\=\\$\\+\\.\\-]*]*)$","minLength":1,"maxLength":128},"upstream":{"$ref":"#/components/schemas/Upstream"}}},"Upstream":{"type":"object","required":["host","caching","waf","rateLimitClass","sniMode"],"properties":{"host":{"type":"string","pattern":"^(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}\\.?$","description":"The upstream host that handles the requests if not already cached.\nThis host will be protected by the WAF if the option is enabled.\n"},"caching":{"type":"boolean","description":"Enable or disable caching.\nIf enabled, the CDN will cache the responses from the upstream host.\nSubsequent requests for the same resource will be served from the cache.\n"},"waf":{"type":"boolean","description":"Enable or disable WAF to protect the upstream host."},"geoRestrictions":{"description":"This field manages the list of countries that are allowed or blocked from accessing the resource\nfrom the upstream host based on their ISO 3166-1 alpha-2 codes.\n","oneOf":[{"type":"object","required":["blockList"],"properties":{"blockList":{"$ref":"#/components/schemas/CountryCodes"}}},{"type":"object","required":["allowList"],"properties":{"allowList":{"$ref":"#/components/schemas/CountryCodes"}}}]},"rateLimitClass":{"type":"string","enum":["R1","R5","R10","R25","R50","R100","R250","R500"],"description":"Rate limit class that will be applied to limit the number of incoming requests per IP."},"sniMode":{"type":"string","description":"The SNI (Server Name Indication) mode of the upstream host. It supports two modes:\n- distribution: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate\nthat matches the configured domain of the CDN distribution.\n- origin: for outgoing connections to the upstream host, the CDN requires the upstream host to present a valid certificate that\nmatches the configured upstream/origin hostname.\n","enum":["distribution","origin"]}}},"CountryCodes":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},"description":"Country codes, the format should be based on ISO 3166-1 alpha-2 codes standard.\nThese codes are used to either block or allow countries in geoIPBlock.\n"},"DistributionRead":{"type":"object","required":["id","type","href","metadata","properties"],"properties":{"id":{"type":"string","description":"The ID (UUID) of the Distribution.","format":"uuid"},"type":{"description":"The type of the resource.","type":"string","enum":["distribution"]},"href":{"description":"The URL of the Distribution.","type":"string"},"metadata":{"$ref":"#/components/schemas/DistributionMetadata"},"properties":{"$ref":"#/components/schemas/Distribution"}}},"DistributionMetadata":{"readOnly":true,"allOf":[{"$ref":"#/components/schemas/Metadata"},{"$ref":"#/components/schemas/IpAddresses"},{"$ref":"#/components/schemas/ResourceState"}]},"Metadata":{"type":"object","description":"Metadata of the resource.","properties":{"createdDate":{"type":"string","format":"date-time","description":"The ISO 8601 creation timestamp.","readOnly":true},"createdBy":{"type":"string","description":"Unique name of the identity that created the resource.","readOnly":true},"createdByUserId":{"type":"string","description":"Unique id of the identity that created the resource.","readOnly":true},"lastModifiedDate":{"type":"string","format":"date-time","description":"The ISO 8601 modified timestamp.","readOnly":true},"lastModifiedBy":{"type":"string","description":"Unique name of the identity that last modified the resource.","readOnly":true},"lastModifiedByUserId":{"type":"string","description":"Unique id of the identity that last modified the resource.","readOnly":true},"resourceURN":{"type":"string","description":"Unique name of the resource.","readOnly":true}}},"IpAddresses":{"type":"object","description":"The IP addresses of the distribution.\nNote that the IP addresses will be included in the response only when\nthe CDN distribution is in the 'AVAILABLE' state.\n","properties":{"publicEndpointIpv4":{"type":"string","format":"ipv4","description":"IP of the distribution. It has to be included on the domain DNS Zone as A record.","readOnly":true},"publicEndpointIpv6":{"type":"string","format":"ipv6","description":"IP of the distribution, it has to be included on the domain DNS Zone as AAAA record.","readOnly":true}}},"ResourceState":{"type":"object","description":"The current status of the resource.","required":["state"],"properties":{"state":{"type":"string","description":"Represents one of the possible states of the resource.","enum":["AVAILABLE","BUSY","FAILED","UNKNOWN"],"readOnly":true},"message":{"type":"string","description":"A human readable message describing the current state.\nIn case of an error, the message will contain a detailed error message.\n","readOnly":true}}},"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"### Conflict\nThe UUID is already taken by another party, follow the guides to generate UUIDs uniquely.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnsupportedMediaType":{"description":"### Unsupported Media Type\nThe request has an unsupported media type.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"### Unprocessable Entity\nThe request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/distributions/{distributionId}":{"put":{"operationId":"distributionsPut","summary":"Ensure Distribution","tags":["Distributions"],"description":"Ensures that the Distribution with the provided ID is created or modified.\nThe full Distribution needs to be provided to ensure\n(either update or create) the Distribution. Non present data will\nonly be filled with defaults or left empty, but not take\nprevious values into consideration.\n","parameters":[{"name":"distributionId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the Distribution."}],"requestBody":{"description":"update Distribution","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionEnsure"}}}},"responses":{"200":{"description":"Distribution successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionRead"}}}},"201":{"description":"Distribution successfully ensured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DistributionRead"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"415":{"$ref":"#/components/responses/UnsupportedMediaType"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```

## Delete Distribution

> Deletes the specified Distribution.

```json
{"openapi":"3.0.3","info":{"title":"IONOS Cloud - CDN Distribution API","version":"1.2.0"},"tags":[{"name":"Distributions","description":"A CDN distribution resource.\n\nThis tag groups all operations for distributions.\n"}],"servers":[{"url":"https://cdn.de-fra.ionos.com","description":"Frankfurt"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"The token can be generated using the \n[Authentication API](https://api.ionos.com/docs/authentication/v1/#tag/tokens/operation/tokensGenerate).\n"}},"responses":{"BadRequest":{"description":"### Bad Request\nThe request send to the API was malformed.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"### Unauthorized\nThe request is missing authorization information or the authorization information provided are expired.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotAllowed":{"description":"### Not Allowed\nThe user issuing the request does not have the needed permissions.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"### Not Found\nThe resource that was requested could not be found.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"### Too Many Requests\nThe user has sent too many requests in a given amount of time.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"### Internal Server Error\nAn internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ServiceUnavailable":{"description":"### Service Unavailable\nThe server is currently unable to handle the request due to a temporary overloading or maintenance of the server.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnexpectedError":{"description":"### Unexpected Internal Server Error\nAn unexpected internal error occurred. We apologize for the inconvenience!\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"description":"The Error object is used to represent an error response from the API.\n","type":"object","properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","description":"A list of error messages.\n","items":{"type":"object","properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}}}}}}}},"paths":{"/distributions/{distributionId}":{"delete":{"operationId":"distributionsDelete","summary":"Delete Distribution","tags":["Distributions"],"description":"Deletes the specified Distribution.","parameters":[{"name":"distributionId","in":"path","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID (UUID) of the Distribution."}],"responses":{"202":{"description":"Deleting Distribution was successful."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/NotAllowed"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"default":{"$ref":"#/components/responses/UnexpectedError"}}}}}}
```
