...
Code Block |
---|
POST /?domain=domain-name[&alias] POST /[?alias] Host: domain-name |
Info | |
---|---|
title | ImportantWhen writing unnamed objects, use a HOST header equivalent to the cluster name, the host IP address, or a domain=clusterName query argargument on all requests even if you are not using domains for other purposes. |
Info | |
---|---|
title | CautionWhen writing unnamed objects, ensure that your application is not passing a HOST header that is neither an IP address nor a domain that exists in the cluster (unless the host header matches the cluster name). Swarm will attempt to look up the non-existent domain on every request and will wait for multiple retries before the lookup times out, impacting performance. |
The alias query argument is required to create an alias object. To create an immutable object, simply omit the alias query argument.
The following table summarizes the differences with unnamed objects and domains in version 6.0 and later compared to earlier ones:
Unnamed Behavior in Version 6.0+ | Behavior in Earlier Versions |
---|---|
An unnamed object can be created in a domain (but not in a bucket). An unnamed object created in version 6.0 and later is associated with a domain only if the object is explicitly associated with a domain using either the domain= query argument or a host header. If the configuration parameter cluster.enforceTenancy is set to false (default) and either a domain is not specified, the default domain is specified, or a domain that does not exist is specified on the POST using either the domain= query arguments or the host header, then the object is not associated with a domain. You cannot write unnamed streams into the default domain unless cluster.enforceTenancy=True If the configuration parameter cluster.enforceTenancy is set to true and an alternate domain is not specified on the POST request, then the object is associated with the default cluster-name domain. With cluster.enforceTenancy set to true, specifying a domain that does not exist on the POST request will result in a 412 response. | Unnamed objects were always untenanted (not associated with any domain). |
Whether unnamed objects are permitted in a particular domain is determined by the protection settings created in the domain, including the default domain. If unnamed objects are not associated with a domain, there are no POST restrictions. | Whether unnamed objects POSTs were allowed was always determined by the protection settings of the default cluster domain. |