mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2024-11-21 17:56:56 +02:00
Main build (Jenkins)
This commit is contained in:
parent
1fb8155f7a
commit
2e8cdc04ac
@ -1683,6 +1683,10 @@ def test_s3(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe s3 DeleteObject --name "test" --bucket "test" --basic "test" --ver "test" --headers "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe s3 CopyObject --sname "test" --sbucket "test" --name "test" --bucket "test" --basic "test" --headers "test" --debug --test '
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1683,6 +1683,10 @@ def test_s3(){
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe s3 УдалитьОбъект --name "test" --bucket "test" --basic "test" --ver "test" --headers "test" --debug --test '
|
||||
}
|
||||
|
||||
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
||||
powershell encoding: 'UTF-8', script:'./oint.exe s3 КопироватьОбъект --sname "test" --sbucket "test" --name "test" --bucket "test" --basic "test" --headers "test" --debug --test '
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
5
docs/en/data/S3/CopyObject.json
Normal file
5
docs/en/data/S3/CopyObject.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
14
docs/en/examples/S3/CopyObject.txt
Normal file
14
docs/en/examples/S3/CopyObject.txt
Normal file
@ -0,0 +1,14 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
|
@ -6,4 +6,4 @@
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
|
@ -6,4 +6,4 @@
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
|
@ -6,6 +6,6 @@
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True);
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData);
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True, "1234");
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, , "1234");
|
||||
|
@ -13,4 +13,4 @@
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig, False);
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig);
|
||||
|
@ -12,9 +12,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, False);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
|
@ -9,9 +9,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , False);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.DeleteCounter(Token, CounterID);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
|
||||
Result = OPI_YandexMetrika.DeleteTag(Token, TagID);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.GetCounter(Token, CounterID);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.GetCountersList(Token);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
|
||||
Result = OPI_YandexMetrika.GetTag(Token, TagID);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.RestoreCounter(Token, CounterID);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
Name = "New tag title";
|
||||
|
||||
Result = OPI_YandexMetrika.UpdateTag(Token, TagID, Name);
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function CreateBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function CreateBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ Method at AWS documentation: [CreateBucket](https://docs.aws.amazon.com/AmazonS3
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -76,23 +76,4 @@ Method at AWS documentation: [CreateBucket](https://docs.aws.amazon.com/AmazonS3
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:03 GMT",
|
||||
"Location": "/opi-gpbucket3",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "1808D7A0D961B89C",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function DeleteBucketEncryption(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function DeleteBucketEncryption(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -39,7 +39,7 @@ Method at AWS documentation: [DeleteBucketEncryption](https://docs.aws.amazon.co
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -69,21 +69,4 @@ Method at AWS documentation: [DeleteBucketEncryption](https://docs.aws.amazon.co
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:07 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "1808D7A1D8C17D3F",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function DeleteBucketTagging(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function DeleteBucketTagging(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ Method at AWS documentation: [DeleteBucketTagging](https://docs.aws.amazon.com/A
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -76,21 +76,4 @@ Method at AWS documentation: [DeleteBucketTagging](https://docs.aws.amazon.com/A
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:06 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "1808D7A19BE6AFD7",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function DeleteBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function DeleteBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ Method at AWS documentation: [DeleteBucket](https://docs.aws.amazon.com/AmazonS3
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -76,21 +76,4 @@ Method at AWS documentation: [DeleteBucket](https://docs.aws.amazon.com/AmazonS3
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:10 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
|
||||
"X-Amz-Request-Id": "1808D7A2A40E2E8E",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function GetBucketEncryption(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function GetBucketEncryption(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -39,7 +39,7 @@ Method at AWS documentation: [GetBucketEncryption](https://docs.aws.amazon.com/A
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function GetBucketTagging(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function GetBucketTagging(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ Method at AWS documentation: [GetBucketTagging](https://docs.aws.amazon.com/Amaz
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -76,37 +76,4 @@ Method at AWS documentation: [GetBucketTagging](https://docs.aws.amazon.com/Amaz
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"Tagging": {
|
||||
"TagSet": {
|
||||
"Tag": [
|
||||
{
|
||||
"Key": "MyTag1",
|
||||
"Value": "SomeValue"
|
||||
},
|
||||
{
|
||||
"Key": "MyTag2",
|
||||
"Value": "AnotherOne"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "141",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:05 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "1808D7A176903161",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function GetBucketVersioning(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function GetBucketVersioning(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ Method at AWS documentation: [GetBucketVersioning](https://docs.aws.amazon.com/A
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
```
|
||||
|
||||
|
||||
@ -76,26 +76,4 @@ Method at AWS documentation: [GetBucketVersioning](https://docs.aws.amazon.com/A
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"VersioningConfiguration": {
|
||||
"Status": "Enabled"
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "123",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:09 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "1808D7A271D34A45",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function HeadBucket(Val Name, Val BasicData, Val Directory = True, Val AccountID = "", Val Headers = Undefined) Export`
|
||||
`Function HeadBucket(Val Name, Val BasicData, Val Directory = False, Val AccountID = "", Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -40,9 +40,9 @@ Method at AWS documentation: [HeadBucket](https://docs.aws.amazon.com/AmazonS3/l
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True);
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData);
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True, "1234");
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, , "1234");
|
||||
```
|
||||
|
||||
|
||||
@ -72,22 +72,4 @@ Method at AWS documentation: [HeadBucket](https://docs.aws.amazon.com/AmazonS3/l
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:03 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "1808D7A10D35DDC0",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -64,49 +64,4 @@ Method at AWS documentation: [ListBuckets](https://docs.aws.amazon.com/AmazonS3/
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"ListAllMyBucketsResult": {
|
||||
"Owner": {
|
||||
"ID": "02d6176db174dc93cb1b899f7c6078f08654445fe8cf1b6ce98d8855f66bdbf4",
|
||||
"DisplayName": "minio"
|
||||
},
|
||||
"Buckets": {
|
||||
"Bucket": [
|
||||
{
|
||||
"Name": "newbucket2",
|
||||
"CreationDate": "2024-11-13T18:59:09.139Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-dirbucket3",
|
||||
"CreationDate": "2024-11-17T19:19:01.829Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-gpbucket3",
|
||||
"CreationDate": "2024-11-17T19:19:02.567Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-newbucket2",
|
||||
"CreationDate": "2024-11-14T06:04:12.769Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "658",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:03 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "1808D7A10B9CA3BE",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function PutBucketEncryption(Val Name, Val BasicData, Val XmlConfig, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function PutBucketEncryption(Val Name, Val BasicData, Val XmlConfig, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -47,7 +47,7 @@ Method at AWS documentation: [PutBucketEncryption](https://docs.aws.amazon.com/A
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig, False);
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig);
|
||||
```
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function PutBucketTagging(Val Name, Val BasicData, Val Tags, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function PutBucketTagging(Val Name, Val BasicData, Val Tags, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -48,12 +48,12 @@ Setting up a new set removes all existing bucket tags
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, False);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
```
|
||||
|
||||
|
||||
@ -85,22 +85,4 @@ Setting up a new set removes all existing bucket tags
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:05 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
|
||||
"X-Amz-Request-Id": "1808D7A143E60F5E",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Function PutBucketVersioning(Val Name, Val BasicData, Val Status = Undefined, Val MFADelete = Undefined, Val Directory = True, Val Headers = Undefined) Export`
|
||||
`Function PutBucketVersioning(Val Name, Val BasicData, Val Status = Undefined, Val MFADelete = Undefined, Val Directory = False, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
@ -44,12 +44,12 @@ Method at AWS documentation: [PutBucketVersioning](https://docs.aws.amazon.com/A
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , True);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , False);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
```
|
||||
|
||||
|
||||
@ -81,22 +81,4 @@ Method at AWS documentation: [PutBucketVersioning](https://docs.aws.amazon.com/A
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:09 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "1808D7A221A6A6A4",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -62,12 +62,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67YCVDZRRQVI",
|
||||
"SecretKey": "***",
|
||||
"Region": "BTC",
|
||||
"Service": "s3"
|
||||
}
|
||||
```
|
||||
|
||||
|
55
docs/en/md/S3/Objects-managment/Copy-object.mdx
Normal file
55
docs/en/md/S3/Objects-managment/Copy-object.mdx
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Copy object
|
||||
Copies an object from one location to another
|
||||
|
||||
|
||||
|
||||
`Function CopyObject(Val SourcePath, Val DestinationBucket, Val DestinationPath, Val SourceBucket, Val BasicData, Val Headers = Undefined) Export`
|
||||
|
||||
| Parameter | CLI option | Type | Required | Description |
|
||||
|-|-|-|-|-|
|
||||
| SourcePath | --sname | String | ✔ | Path (name) in the source bucket |
|
||||
| DestinationBucket | --sbucket | String | ✔ | Source bucket name |
|
||||
| DestinationPath | --name | String | ✔ | Path (name) in the destination bucket |
|
||||
| SourceBucket | --bucket | String | ✔ | Destination bucket name |
|
||||
| BasicData | --basic | Structure of KeyAndValue | ✔ | Basic request data. See GetBasicDataStructure |
|
||||
| Headers | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
|
||||
|
||||
|
||||
Returns: Structure of KeyAndValue - serialized JSON response from storage
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Method at AWS documentation: [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -72,21 +72,4 @@ Method at AWS documentation: [DeleteObject](https://docs.aws.amazon.com/AmazonS3
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:18 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
|
||||
"X-Amz-Request-Id": "1808D7A4849B0502",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -74,24 +74,4 @@ Object metadata is contained in the headers
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "2114023",
|
||||
"Content-Type": "binary/octet-stream",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:18 GMT",
|
||||
"Etag": "\"9e0176f87f6565a22f78e0f9b39a4d78\"",
|
||||
"Last-Modified": "Sun, 17 Nov 2024 19:19:17 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "1808D7A482B3F9BB",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -76,23 +76,4 @@ Parameters with Binary data type can also accept file paths on disk and URLs
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Result"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sun, 17 Nov 2024 19:19:18 GMT",
|
||||
"Etag": "\"9e0176f87f6565a22f78e0f9b39a4d78\"",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "1808D7A3D2CDAE87",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [Deleting a counter](https://yandex.ru/dev/metrika/
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.DeleteCounter(Token, CounterID);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [Counter information](https://yandex.ru/dev/metrika
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.GetCounter(Token, CounterID);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [List of available counters](https://yandex.ru/dev/
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.GetCountersList(Token);
|
||||
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [Restoring a counter](https://yandex.ru/dev/metrika
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
Result = OPI_YandexMetrika.RestoreCounter(Token, CounterID);
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ Method at API documentation: [Changing a counter](https://yandex.ru/dev/metrika/
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
CounterID = "98889888";
|
||||
CounterID = "98962337";
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [Deleting a tag](https://yandex.ru/dev/metrika/en/m
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
|
||||
Result = OPI_YandexMetrika.DeleteTag(Token, TagID);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ Method at API documentation: [Tag information](https://yandex.ru/dev/metrika/en/
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
|
||||
Result = OPI_YandexMetrika.GetTag(Token, TagID);
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ Method at API documentation: [Changing a tag](https://yandex.ru/dev/metrika/en/m
|
||||
|
||||
```bsl title="1C:Enterprise/OneScript code example"
|
||||
Token = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
TagID = "313591";
|
||||
TagID = "313721";
|
||||
Name = "New tag title";
|
||||
|
||||
Result = OPI_YandexMetrika.UpdateTag(Token, TagID, Name);
|
||||
|
5
docs/ru/data/S3/КопироватьОбъект.json
Normal file
5
docs/ru/data/S3/КопироватьОбъект.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67...",
|
||||
"SecretKey": "NNhv+i9PrytpT8Tu0C1N..."
|
||||
}
|
14
docs/ru/examples/S3/КопироватьОбъект.txt
Normal file
14
docs/ru/examples/S3/КопироватьОбъект.txt
Normal file
@ -0,0 +1,14 @@
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
ПутьИсточник = "picture.jpg";
|
||||
БакетИсточник = "opi-gpbucket3";
|
||||
|
||||
ПутьПриемник = "new_picture.jpg";
|
||||
БакетПриемник = "opi-dirbucket3";
|
||||
|
||||
Результат = OPI_S3.КопироватьОбъект(ПутьИсточник, БакетИсточник, ПутьПриемник, БакетПриемник, ОсновныеДанные);
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
|
@ -6,4 +6,4 @@
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-newbucket2";
|
||||
|
||||
Результат = OPI_S3.ПолучитьШифрованиеБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьШифрованиеБакета(Наименование, ОсновныеДанные);
|
||||
|
@ -6,6 +6,6 @@
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-dirbucket3";
|
||||
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, Истина);
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные);
|
||||
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, Истина, "1234");
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, , "1234");
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные);
|
||||
|
@ -8,9 +8,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
|
@ -6,4 +6,4 @@
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-newbucket2";
|
||||
|
||||
Результат = OPI_S3.УдалитьШифрованиеБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьШифрованиеБакета(Наименование, ОсновныеДанные);
|
||||
|
@ -9,9 +9,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус);
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус, , Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус, , Ложь);
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус);
|
||||
|
@ -12,9 +12,9 @@
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов);
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов, Ложь);
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов);
|
||||
|
@ -13,4 +13,4 @@
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Результат = OPI_S3.УстановитьШифрованиеБакета(Наименование, ОсновныеДанные, XMLКонфигурация, Ложь);
|
||||
Результат = OPI_S3.УстановитьШифрованиеБакета(Наименование, ОсновныеДанные, XMLКонфигурация);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ВосстановитьСчетчик(Токен, IDСчетчика);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
Наименование = "Новое имя метки";
|
||||
|
||||
Результат = OPI_YandexMetrika.ИзменитьМетку(Токен, IDМетки, Наименование);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
СтруктураСчетчика = Новый Структура;
|
||||
СтруктураСчетчика.Вставить("autogoals_enabled", Истина);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьМетку(Токен, IDМетки);
|
||||
|
@ -1,5 +1,5 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьСписокСчетчиков(Токен);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьСчетчик(Токен, IDСчетчика);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
|
||||
Результат = OPI_YandexMetrika.УдалитьМетку(Токен, IDМетки);
|
||||
|
@ -1,4 +1,4 @@
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.УдалитьСчетчик(Токен, IDСчетчика);
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция СоздатьБакет(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция СоздатьБакет(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.СоздатьБакет(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -76,23 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:20:50 GMT",
|
||||
"Location": "/opi-gpbucket3",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "180861DA164E9270",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УдалитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УдалитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -39,7 +39,7 @@ import TabItem from '@theme/TabItem';
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-newbucket2";
|
||||
|
||||
Результат = OPI_S3.УдалитьШифрованиеБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьШифрованиеБакета(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -69,21 +69,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:06 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
|
||||
"X-Amz-Request-Id": "180861DDEFF12F9E",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УдалитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УдалитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -76,21 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:02 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "180861DD6B240194",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УдалитьБакет(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УдалитьБакет(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.УдалитьБакет(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -76,21 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:13 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "180861E09577F80C",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция ПолучитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция ПолучитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -39,7 +39,7 @@ import TabItem from '@theme/TabItem';
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-newbucket2";
|
||||
|
||||
Результат = OPI_S3.ПолучитьШифрованиеБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьШифрованиеБакета(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция ПолучитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция ПолучитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьТегиБакета(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -76,37 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"Tagging": {
|
||||
"TagSet": {
|
||||
"Tag": [
|
||||
{
|
||||
"Key": "MyTag1",
|
||||
"Value": "SomeValue"
|
||||
},
|
||||
{
|
||||
"Key": "MyTag2",
|
||||
"Value": "AnotherOne"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "141",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sat, 16 Nov 2024 07:20:56 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "0757065d17b69556603743b9ea63f04bc7b9f349245bbff6b0ba901258e9c169",
|
||||
"X-Amz-Request-Id": "180861DC907AF051",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция ПолучитьНастройкийВерсионированияБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция ПолучитьНастройкийВерсионированияБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -41,12 +41,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные);
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные, Ложь);
|
||||
Результат = OPI_S3.ПолучитьНастройкийВерсионированияБакета(Наименование, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
@ -76,26 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"VersioningConfiguration": {
|
||||
"Status": "Enabled"
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "123",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:13 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "93c576aa54c960b355da9e2934476635fe3243f5df9dbb4db8b7c0d94bec7cd1",
|
||||
"X-Amz-Request-Id": "180861E0920FF871",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция ПроверитьДоступностьБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Истина, Знач IDАккаунта = "", Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция ПроверитьДоступностьБакета(Знач Наименование, Знач ОсновныеДанные, Знач Каталог = Ложь, Знач IDАккаунта = "", Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -40,9 +40,9 @@ import TabItem from '@theme/TabItem';
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
Наименование = "opi-dirbucket3";
|
||||
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, Истина);
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные);
|
||||
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, Истина, "1234");
|
||||
Результат = OPI_S3.ПроверитьДоступностьБакета(Наименование, ОсновныеДанные, , "1234");
|
||||
```
|
||||
|
||||
|
||||
@ -72,22 +72,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sat, 16 Nov 2024 07:20:50 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "180861DB27B771BA",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -64,49 +64,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {
|
||||
"ListAllMyBucketsResult": {
|
||||
"Owner": {
|
||||
"ID": "02d6176db174dc93cb1b899f7c6078f08654445fe8cf1b6ce98d8855f66bdbf4",
|
||||
"DisplayName": "minio"
|
||||
},
|
||||
"Buckets": {
|
||||
"Bucket": [
|
||||
{
|
||||
"Name": "newbucket2",
|
||||
"CreationDate": "2024-11-13T18:59:09.139Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-dirbucket3",
|
||||
"CreationDate": "2024-11-16T07:20:42.550Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-gpbucket3",
|
||||
"CreationDate": "2024-11-16T07:20:46.030Z"
|
||||
},
|
||||
{
|
||||
"Name": "opi-newbucket2",
|
||||
"CreationDate": "2024-11-14T06:04:12.769Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "658",
|
||||
"Content-Type": "application/xml",
|
||||
"Date": "Sat, 16 Nov 2024 07:20:50 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "180861DB26B0BEDB",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УстановитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач XMLКонфигурация, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УстановитьШифрованиеБакета(Знач Наименование, Знач ОсновныеДанные, Знач XMLКонфигурация, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -47,7 +47,7 @@ import TabItem from '@theme/TabItem';
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Результат = OPI_S3.УстановитьШифрованиеБакета(Наименование, ОсновныеДанные, XMLКонфигурация, Ложь);
|
||||
Результат = OPI_S3.УстановитьШифрованиеБакета(Наименование, ОсновныеДанные, XMLКонфигурация);
|
||||
```
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УстановитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Теги, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УстановитьТегиБакета(Знач Наименование, Знач ОсновныеДанные, Знач Теги, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -48,12 +48,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов);
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов, Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов, Ложь);
|
||||
Результат = OPI_S3.УстановитьТегиБакета(Наименование, ОсновныеДанные, СтруктураТегов);
|
||||
```
|
||||
|
||||
|
||||
@ -85,22 +85,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:20:56 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "180861DBD7C0DAA8",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
|
||||
|
||||
`Функция УстановитьНастройкиВерсионированияБакета(Знач Наименование, Знач ОсновныеДанные, Знач Статус = Неопределено, Знач УдалениеMFA = Неопределено, Знач Каталог = Истина, Знач Заголовки = Неопределено) Экспорт`
|
||||
`Функция УстановитьНастройкиВерсионированияБакета(Знач Наименование, Знач ОсновныеДанные, Знач Статус = Неопределено, Знач УдалениеMFA = Неопределено, Знач Каталог = Ложь, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
@ -44,12 +44,12 @@ import TabItem from '@theme/TabItem';
|
||||
// Directory bucket
|
||||
|
||||
Наименование = "opi-dirbucket3";
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус);
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус, , Истина);
|
||||
|
||||
// General purpose bucket
|
||||
|
||||
Наименование = "opi-gpbucket3";
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус, , Ложь);
|
||||
Результат = OPI_S3.УстановитьНастройкиВерсионированияБакета(Наименование, ОсновныеДанные, Статус);
|
||||
```
|
||||
|
||||
|
||||
@ -81,22 +81,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:13 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "180861DFB8650A3E",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -62,12 +62,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"URL": "storage-155.s3hoster.by",
|
||||
"AccessKey": "BRN5RKJE67YCVDZRRQVI",
|
||||
"SecretKey": "***",
|
||||
"Region": "BTC",
|
||||
"Service": "s3"
|
||||
}
|
||||
```
|
||||
|
||||
|
55
docs/ru/md/S3/Objects-managment/Copy-object.mdx
Normal file
55
docs/ru/md/S3/Objects-managment/Copy-object.mdx
Normal file
@ -0,0 +1,55 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Копировать объект
|
||||
Копирует объект из одного расположения в другое
|
||||
|
||||
|
||||
|
||||
`Функция КопироватьОбъект(Знач ПутьИсточник, Знач БакетИсточник, Знач ПутьПриемник, Знач БакетПриемник, Знач ОсновныеДанные, Знач Заголовки = Неопределено) Экспорт`
|
||||
|
||||
| Параметр | CLI опция | Тип | Обяз. | Назначение |
|
||||
|-|-|-|-|-|
|
||||
| ПутьИсточник | --sname | Строка | ✔ | Путь (имя) в бакете источнике |
|
||||
| БакетИсточник | --sbucket | Строка | ✔ | Бакет источник объекта |
|
||||
| ПутьПриемник | --name | Строка | ✔ | Путь (имя) объекта в бакете приемнике |
|
||||
| БакетПриемник | --bucket | Строка | ✔ | Имя бакета приемника |
|
||||
| ОсновныеДанные | --basic | Структура Из КлючИЗначение | ✔ | Основные данные запроса. См. ПолучитьСтруктуруДанных |
|
||||
| Заголовки | --headers | Соответствие Из КлючИЗначение | ✖ | Дополнительные заголовки запроса, если необходимо |
|
||||
|
||||
|
||||
Возвращаемое значение: Структура Из КлючИЗначение - сериализованный JSON ответа от хранилища
|
||||
|
||||
<br/>
|
||||
|
||||
:::tip
|
||||
Метод в документации AWS: [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
|
||||
:::
|
||||
<br/>
|
||||
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
URL = "storage-155.s3hoster.by";
|
||||
AccessKey = "BRN5RKJE67...";
|
||||
SecretKey = "NNhv+i9PrytpT8Tu0C1N...";
|
||||
Region = "BTC";
|
||||
|
||||
ОсновныеДанные = OPI_S3.ПолучитьСтруктуруДанных(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
ПутьИсточник = "picture.jpg";
|
||||
БакетИсточник = "opi-gpbucket3";
|
||||
|
||||
ПутьПриемник = "new_picture.jpg";
|
||||
БакетПриемник = "opi-dirbucket3";
|
||||
|
||||
Результат = OPI_S3.КопироватьОбъект(ПутьИсточник, БакетИсточник, ПутьПриемник, БакетПриемник, ОсновныеДанные);
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -72,21 +72,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 204,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:35 GMT",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "e602da57d0c30b8c7034fcfe129917205f80f7bab979408e71da5d1441c85e79",
|
||||
"X-Amz-Request-Id": "180861E597F24311",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -76,23 +76,4 @@ import TabItem from '@theme/TabItem';
|
||||
</Tabs>
|
||||
|
||||
|
||||
```json title="Результат"
|
||||
{
|
||||
"status": 200,
|
||||
"response": {},
|
||||
"headers": {
|
||||
"Accept-Ranges": "bytes",
|
||||
"Content-Length": "0",
|
||||
"Content-Type": "text/plain; charset=utf-8",
|
||||
"Date": "Sat, 16 Nov 2024 07:21:35 GMT",
|
||||
"Etag": "\"9e0176f87f6565a22f78e0f9b39a4d78\"",
|
||||
"Server": "MinIO",
|
||||
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
|
||||
"Vary": "Origin,Accept-Encoding",
|
||||
"X-Amz-Id-2": "057275ee0636b36a8256f409a6ff665de46bfaa1f0d5faf2d1b4f312e55c34fa",
|
||||
"X-Amz-Request-Id": "180861E36DCA801B",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Xss-Protection": "1; mode=block"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.УдалитьСчетчик(Токен, IDСчетчика);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьСчетчик(Токен, IDСчетчика);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьСписокСчетчиков(Токен);
|
||||
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
Результат = OPI_YandexMetrika.ВосстановитьСчетчик(Токен, IDСчетчика);
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDСчетчика = "98889888";
|
||||
IDСчетчика = "98962337";
|
||||
|
||||
СтруктураСчетчика = Новый Структура;
|
||||
СтруктураСчетчика.Вставить("autogoals_enabled", Истина);
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
|
||||
Результат = OPI_YandexMetrika.УдалитьМетку(Токен, IDМетки);
|
||||
```
|
||||
|
@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
|
||||
Результат = OPI_YandexMetrika.ПолучитьМетку(Токен, IDМетки);
|
||||
```
|
||||
|
@ -31,7 +31,7 @@ import TabItem from '@theme/TabItem';
|
||||
|
||||
```bsl title="Пример использования для 1С:Предприятие/OneScript"
|
||||
Токен = "y0_AgAAAABdylaOAAy9KgAAAAEXh6i...";
|
||||
IDМетки = "313591";
|
||||
IDМетки = "313721";
|
||||
Наименование = "Новое имя метки";
|
||||
|
||||
Результат = OPI_YandexMetrika.ИзменитьМетку(Токен, IDМетки, Наименование);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -124,7 +124,7 @@ EndFunction
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function CreateBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export
|
||||
Function CreateBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export
|
||||
|
||||
Response = BucketManagment(Name, BasicData, Directory, "PUT", Headers);
|
||||
Return Response;
|
||||
@ -145,7 +145,7 @@ EndFunction
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export
|
||||
Function DeleteBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export
|
||||
|
||||
Response = BucketManagment(Name, BasicData, Directory, "DELETE", Headers);
|
||||
Return Response;
|
||||
@ -169,7 +169,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function HeadBucket(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val AccountID = ""
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
@ -204,7 +204,7 @@ EndFunction
|
||||
Function PutBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val XmlConfig
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
OPI_TypeConversion.GetLine(XmlConfig, True);
|
||||
@ -238,7 +238,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -270,7 +270,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -305,7 +305,7 @@ EndFunction
|
||||
Function PutBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Tags
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
Tags = FormTagsStructure(Tags);
|
||||
@ -340,7 +340,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -371,7 +371,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -406,7 +406,7 @@ Function PutBucketVersioning(Val Name
|
||||
, Val BasicData
|
||||
, Val Status = Undefined
|
||||
, Val MFADelete = Undefined
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
Tags = FormVersioningStructure(Status, MFADelete);
|
||||
@ -441,7 +441,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketVersioning(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -527,7 +527,7 @@ Function PutObject(Val Name
|
||||
|
||||
BasicData.Insert("URL", URL);
|
||||
|
||||
Response = SendRequestWithBody("PUT", BasicData, Entity, Headers);
|
||||
Response = SendRequest("PUT", BasicData, Entity, Headers);
|
||||
|
||||
Return Response;
|
||||
|
||||
@ -619,6 +619,45 @@ Function DeleteObject(Val Name
|
||||
|
||||
EndFunction
|
||||
|
||||
// Copy object
|
||||
// Copies an object from one location to another
|
||||
//
|
||||
// Note
|
||||
// Method at AWS documentation: [CopyObject](@docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
|
||||
//
|
||||
// Parameters:
|
||||
// SourcePath - String - Path (name) in the source bucket - sname
|
||||
// DestinationBucket - String - Source bucket name - sbucket
|
||||
// DestinationPath - String - Path (name) in the destination bucket - name
|
||||
// SourceBucket - String - Destination bucket name - bucket
|
||||
// BasicData - Structure of KeyAndValue - Basic request data. See GetBasicDataStructure - basic
|
||||
// Headers - Map Of KeyAndValue - Additional request headers, if necessary - headers
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function CopyObject(Val SourcePath
|
||||
, Val DestinationBucket
|
||||
, Val DestinationPath
|
||||
, Val SourceBucket
|
||||
, Val BasicData
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
OPI_TypeConversion.GetLine(SourcePath);
|
||||
OPI_TypeConversion.GetLine(DestinationBucket);
|
||||
|
||||
Source = DestinationBucket + "/" + SourcePath;
|
||||
Source = ?(StrStartsWith(Source, "/"), Source, "/" + Source);
|
||||
|
||||
SourceHeader = New Map();
|
||||
SourceHeader.Insert("x-amz-copy-source", Source);
|
||||
AddAdditionalHeaders(Headers, SourceHeader);
|
||||
|
||||
Response = PutObject(DestinationPath, SourceBucket, Undefined, BasicData, Headers);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -2149,6 +2149,7 @@ Procedure AWS_ObjectsManagment() Export
|
||||
S3_CreateBucket(TestParameters);
|
||||
S3_PutObject(TestParameters);
|
||||
S3_HeadObject(TestParameters);
|
||||
S3_CopyObject(TestParameters);
|
||||
S3_DeleteObject(TestParameters);
|
||||
S3_DeleteBucket(TestParameters);
|
||||
|
||||
@ -14715,7 +14716,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateBucket (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14724,7 +14725,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14745,7 +14746,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteBucket (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14754,7 +14755,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14790,13 +14791,13 @@ Procedure S3_HeadBucket(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True);
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "HeadBucket", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]); // SKIP
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True, "1234");
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, , "1234");
|
||||
|
||||
// END
|
||||
|
||||
@ -14815,7 +14816,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14834,7 +14835,7 @@ Procedure S3_DeleteBucketEncryption(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14860,7 +14861,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig, False);
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig);
|
||||
|
||||
// END
|
||||
|
||||
@ -14882,7 +14883,7 @@ Procedure S3_GetBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14891,7 +14892,7 @@ Procedure S3_GetBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14916,7 +14917,7 @@ Procedure S3_PutBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14925,7 +14926,7 @@ Procedure S3_PutBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, False);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
|
||||
// END
|
||||
|
||||
@ -14946,7 +14947,7 @@ Procedure S3_DeleteBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14955,7 +14956,7 @@ Procedure S3_DeleteBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14979,7 +14980,7 @@ Procedure S3_GetBucketVersioning(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketVersioning (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14988,7 +14989,7 @@ Procedure S3_GetBucketVersioning(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -15010,7 +15011,7 @@ Procedure S3_PutBucketVersioning(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketVersioning (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -15019,7 +15020,7 @@ Procedure S3_PutBucketVersioning(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , False);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
|
||||
// END
|
||||
|
||||
@ -15092,6 +15093,33 @@ Procedure S3_HeadObject(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_CopyObject(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CopyObject", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result);
|
||||
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]);
|
||||
OPI_S3.DeleteObject(DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -2079,6 +2079,22 @@ Procedure CLI_YaMetrika_TagsManagment() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YaMetrika_CountersManagement() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Metrika_Token", TestParameters);
|
||||
|
||||
CLI_YandexMetrika_GetCounterStructure(TestParameters);
|
||||
CLI_YandexMetrika_CreateCounter(TestParameters);
|
||||
CLI_YandexMetrika_GetCounter(TestParameters);
|
||||
CLI_YandexMetrika_UpdateCounter(TestParameters);
|
||||
CLI_YandexMetrika_DeleteCounter(TestParameters);
|
||||
CLI_YandexMetrika_RestoreCounter(TestParameters);
|
||||
CLI_YandexMetrika_GetCountersList(TestParameters);
|
||||
CLI_YandexMetrika_DeleteCounter(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region S3
|
||||
@ -2129,6 +2145,7 @@ Procedure CLI_AWS_ObjectsManagment() Export
|
||||
CLI_S3_CreateBucket(TestParameters);
|
||||
CLI_S3_PutObject(TestParameters);
|
||||
CLI_S3_HeadObject(TestParameters);
|
||||
CLI_S3_CopyObject(TestParameters);
|
||||
CLI_S3_DeleteObject(TestParameters);
|
||||
CLI_S3_DeleteBucket(TestParameters);
|
||||
|
||||
@ -16439,6 +16456,191 @@ Procedure CLI_YandexMetrika_GetTag(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCounterStructure(FunctionParameters)
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("empty", False);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCounterStructure", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCounterStructure", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_Map(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_CreateCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
||||
CodeSettingsStructure = New Structure;
|
||||
CodeSettingsStructure.Insert("async" , 0);
|
||||
CodeSettingsStructure.Insert("clickmap" , 1);
|
||||
CodeSettingsStructure.Insert("ecommerce" , 1);
|
||||
CodeSettingsStructure.Insert("in_one_line" , 0);
|
||||
CodeSettingsStructure.Insert("track_hash" , 1);
|
||||
CodeSettingsStructure.Insert("visor" , 1);
|
||||
CodeSettingsStructure.Insert("xml_site" , 0);
|
||||
CodeSettingsStructure.Insert("ytm" , 0);
|
||||
CodeSettingsStructure.Insert("alternative_cdn", 1);
|
||||
|
||||
InformerStructure = New Structure;
|
||||
InformerStructure.Insert("color_arrow", 1);
|
||||
InformerStructure.Insert("color_end" , "EFEFEFFE");
|
||||
InformerStructure.Insert("color_start", "EEEEEEEE");
|
||||
InformerStructure.Insert("color_text" , 0);
|
||||
InformerStructure.Insert("enabled" , 1);
|
||||
InformerStructure.Insert("indicator" , "uniques");
|
||||
InformerStructure.Insert("size" , 2);
|
||||
InformerStructure.Insert("type" , "ext");
|
||||
|
||||
CodeSettingsStructure.Insert("informer", InformerStructure);
|
||||
|
||||
CounterStructure.Insert("code_options", CodeSettingsStructure);
|
||||
|
||||
FlagsStructure = New Structure;
|
||||
FlagsStructure.Insert("collect_first_party_data" , True);
|
||||
FlagsStructure.Insert("measurement_enabled" , True);
|
||||
FlagsStructure.Insert("use_in_benchmarks" , True);
|
||||
FlagsStructure.Insert("direct_allow_use_goals_without_access", True);
|
||||
|
||||
CounterStructure.Insert("counter_flags" , FlagsStructure);
|
||||
CounterStructure.Insert("favorite" , 1);
|
||||
CounterStructure.Insert("filter_robots" , 2);
|
||||
CounterStructure.Insert("gdpr_agreement_accepted", 1);
|
||||
|
||||
DomainStructure = New Structure("site", "openintegrations.dev");
|
||||
|
||||
CounterStructure.Insert("site2", DomainStructure);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("fields", CounterStructure);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "CreateCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
CounterID = Result["counter"]["id"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Metrika_CounterID", CounterID);
|
||||
OPI_Tools.AddField("Metrika_CounterID", CounterID, "String", FunctionParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_DeleteCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "DeleteCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_UpdateCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
||||
FlagsStructure = New Structure;
|
||||
FlagsStructure.Insert("collect_first_party_data" , False);
|
||||
FlagsStructure.Insert("measurement_enabled" , False);
|
||||
FlagsStructure.Insert("use_in_benchmarks" , False);
|
||||
FlagsStructure.Insert("direct_allow_use_goals_without_access", False);
|
||||
|
||||
CounterStructure.Insert("counter_flags" , FlagsStructure);
|
||||
CounterStructure.Insert("favorite" , 0);
|
||||
CounterStructure.Insert("filter_robots" , 1);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
Options.Insert("fields" , CounterStructure);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "UpdateCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "UpdateCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_RestoreCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "RestoreCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "RestoreCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCountersList(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCountersList", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCountersList", "YandexMetrika"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounters(Result); // SKIP
|
||||
|
||||
// filter by IDs list
|
||||
|
||||
Filter = New Structure;
|
||||
|
||||
CountersArray = New Array;
|
||||
CountersArray.Add(CounterID);
|
||||
|
||||
Filter.Insert("counter_ids", CountersArray);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("filter", Filter);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCountersList", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCountersList (filter))", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounters(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region S3
|
||||
@ -17106,6 +17308,45 @@ Procedure CLI_S3_HeadObject(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_S3_CopyObject(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("url" , URL);
|
||||
Options.Insert("access", AccessKey);
|
||||
Options.Insert("secret", SecretKey);
|
||||
Options.Insert("region", Region);
|
||||
|
||||
BasicData = OPI_TestDataRetrieval.ExecuteTestCLI("s3", "GetBasicDataStructure", Options);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("sname" , SourcePath);
|
||||
Options.Insert("sbucket", DestinationBucket);
|
||||
Options.Insert("name" , DestinationPath);
|
||||
Options.Insert("bucket" , SourceBucket);
|
||||
Options.Insert("basic" , BasicData);
|
||||
|
||||
BasicData = OPI_TestDataRetrieval.ExecuteTestCLI("s3", "CopyObject", Options);
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CopyObject", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result);
|
||||
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]);
|
||||
OPI_S3.DeleteObject(DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -124,7 +124,7 @@ EndFunction
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function CreateBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export
|
||||
Function CreateBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export
|
||||
|
||||
Response = BucketManagment(Name, BasicData, Directory, "PUT", Headers);
|
||||
Return Response;
|
||||
@ -145,7 +145,7 @@ EndFunction
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucket(Val Name, Val BasicData, Val Directory = True, Val Headers = Undefined) Export
|
||||
Function DeleteBucket(Val Name, Val BasicData, Val Directory = False, Val Headers = Undefined) Export
|
||||
|
||||
Response = BucketManagment(Name, BasicData, Directory, "DELETE", Headers);
|
||||
Return Response;
|
||||
@ -169,7 +169,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function HeadBucket(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val AccountID = ""
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
@ -204,7 +204,7 @@ EndFunction
|
||||
Function PutBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val XmlConfig
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
OPI_TypeConversion.GetLine(XmlConfig, True);
|
||||
@ -238,7 +238,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -270,7 +270,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucketEncryption(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -305,7 +305,7 @@ EndFunction
|
||||
Function PutBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Tags
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
Tags = FormTagsStructure(Tags);
|
||||
@ -340,7 +340,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -371,7 +371,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function DeleteBucketTagging(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -406,7 +406,7 @@ Function PutBucketVersioning(Val Name
|
||||
, Val BasicData
|
||||
, Val Status = Undefined
|
||||
, Val MFADelete = Undefined
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
Tags = FormVersioningStructure(Status, MFADelete);
|
||||
@ -441,7 +441,7 @@ EndFunction
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function GetBucketVersioning(Val Name
|
||||
, Val BasicData
|
||||
, Val Directory = True
|
||||
, Val Directory = False
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
URL = GetServiceURL(BasicData);
|
||||
@ -527,7 +527,7 @@ Function PutObject(Val Name
|
||||
|
||||
BasicData.Insert("URL", URL);
|
||||
|
||||
Response = SendRequestWithBody("PUT", BasicData, Entity, Headers);
|
||||
Response = SendRequest("PUT", BasicData, Entity, Headers);
|
||||
|
||||
Return Response;
|
||||
|
||||
@ -619,6 +619,45 @@ Function DeleteObject(Val Name
|
||||
|
||||
EndFunction
|
||||
|
||||
// Copy object
|
||||
// Copies an object from one location to another
|
||||
//
|
||||
// Note
|
||||
// Method at AWS documentation: [CopyObject](@docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
|
||||
//
|
||||
// Parameters:
|
||||
// SourcePath - String - Path (name) in the source bucket - sname
|
||||
// DestinationBucket - String - Source bucket name - sbucket
|
||||
// DestinationPath - String - Path (name) in the destination bucket - name
|
||||
// SourceBucket - String - Destination bucket name - bucket
|
||||
// BasicData - Structure of KeyAndValue - Basic request data. See GetBasicDataStructure - basic
|
||||
// Headers - Map Of KeyAndValue - Additional request headers, if necessary - headers
|
||||
//
|
||||
// Returns:
|
||||
// Structure of KeyAndValue - serialized JSON response from storage
|
||||
Function CopyObject(Val SourcePath
|
||||
, Val DestinationBucket
|
||||
, Val DestinationPath
|
||||
, Val SourceBucket
|
||||
, Val BasicData
|
||||
, Val Headers = Undefined) Export
|
||||
|
||||
OPI_TypeConversion.GetLine(SourcePath);
|
||||
OPI_TypeConversion.GetLine(DestinationBucket);
|
||||
|
||||
Source = DestinationBucket + "/" + SourcePath;
|
||||
Source = ?(StrStartsWith(Source, "/"), Source, "/" + Source);
|
||||
|
||||
SourceHeader = New Map();
|
||||
SourceHeader.Insert("x-amz-copy-source", Source);
|
||||
AddAdditionalHeaders(Headers, SourceHeader);
|
||||
|
||||
Response = PutObject(DestinationPath, SourceBucket, Undefined, BasicData, Headers);
|
||||
|
||||
Return Response;
|
||||
|
||||
EndFunction
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -2149,6 +2149,7 @@ Procedure AWS_ObjectsManagment() Export
|
||||
S3_CreateBucket(TestParameters);
|
||||
S3_PutObject(TestParameters);
|
||||
S3_HeadObject(TestParameters);
|
||||
S3_CopyObject(TestParameters);
|
||||
S3_DeleteObject(TestParameters);
|
||||
S3_DeleteBucket(TestParameters);
|
||||
|
||||
@ -14715,7 +14716,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateBucket (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14724,7 +14725,7 @@ Procedure S3_CreateBucket(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.CreateBucket(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14745,7 +14746,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteBucket (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14754,7 +14755,7 @@ Procedure S3_DeleteBucket(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucket(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14790,13 +14791,13 @@ Procedure S3_HeadBucket(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True);
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "HeadBucket", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]); // SKIP
|
||||
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, True, "1234");
|
||||
Result = OPI_S3.HeadBucket(Name, BasicData, , "1234");
|
||||
|
||||
// END
|
||||
|
||||
@ -14815,7 +14816,7 @@ Procedure S3_GetBucketEncryption(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketEncryption(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14834,7 +14835,7 @@ Procedure S3_DeleteBucketEncryption(FunctionParameters)
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
Name = "opi-newbucket2";
|
||||
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketEncryption(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14860,7 +14861,7 @@ Procedure S3_PutBucketEncryption(FunctionParameters)
|
||||
| </Rule>
|
||||
|</ServerSideEncryptionConfiguration>";
|
||||
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig, False);
|
||||
Result = OPI_S3.PutBucketEncryption(Name, BasicData, XmlConfig);
|
||||
|
||||
// END
|
||||
|
||||
@ -14882,7 +14883,7 @@ Procedure S3_GetBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14891,7 +14892,7 @@ Procedure S3_GetBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketTagging(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14916,7 +14917,7 @@ Procedure S3_PutBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14925,7 +14926,7 @@ Procedure S3_PutBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure, False);
|
||||
Result = OPI_S3.PutBucketTagging(Name, BasicData, TagStructure);
|
||||
|
||||
// END
|
||||
|
||||
@ -14946,7 +14947,7 @@ Procedure S3_DeleteBucketTagging(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteBucketTagging (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14955,7 +14956,7 @@ Procedure S3_DeleteBucketTagging(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData, False);
|
||||
Result = OPI_S3.DeleteBucketTagging(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -14979,7 +14980,7 @@ Procedure S3_GetBucketVersioning(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetBucketVersioning (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -14988,7 +14989,7 @@ Procedure S3_GetBucketVersioning(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData, False);
|
||||
Result = OPI_S3.GetBucketVersioning(Name, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
@ -15010,7 +15011,7 @@ Procedure S3_PutBucketVersioning(FunctionParameters)
|
||||
// Directory bucket
|
||||
|
||||
Name = "opi-dirbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , True);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "PutBucketVersioning (DB)", "S3"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result); // SKIP
|
||||
@ -15019,7 +15020,7 @@ Procedure S3_PutBucketVersioning(FunctionParameters)
|
||||
// General purpose bucket
|
||||
|
||||
Name = "opi-gpbucket3";
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status, , False);
|
||||
Result = OPI_S3.PutBucketVersioning(Name, BasicData, Status);
|
||||
|
||||
// END
|
||||
|
||||
@ -15092,6 +15093,33 @@ Procedure S3_HeadObject(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure S3_CopyObject(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
BasicData = OPI_S3.GetBasicDataStructure(URL, AccessKey, SecretKey, Region);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
// END
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CopyObject", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result);
|
||||
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]);
|
||||
OPI_S3.DeleteObject(DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
@ -2079,6 +2079,22 @@ Procedure CLI_YaMetrika_TagsManagment() Export
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YaMetrika_CountersManagement() Export
|
||||
|
||||
TestParameters = New Structure;
|
||||
OPI_TestDataRetrieval.ParameterToCollection("Metrika_Token", TestParameters);
|
||||
|
||||
CLI_YandexMetrika_GetCounterStructure(TestParameters);
|
||||
CLI_YandexMetrika_CreateCounter(TestParameters);
|
||||
CLI_YandexMetrika_GetCounter(TestParameters);
|
||||
CLI_YandexMetrika_UpdateCounter(TestParameters);
|
||||
CLI_YandexMetrika_DeleteCounter(TestParameters);
|
||||
CLI_YandexMetrika_RestoreCounter(TestParameters);
|
||||
CLI_YandexMetrika_GetCountersList(TestParameters);
|
||||
CLI_YandexMetrika_DeleteCounter(TestParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region S3
|
||||
@ -2129,6 +2145,7 @@ Procedure CLI_AWS_ObjectsManagment() Export
|
||||
CLI_S3_CreateBucket(TestParameters);
|
||||
CLI_S3_PutObject(TestParameters);
|
||||
CLI_S3_HeadObject(TestParameters);
|
||||
CLI_S3_CopyObject(TestParameters);
|
||||
CLI_S3_DeleteObject(TestParameters);
|
||||
CLI_S3_DeleteBucket(TestParameters);
|
||||
|
||||
@ -16439,6 +16456,191 @@ Procedure CLI_YandexMetrika_GetTag(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCounterStructure(FunctionParameters)
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("empty", False);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCounterStructure", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCounterStructure", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_Map(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_CreateCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
||||
CodeSettingsStructure = New Structure;
|
||||
CodeSettingsStructure.Insert("async" , 0);
|
||||
CodeSettingsStructure.Insert("clickmap" , 1);
|
||||
CodeSettingsStructure.Insert("ecommerce" , 1);
|
||||
CodeSettingsStructure.Insert("in_one_line" , 0);
|
||||
CodeSettingsStructure.Insert("track_hash" , 1);
|
||||
CodeSettingsStructure.Insert("visor" , 1);
|
||||
CodeSettingsStructure.Insert("xml_site" , 0);
|
||||
CodeSettingsStructure.Insert("ytm" , 0);
|
||||
CodeSettingsStructure.Insert("alternative_cdn", 1);
|
||||
|
||||
InformerStructure = New Structure;
|
||||
InformerStructure.Insert("color_arrow", 1);
|
||||
InformerStructure.Insert("color_end" , "EFEFEFFE");
|
||||
InformerStructure.Insert("color_start", "EEEEEEEE");
|
||||
InformerStructure.Insert("color_text" , 0);
|
||||
InformerStructure.Insert("enabled" , 1);
|
||||
InformerStructure.Insert("indicator" , "uniques");
|
||||
InformerStructure.Insert("size" , 2);
|
||||
InformerStructure.Insert("type" , "ext");
|
||||
|
||||
CodeSettingsStructure.Insert("informer", InformerStructure);
|
||||
|
||||
CounterStructure.Insert("code_options", CodeSettingsStructure);
|
||||
|
||||
FlagsStructure = New Structure;
|
||||
FlagsStructure.Insert("collect_first_party_data" , True);
|
||||
FlagsStructure.Insert("measurement_enabled" , True);
|
||||
FlagsStructure.Insert("use_in_benchmarks" , True);
|
||||
FlagsStructure.Insert("direct_allow_use_goals_without_access", True);
|
||||
|
||||
CounterStructure.Insert("counter_flags" , FlagsStructure);
|
||||
CounterStructure.Insert("favorite" , 1);
|
||||
CounterStructure.Insert("filter_robots" , 2);
|
||||
CounterStructure.Insert("gdpr_agreement_accepted", 1);
|
||||
|
||||
DomainStructure = New Structure("site", "openintegrations.dev");
|
||||
|
||||
CounterStructure.Insert("site2", DomainStructure);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("fields", CounterStructure);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "CreateCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CreateCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
CounterID = Result["counter"]["id"];
|
||||
OPI_TestDataRetrieval.WriteParameter("Metrika_CounterID", CounterID);
|
||||
OPI_Tools.AddField("Metrika_CounterID", CounterID, "String", FunctionParameters);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_DeleteCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "DeleteCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "DeleteCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_UpdateCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
CounterStructure = New Structure;
|
||||
CounterStructure.Insert("autogoals_enabled", True);
|
||||
|
||||
FlagsStructure = New Structure;
|
||||
FlagsStructure.Insert("collect_first_party_data" , False);
|
||||
FlagsStructure.Insert("measurement_enabled" , False);
|
||||
FlagsStructure.Insert("use_in_benchmarks" , False);
|
||||
FlagsStructure.Insert("direct_allow_use_goals_without_access", False);
|
||||
|
||||
CounterStructure.Insert("counter_flags" , FlagsStructure);
|
||||
CounterStructure.Insert("favorite" , 0);
|
||||
CounterStructure.Insert("filter_robots" , 1);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
Options.Insert("fields" , CounterStructure);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "UpdateCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "UpdateCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounter(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_RestoreCounter(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("counter", CounterID);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "RestoreCounter", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "RestoreCounter", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaSuccess(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_YandexMetrika_GetCountersList(FunctionParameters)
|
||||
|
||||
Token = FunctionParameters["Metrika_Token"];
|
||||
CounterID = FunctionParameters["Metrika_CounterID"];
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCountersList", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCountersList", "YandexMetrika"); // SKIP
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounters(Result); // SKIP
|
||||
|
||||
// filter by IDs list
|
||||
|
||||
Filter = New Structure;
|
||||
|
||||
CountersArray = New Array;
|
||||
CountersArray.Add(CounterID);
|
||||
|
||||
Filter.Insert("counter_ids", CountersArray);
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("token" , Token);
|
||||
Options.Insert("filter", Filter);
|
||||
|
||||
Result = OPI_TestDataRetrieval.ExecuteTestCLI("metrika", "GetCountersList", Options);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "GetCountersList (filter))", "YandexMetrika");
|
||||
OPI_TestDataRetrieval.Check_MetrikaCounters(Result);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#Region S3
|
||||
@ -17106,6 +17308,45 @@ Procedure CLI_S3_HeadObject(FunctionParameters)
|
||||
|
||||
EndProcedure
|
||||
|
||||
Procedure CLI_S3_CopyObject(FunctionParameters)
|
||||
|
||||
URL = FunctionParameters["S3_URL"];
|
||||
AccessKey = FunctionParameters["S3_AccessKey"];
|
||||
SecretKey = FunctionParameters["S3_SecretKey"];
|
||||
Region = "BTC";
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("url" , URL);
|
||||
Options.Insert("access", AccessKey);
|
||||
Options.Insert("secret", SecretKey);
|
||||
Options.Insert("region", Region);
|
||||
|
||||
BasicData = OPI_TestDataRetrieval.ExecuteTestCLI("s3", "GetBasicDataStructure", Options);
|
||||
|
||||
SourcePath = "picture.jpg";
|
||||
DestinationBucket = "opi-gpbucket3";
|
||||
|
||||
DestinationPath = "new_picture.jpg";
|
||||
SourceBucket = "opi-dirbucket3";
|
||||
|
||||
Options = New Structure;
|
||||
Options.Insert("sname" , SourcePath);
|
||||
Options.Insert("sbucket", DestinationBucket);
|
||||
Options.Insert("name" , DestinationPath);
|
||||
Options.Insert("bucket" , SourceBucket);
|
||||
Options.Insert("basic" , BasicData);
|
||||
|
||||
BasicData = OPI_TestDataRetrieval.ExecuteTestCLI("s3", "CopyObject", Options);
|
||||
Result = OPI_S3.CopyObject(SourcePath, DestinationBucket, DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
OPI_TestDataRetrieval.WriteLog(Result, "CopyObject", "S3");
|
||||
OPI_TestDataRetrieval.Check_S3Success(Result);
|
||||
|
||||
BasicData.Insert("URL", FunctionParameters["S3_URL"]);
|
||||
OPI_S3.DeleteObject(DestinationPath, SourceBucket, BasicData);
|
||||
|
||||
EndProcedure
|
||||
|
||||
#EndRegion
|
||||
|
||||
#EndRegion
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user