---
version: 1
interactions:
- request:
    body: '{"id":"9c3120c4-adb4-4ea4-bd9b-79834955d02f", "name":"test-cli-iam-create-rule",
      "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42", "created_at":"2024-07-30T12:51:09.262410Z",
      "updated_at":"2024-07-30T12:51:09.262410Z", "description":""}'
    form: {}
    headers:
      Content-Type:
      - application/json
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/account/v3/projects
    method: POST
  response:
    body: '{"id":"9c3120c4-adb4-4ea4-bd9b-79834955d02f", "name":"test-cli-iam-create-rule",
      "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42", "created_at":"2024-07-30T12:51:09.262410Z",
      "updated_at":"2024-07-30T12:51:09.262410Z", "description":""}'
    headers:
      Content-Length:
      - "244"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - beec903b-40c3-4199-a016-4a5736099de0
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"id":"a307ecd4-8a90-4d04-ad72-ff331bfff4da", "name":"test-cli-iam-create-rule",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:09.467326Z", "updated_at":"2024-07-30T12:51:09.467326Z",
      "editable":true, "nb_rules":0, "nb_scopes":0, "nb_permission_sets":0, "tags":[],
      "no_principal":true}'
    form: {}
    headers:
      Content-Type:
      - application/json
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/policies
    method: POST
  response:
    body: '{"id":"a307ecd4-8a90-4d04-ad72-ff331bfff4da", "name":"test-cli-iam-create-rule",
      "description":"", "organization_id":"951df375-e094-4d26-97c1-ba548eeb9c42",
      "created_at":"2024-07-30T12:51:09.467326Z", "updated_at":"2024-07-30T12:51:09.467326Z",
      "editable":true, "nb_rules":0, "nb_scopes":0, "nb_permission_sets":0, "tags":[],
      "no_principal":true}'
    headers:
      Content-Length:
      - "346"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - de7f3c44-ce07-47c0-9132-e8dc4c8096a7
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"rules":[{"id":"420efcc4-cdb0-4663-935f-f1016e10354e", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]}],
      "total_count":1}'
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/rules?page=1&policy_id=a307ecd4-8a90-4d04-ad72-ff331bfff4da
    method: GET
  response:
    body: '{"rules":[{"id":"420efcc4-cdb0-4663-935f-f1016e10354e", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]}],
      "total_count":1}'
    headers:
      Content-Length:
      - "228"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 65088148-d692-4a90-a7e8-eaedbaf15413
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: '{"rules":[{"id":"732a2e80-760c-49f6-9137-70a3c58051c9", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]},
      {"id":"415dcb71-d6d8-4ef5-9f56-a091ac6b88c2", "permission_set_names":["VPCReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]}]}'
    form: {}
    headers:
      Content-Type:
      - application/json
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/rules
    method: PUT
  response:
    body: '{"rules":[{"id":"732a2e80-760c-49f6-9137-70a3c58051c9", "permission_set_names":["IPAMReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]},
      {"id":"415dcb71-d6d8-4ef5-9f56-a091ac6b88c2", "permission_set_names":["VPCReadOnly"],
      "permission_sets_scope_type":"projects", "condition":"", "project_ids":["9c3120c4-adb4-4ea4-bd9b-79834955d02f"]}]}'
    headers:
      Content-Length:
      - "411"
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 8529895c-9037-4ee1-85ab-7bc83273a9e3
    status: 200 OK
    code: 200
    duration: ""
- request:
    body: ""
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/iam/v1alpha1/policies/a307ecd4-8a90-4d04-ad72-ff331bfff4da
    method: DELETE
  response:
    body: ""
    headers:
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:09 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 8b859d67-5bc6-4784-a7fc-955c1479a008
    status: 204 No Content
    code: 204
    duration: ""
- request:
    body: ""
    form: {}
    headers:
      User-Agent:
      - scaleway-sdk-go/v1.0.0-beta.7+dev (go1.22.5; darwin; arm64) cli-e2e-test
    url: https://api.scaleway.com/account/v3/projects/9c3120c4-adb4-4ea4-bd9b-79834955d02f
    method: DELETE
  response:
    body: ""
    headers:
      Content-Security-Policy:
      - default-src 'none'; frame-ancestors 'none'
      Content-Type:
      - application/json
      Date:
      - Tue, 30 Jul 2024 12:51:10 GMT
      Server:
      - Scaleway API Gateway (fr-par-1;edge02)
      Strict-Transport-Security:
      - max-age=63072000
      X-Content-Type-Options:
      - nosniff
      X-Frame-Options:
      - DENY
      X-Request-Id:
      - 55fb9002-9d76-478f-9db4-781df67c6763
    status: 204 No Content
    code: 204
    duration: ""
