Class: Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb

Overview

The ServiceConnectionPolicy resource.

Defined Under Namespace

Modules: State Classes: LabelsEntry, PscConfig, PscConnection

Instance Attribute Summary collapse

Instance Attribute Details

#create_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. Time when the ServiceConnectionPolicy was created.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#description::String

Returns A description of this resource.

Returns:

  • (::String)

    A description of this resource.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#etag::String

Returns Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.

Returns:

  • (::String)

    Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#infrastructure::Google::Cloud::NetworkConnectivity::V1::Infrastructure (readonly)

Returns Output only. The type of underlying resources used to create the connection.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#labels::Google::Protobuf::Map{::String => ::String}

Returns User-defined labels.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    User-defined labels.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#name::String

Returns Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#network::String

Returns The resource path of the consumer network. Example:

  • projects/{projectNumOrId}/global/networks/{resourceId}.

Returns:

  • (::String)

    The resource path of the consumer network. Example:

    • projects/{projectNumOrId}/global/networks/{resourceId}.


485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#psc_config::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig

Returns Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#psc_connections::Array<::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConnection> (readonly)

Returns Output only. [Output only] Information about each Private Service Connect connection.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#service_class::String

Returns The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.

Returns:

  • (::String)

    The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp or google-cloud. For example, gcp-memorystore-redis or google-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end

#update_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. Time when the ServiceConnectionPolicy was updated.

Returns:



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
# File 'proto_docs/google/cloud/networkconnectivity/v1/cross_network_automation.rb', line 485

class ServiceConnectionPolicy
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Configuration used for Private Service Connect connections. Used when
  # Infrastructure is PSC.
  # @!attribute [rw] subnetworks
  #   @return [::Array<::String>]
  #     The resource paths of subnetworks to use for IP address management.
  #     Example:
  #     projects/\\{projectNumOrId}/regions/\\{region}/subnetworks/\\{resourceId}.
  # @!attribute [rw] limit
  #   @return [::Integer]
  #     Optional. Max number of PSC connections for this policy.
  # @!attribute [rw] producer_instance_location
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::PscConfig::ProducerInstanceLocation]
  #     Required. ProducerInstanceLocation is used to specify which authorization
  #     mechanism to use to determine which projects the Producer instance can be
  #     within.
  # @!attribute [rw] allowed_google_producers_resource_hierarchy_level
  #   @return [::Array<::String>]
  #     Optional. List of Projects, Folders, or Organizations from where the
  #     Producer instance can be within. For example, a network administrator can
  #     provide both 'organizations/foo' and 'projects/bar' as
  #     allowed_google_producers_resource_hierarchy_levels. This allowlists this
  #     network to connect with any Producer instance within the 'foo'
  #     organization or the 'bar' project. By default,
  #     allowed_google_producers_resource_hierarchy_level is empty. The format
  #     for each allowed_google_producers_resource_hierarchy_level is <resource
  #     type>/<id> where <resource type> is one of 'projects', 'folders', or
  #     'organizations' and <id> is either the ID or the number of the resource
  #     type. Format for each allowed_google_producers_resource_hierarchy_level
  #     value: 'projects/<project_id_or_number>' or 'folders/<folder_id>' or
  #     'organizations/<organization_id>'
  #     Eg. [projects/my-project-id, projects/567, folders/891,
  #     organizations/123]
  class PscConfig
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # ProducerInstanceLocation is used to specify which authorization mechanism
    # to use to determine which projects the Producer instance can be within.
    module ProducerInstanceLocation
      # Producer instance location is not specified. When this option is
      # chosen, then the PSC connections created by this
      # ServiceConnectionPolicy must be within the same project as the Producer
      # instance. This is the default ProducerInstanceLocation value.
      # To allow for PSC connections from this network to other networks, use
      # the CUSTOM_RESOURCE_HIERARCHY_LEVELS option.
      PRODUCER_INSTANCE_LOCATION_UNSPECIFIED = 0

      # Producer instance must be within one of the values provided in
      # allowed_google_producers_resource_hierarchy_level.
      CUSTOM_RESOURCE_HIERARCHY_LEVELS = 1
    end
  end

  # Information about a specific Private Service Connect connection.
  # @!attribute [rw] state
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ServiceConnectionPolicy::State]
  #     State of the PSC Connection
  # @!attribute [rw] consumer_forwarding_rule
  #   @return [::String]
  #     The resource reference of the PSC Forwarding Rule within the consumer
  #     VPC.
  # @!attribute [rw] consumer_address
  #   @return [::String]
  #     The resource reference of the consumer address.
  # @!attribute [rw] error_type
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Cloud::NetworkConnectivity::V1::ConnectionErrorType]
  #     The error type indicates whether the error is consumer facing, producer
  #     facing or system internal.
  # @!attribute [rw] error
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::Google::Rpc::Status]
  #     The most recent error during operating this connection.
  #     Deprecated, please use error_info instead.
  # @!attribute [rw] gce_operation
  #   @return [::String]
  #     The last Compute Engine operation to setup PSC connection.
  # @!attribute [rw] consumer_target_project
  #   @return [::String]
  #     The project where the PSC connection is created.
  # @!attribute [rw] psc_connection_id
  #   @return [::String]
  #     The PSC connection id of the PSC forwarding rule.
  # @!attribute [r] error_info
  #   @return [::Google::Rpc::ErrorInfo]
  #     Output only. The error info for the latest error during operating this
  #     connection.
  # @!attribute [r] selected_subnetwork
  #   @return [::String]
  #     Output only. The URI of the subnetwork selected to allocate IP address
  #     for this connection.
  # @!attribute [rw] producer_instance_id
  #   @deprecated This field is deprecated and may be removed in the next major version update.
  #   @return [::String]
  #     Immutable. Deprecated. Use producer_instance_metadata instead.
  #     An immutable identifier for the producer instance.
  # @!attribute [rw] producer_instance_metadata
  #   @return [::Google::Protobuf::Map{::String => ::String}]
  #     Immutable. An immutable map for the producer instance metadata.
  # @!attribute [r] service_class
  #   @return [::String]
  #     Output only. [Output only] The service class associated with this PSC
  #     Connection. The value is derived from the SCPolicy and matches the
  #     service class name provided by the customer.
  # @!attribute [rw] ip_version
  #   @return [::Google::Cloud::NetworkConnectivity::V1::IPVersion]
  #     The requested IP version for the PSC connection.
  class PscConnection
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods

    # @!attribute [rw] key
    #   @return [::String]
    # @!attribute [rw] value
    #   @return [::String]
    class ProducerInstanceMetadataEntry
      include ::Google::Protobuf::MessageExts
      extend ::Google::Protobuf::MessageExts::ClassMethods
    end
  end

  # @!attribute [rw] key
  #   @return [::String]
  # @!attribute [rw] value
  #   @return [::String]
  class LabelsEntry
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # The state of the PSC connection.
  # We reserve the right to add more states without notice in the future.
  # Users should not use exhaustive switch statements on this enum.
  # See https://google.aip.dev/216.
  module State
    # An invalid state as the default case.
    STATE_UNSPECIFIED = 0

    # The connection has been created successfully. However, for the
    # up-to-date connection status, please use the created forwarding rule's
    # "PscConnectionStatus" as the source of truth.
    ACTIVE = 1

    # The connection is not functional since some resources on the connection
    # fail to be created.
    FAILED = 2

    # The connection is being created.
    CREATING = 3

    # The connection is being deleted.
    DELETING = 4

    # The connection is being repaired to complete creation.
    CREATE_REPAIRING = 5

    # The connection is being repaired to complete deletion.
    DELETE_REPAIRING = 6
  end
end