Returns the service key details.

        Similar to `cf service-key`.
332886
def get_service_key(self, service_name, key_name):
        
        for key in self._get_service_keys(service_name)['resources']:
            if key_name == key['entity']['name']:
                guid = key['metadata']['guid']

                uri = "/v2/service_keys/%s" % (guid)
                return self.api.get(uri)

        return None
679659
def _get_s3_key():
    '''
    
    '''

    key = __opts__['s3.key'] if 's3.key' in __opts__ else None
    keyid = __opts__['s3.keyid'] if 's3.keyid' in __opts__ else None
    service_url = __opts__['s3.service_url'] \
        if 's3.service_url' in __opts__ \
        else None
    verify_ssl = __opts__['s3.verify_ssl'] \
        if 's3.verify_ssl' in __opts__ \
        else None
    kms_keyid = __opts__['aws.kmw.keyid'] if 'aws.kms.keyid' in __opts__ else None
    location = __opts__['s3.location'] \
        if 's3.location' in __opts__ \
        else None
    path_style = __opts__['s3.path_style'] \
        if 's3.path_style' in __opts__ \
        else None
    https_enable = __opts__['s3.https_enable'] \
        if 's3.https_enable' in __opts__ \
        else None

    return key, keyid, service_url, verify_ssl, kms_keyid, location, path_style, https_enable
366963
def _GetServiceKey():
  """"""
  global _service_key

  if _service_key is None:
    hive = getattr(winreg, config.CONFIG["Client.config_hive"])
    path = config.CONFIG["Client.config_key"]

    # Don't use winreg.KEY_WOW64_64KEY since it breaks on Windows 2000
    _service_key = winreg.CreateKeyEx(hive, path, 0, winreg.KEY_ALL_ACCESS)

  return _service_key
783156
def asdict(self) -> Dict[str, Union[Dict, Union[str, Dict]]]:
        
        return {
            "service": self.service.name,
            **self.signature.serialize(),
        }
748896
public static String buildRegisteredServiceCacheKey(final SamlRegisteredService service) {
        val key = service.getMetadataLocation();
        LOGGER.trace("Determined cache key for service [{}] as [{}]", service.getName(), key);
        val hashedKey = DigestUtils.sha512(key);
        LOGGER.trace("Hashed service cache key as [{}]", hashedKey);
        return hashedKey;
    }
534080
def key(self):
        """"""
        if self.curie is None:
            return self.name
        return ":".join((self.curie.name, self.name))
72742
def getsshkeys(self):
        
        request = requests.get(
            self.keys_url, headers=self.headers, verify=self.verify_ssl, auth=self.auth, timeout=self.timeout)

        if request.status_code == 200:
            return request.json()
        else:
            return False
92606
def _get_or_create_service_key(self):
        
        keys = self.service._get_service_keys(self.name)
        for key in keys['resources']:
            if key['entity']['name'] == self.service_name:
                return self.service.get_service_key(self.name,
                        self.service_name)

        self.service.create_service_key(self.name, self.service_name)
        return self.service.get_service_key(self.name, self.service_name)
438275
def get_instance_guid(self, service_name):
        
        summary = self.space.get_space_summary()
        for service in summary['services']:
            if service['name'] == service_name:
                return service['guid']

        raise ValueError("No service with name '%s' found." % (service_name))
1361865
def _key(self):
        
        return (
            self._name,
            self._field_type.upper(),
            self._mode.upper(),
            self._description,
            self._fields,
        )
701829
private function getServiceId($serviceKey) {
        return ((interface_exists($serviceKey) || class_exists($serviceKey)) && defined($serviceKey . '::SERVICE_ID'))
            ? $serviceKey::SERVICE_ID
            : (string)$serviceKey
        ;
    }
608677
def service_data(self):
        
        # Lean on the cache first.
        if self._loaded_service_data is not None:
            return self._loaded_service_data

        # We don't have a cache. Build it.
        self._loaded_service_data = self._introspect_service(
            # We care about the ``botocore.session`` here, not the
            # ``kotocore.session``.
            self.session.core_session,
            self.service_name
        )
        # Clear out the API version, just in case.
        self._api_version = None
        return self._loaded_service_data
77207
def get_service_account_credentials(private_key):
    """"""

    import google.auth.transport.requests
    from google.oauth2.service_account import Credentials

    is_path = os.path.isfile(private_key)

    try:
        if is_path:
            with open(private_key) as f:
                json_key = json.loads(f.read())
        else:
            # ugly hack: 'private_key' field has new lines inside,
            # they break json parser, but we need to preserve them
            json_key = json.loads(private_key.replace("\n", "   "))
            json_key["private_key"] = json_key["private_key"].replace(
                "   ", "\n"
            )

        json_key["private_key"] = bytes(json_key["private_key"], "UTF-8")
        credentials = Credentials.from_service_account_info(json_key)
        credentials = credentials.with_scopes(SCOPES)

        # Refresh the token before trying to use it.
        request = google.auth.transport.requests.Request()
        credentials.refresh(request)

        return credentials, json_key.get("project_id")
    except (KeyError, ValueError, TypeError, AttributeError):
        raise pandas_gbq.exceptions.InvalidPrivateKeyFormat(
            "Detected private_key as {}. ".format(
                "path" if is_path else "contents"
            )
            + "Private key is missing or invalid. It should be service "
            "account private key JSON (file path or string contents) "
            'with at least two keys: "client_email" and "private_key". '
            "Can be obtained from: https://console.developers.google."
            "com/permissions/serviceaccounts"
        )
1257874
private String _getUniqueKey()
	{
		StringBuilder b = new StringBuilder();
		b.append( service );
		b.append( "#" );
		b.append( method );
		if( params != null )
		{
			b.append( "#" );
			b.append( params.toString() );
		}

		return b.toString();
	}
239249
def service_account_email(self):
        """"""
        if self._service_account_id is None:
            self._service_account_id = app_identity.get_service_account_name()
        return self._service_account_id
1279093
static KeyStore getKeyStore(OperationContext context) throws OperationFailedException {
        ServiceRegistry serviceRegistry = context.getServiceRegistry(true);
        PathAddress currentAddress = context.getCurrentAddress();
        RuntimeCapability<Void> runtimeCapability = KEY_STORE_RUNTIME_CAPABILITY.fromBaseCapability(currentAddress.getLastElement().getValue());
        ServiceName serviceName = runtimeCapability.getCapabilityServiceName();
        ServiceController<KeyStore> serviceController = getRequiredService(serviceRegistry, serviceName, KeyStore.class);

        return Assert.assertNotNull(serviceController.getValue());
    }
1155704
def get_service_types(self):
    
    resp = self._get_resource_root().get(self._path() + '/serviceTypes')
    return resp[ApiList.LIST_KEY]