IObjectStorageProviderUpdateObjectMetadata Method |
Namespace: net.openstack.Core.Providers
void UpdateObjectMetadata( string container, string objectName, Dictionary<string, string> metadata, string region = null, bool useInternalUrl = false, CloudIdentity identity = null )
Exception | Condition |
---|---|
ArgumentNullException |
If container is .
-or- If objectName is . -or- If metadata is . |
ArgumentException |
If container is empty.
-or- If objectName is empty. -or- If metadata contains two equivalent keys when compared using OrdinalIgnoreCase. |
ContainerNameException | If container is not a valid container name. |
ObjectNameException | If objectName is not a valid object name. |
NotSupportedException |
If the provider does not support the given identity type.
-or- The specified region is not supported. -or- useInternalUrl is and the provider does not support internal URLs. |
InvalidOperationException |
If identity is and no default identity is available for the provider.
-or- If region is and no default region is available for the provider. |
ResponseException | If the REST API request failed. |
Caution |
---|
This method replaces all existing metadata for the object with the values found in metadata. To add or change existing metadata values without affecting all metadata for the object, first call GetObjectMetaData(String, String, String, Boolean, CloudIdentity), modify the returned Dictionary<string, string>, then call UpdateObjectMetadata(String, String, DictionaryString, String, String, Boolean, CloudIdentity) with the modified metadata dictionary. |